Create a notification destination
/notification-destination
Requires `notification:manage`. `slack` requires `webhook_url`; `email` requires `config.to`. Verify delivery with `POST /notification-destination/{id}/test` before relying on it.
Request Body
Non-secret settings. to/cc/bcc apply to email; ignored for slack.
connection.needs_reauthconnection.disconnectedmember.joinedmember.removedmember.roles_updatedinvite.sentinvite.revokedrole.createdrole.updatedrole.deletedrestriction.updatedconnector.createdconnector.destination_changedapi_token.createdapi_token.revokedsso_connection.createdsso_connection.updatedmfa.disabledteam.member_addedteam.member_removed+ 8 more
Immutable after creation.
slackemail
Slack incoming-webhook URL. Ignored for type: "email".
Response Body
Non-secret settings. to/cc/bcc apply to email; ignored for slack.
Fixed catalog of org events this destination is subscribed to.
connection.needs_reauthconnection.disconnectedmember.joinedmember.removedmember.roles_updatedinvite.sentinvite.revokedrole.createdrole.updatedrole.deletedrestriction.updatedconnector.createdconnector.destination_changedapi_token.createdapi_token.revokedsso_connection.createdsso_connection.updatedmfa.disabledteam.member_addedteam.member_removed+ 8 more
Notification destination id (onfd_…).
Paused destinations keep their config but forward nothing.
okfailednull
Immutable after creation.
slackemail
curl -X POST 'https://api.elaichi.ai/notification-destination' \
-H 'Authorization: Bearer $ELAICHI_API_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"type":"slack","name":"your_name","is_active":true,"config":{},"webhook_url":"your_webhook_url","event_types":[]}'const body = {
"type": "slack",
"name": "your_name",
"is_active": true,
"config": {},
"webhook_url": "your_webhook_url",
"event_types": []
};
const response = await fetch('https://api.elaichi.ai/notification-destination', {
method: 'POST',
headers: {
'Authorization': 'Bearer ' + process.env.ELAICHI_API_TOKEN,
'Content-Type': 'application/json',
},
body: JSON.stringify(body),
});
const data = await response.json();
console.log(data);import os
import requests
url = "https://api.elaichi.ai/notification-destination"
headers = {
"Authorization": f"Bearer {os.environ['ELAICHI_API_TOKEN']}",
"Content-Type": "application/json",
}
payload = {
"type": "slack",
"name": "your_name",
"is_active": True,
"config": {},
"webhook_url": "your_webhook_url",
"event_types": []
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())