Controladors de notificacions
GET https://anon.cat/api/notification-handlers/
curl --request GET \
--url 'https://anon.cat/api/notification-handlers/' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://anon.cat/api/notification-handlers/' \
--header 'Authorization: Bearer {api_key}' \
Paràmetres | Detalls | Descripció |
---|---|---|
page | Opcional Enterer | El número de pàgina del qual vols els resultats. Per defecte, 1 . |
results_per_page | Opcional Enterer | Quants resultats vols per pàgina. Els valors permesos són: 10 , 25 , 50 , 100 , 250 , 500 , 1000 . Per defecte, 25 . |
{
"data": [
{
"id": 1,
"type": "email",
"name": "Work email",
"settings": {
"email": "[email protected]"
},
"is_enabled": true,
"last_datetime": null,
"datetime": "2025-07-01 05:22:22"
}
],
"meta": {
"page": 1,
"results_per_page": 25,
"total": 1,
"total_pages": 1
},
"links": {
"first": "https://anon.cat/api/notification-handlers?&page=1",
"last": "https://anon.cat/api/notification-handlers?&page=1",
"next": null,
"prev": null,
"self": "https://anon.cat/api/notification-handlers?&page=1"
}
}
GET https://anon.cat/api/notification-handlers/{notification_handler_id}
curl --request GET \
--url 'https://anon.cat/api/notification-handlers/{notification_handler_id}' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://anon.cat/api/notification-handlers/{notification_handler_id}' \
--header 'Authorization: Bearer {api_key}' \
{
"data": {
"id": 1,
"type": "email",
"name": "Work email",
"settings": {
"email": "[email protected]"
},
"is_enabled": true,
"last_datetime": null,
"datetime": "2025-07-01 05:22:22"
}
}
POST https://anon.cat/api/notification-handlers
Paràmetres | Detalls | Descripció |
---|---|---|
name | Obligatori Cadena | - |
type | Obligatori Cadena | Valors permesos: email , webhook , slack , discord , telegram , microsoft_teams |
Opcional Cadena | Disponible quan: type = email Correu electrònic | |
webhook | Opcional Cadena | Disponible quan: type = webhook URL del webhook |
slack | Opcional Cadena | Disponible quan: type = slack URL del webhook de Slack |
discord | Opcional Cadena | Disponible quan: type = discord URL del webhook de Discord |
telegram | Opcional Cadena | Disponible quan: type = telegram Token de l'API de Telegram |
telegram_chat_id | Opcional Cadena | Disponible quan: type = telegram ID de xat de Telegram |
x_consumer_key | Opcional Cadena | Disponible quan: type = x Token de l'API de Telegram |
x_consumer_secret | Opcional Cadena | Disponible quan: type = x Token de l'API de Telegram |
x_access_token | Opcional Cadena | Disponible quan: type = x Token de l'API de Telegram |
x_access_token_secret | Opcional Cadena | Disponible quan: type = x Token de l'API de Telegram |
curl --request POST \
--url 'https://anon.cat/api/notification-handlers' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'name=Example' \
--form 'type=email' \
--form 'email=[email protected]' \
--url 'https://anon.cat/api/notification-handlers' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'name=Example' \
--form 'type=email' \
--form 'email=[email protected]' \
{
"data": {
"id": 1
}
}
POST https://anon.cat/api/notification-handlers/{notification_handler_id}
Paràmetres | Detalls | Descripció |
---|---|---|
name | Opcional Cadena | - |
type | Opcional Cadena | Valors permesos: email , webhook , slack , discord , telegram , microsoft_teams |
Opcional Cadena | Disponible quan: type = email Correu electrònic | |
webhook | Opcional Cadena | Disponible quan: type = webhook URL del webhook |
slack | Opcional Cadena | Disponible quan: type = slack URL del webhook de Slack |
discord | Opcional Cadena | Disponible quan: type = discord URL del webhook de Discord |
telegram | Opcional Cadena | Disponible quan: type = telegram Token de l'API de Telegram |
telegram_chat_id | Opcional Cadena | Disponible quan: type = telegram ID de xat de Telegram |
x_consumer_key | Opcional Cadena | Disponible quan: type = x Token de l'API de Telegram |
x_consumer_secret | Opcional Cadena | Disponible quan: type = x Token de l'API de Telegram |
x_access_token | Opcional Cadena | Disponible quan: type = x Token de l'API de Telegram |
x_access_token_secret | Opcional Cadena | Disponible quan: type = x Token de l'API de Telegram |
is_enabled | Opcional Booleà | - |
curl --request POST \
--url 'https://anon.cat/api/notification-handlers/{notification_handler_id}' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'name=Example new name' \
--form 'is_enabled=1' \
--url 'https://anon.cat/api/notification-handlers/{notification_handler_id}' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'name=Example new name' \
--form 'is_enabled=1' \
{
"data": {
"id": 1
}
}
DELETE https://anon.cat/api/notification-handlers/{notification_handler_id}
curl --request DELETE \
--url 'https://anon.cat/api/notification-handlers/{notification_handler_id}' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://anon.cat/api/notification-handlers/{notification_handler_id}' \
--header 'Authorization: Bearer {api_key}' \