Notification handlers
GET https://1li.ch/api/notification-handlers/
curl --request GET \
--url 'https://1li.ch/api/notification-handlers/' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://1li.ch/api/notification-handlers/' \
--header 'Authorization: Bearer {api_key}' \
Parametri | Dettagli | Descrizione |
---|---|---|
page | Opzionale Integer | Il numero di pagina dal quale desideri ricevere i risultati. Il valore predefinito è 1 . |
results_per_page | Opzionale Integer | Quanti risultati desideri per pagina. I valori ammessi sono: 10 , 25 , 50 , 100 , 250 , 500 , 1000 . Il valore predefinito è 25 . |
{
"data": [
{
"id": 1,
"type": "email",
"name": "Work email",
"settings": {
"email": "hey@example.com"
},
"is_enabled": true,
"last_datetime": null,
"datetime": "2025-07-12 08:47:14"
}
],
"meta": {
"page": 1,
"results_per_page": 25,
"total": 1,
"total_pages": 1
},
"links": {
"first": "https://1li.ch/api/notification-handlers?&page=1",
"last": "https://1li.ch/api/notification-handlers?&page=1",
"next": null,
"prev": null,
"self": "https://1li.ch/api/notification-handlers?&page=1"
}
}
GET https://1li.ch/api/notification-handlers/{notification_handler_id}
curl --request GET \
--url 'https://1li.ch/api/notification-handlers/{notification_handler_id}' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://1li.ch/api/notification-handlers/{notification_handler_id}' \
--header 'Authorization: Bearer {api_key}' \
{
"data": {
"id": 1,
"type": "email",
"name": "Work email",
"settings": {
"email": "hey@example.com"
},
"is_enabled": true,
"last_datetime": null,
"datetime": "2025-07-12 08:47:14"
}
}
POST https://1li.ch/api/notification-handlers
Parametri | Dettagli | Descrizione |
---|---|---|
name | Obbligatorio String | - |
type | Obbligatorio String | Valori ammessi: email , webhook , slack , discord , telegram , microsoft_teams |
Opzionale String | Disponibile quando: type = email Email | |
webhook | Opzionale String | Disponibile quando: type = webhook Webhook URL |
slack | Opzionale String | Disponibile quando: type = slack Slack webhook URL |
discord | Opzionale String | Disponibile quando: type = discord Discord webhook URL |
telegram | Opzionale String | Disponibile quando: type = telegram Telegram API Token |
telegram_chat_id | Opzionale String | Disponibile quando: type = telegram Telegram Chat ID |
x_consumer_key | Opzionale String | Disponibile quando: type = x Telegram API Token |
x_consumer_secret | Opzionale String | Disponibile quando: type = x Telegram API Token |
x_access_token | Opzionale String | Disponibile quando: type = x Telegram API Token |
x_access_token_secret | Opzionale String | Disponibile quando: type = x Telegram API Token |
curl --request POST \
--url 'https://1li.ch/api/notification-handlers' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'name=Example' \
--form 'type=email' \
--form 'email=hello@example.com' \
--url 'https://1li.ch/api/notification-handlers' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'name=Example' \
--form 'type=email' \
--form 'email=hello@example.com' \
{
"data": {
"id": 1
}
}
POST https://1li.ch/api/notification-handlers/{notification_handler_id}
Parametri | Dettagli | Descrizione |
---|---|---|
name | Opzionale String | - |
type | Opzionale String | Valori ammessi: email , webhook , slack , discord , telegram , microsoft_teams |
Opzionale String | Disponibile quando: type = email Email | |
webhook | Opzionale String | Disponibile quando: type = webhook Webhook URL |
slack | Opzionale String | Disponibile quando: type = slack Slack webhook URL |
discord | Opzionale String | Disponibile quando: type = discord Discord webhook URL |
telegram | Opzionale String | Disponibile quando: type = telegram Telegram API Token |
telegram_chat_id | Opzionale String | Disponibile quando: type = telegram Telegram Chat ID |
x_consumer_key | Opzionale String | Disponibile quando: type = x Telegram API Token |
x_consumer_secret | Opzionale String | Disponibile quando: type = x Telegram API Token |
x_access_token | Opzionale String | Disponibile quando: type = x Telegram API Token |
x_access_token_secret | Opzionale String | Disponibile quando: type = x Telegram API Token |
is_enabled | Opzionale Boolean | - |
curl --request POST \
--url 'https://1li.ch/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://1li.ch/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://1li.ch/api/notification-handlers/{notification_handler_id}
curl --request DELETE \
--url 'https://1li.ch/api/notification-handlers/{notification_handler_id}' \
--header 'Authorization: Bearer {api_key}' \
--url 'https://1li.ch/api/notification-handlers/{notification_handler_id}' \
--header 'Authorization: Bearer {api_key}' \