Create or update a Slack or Teams notification destination
const url = 'https://example.com/v1/console/notify-destinations';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"kind":"slack","name":"example","webhook_url":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://example.com/v1/console/notify-destinations \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "kind": "slack", "name": "example", "webhook_url": "example" }'Creates or updates a Slack or Teams destination: the webhook URL is checked against the vendor’s hosts, sealed, stored in the deployment settings and opened without a restart. A blank URL keeps the stored one.
Authorizations
Section titled “ Authorizations ”Request Body required
Section titled “ Request Body required ”object
The vendor’s incoming-webhook URL. Sealed on save and never returned. Blank keeps the stored value.
Responses
Section titled “ Responses ”OK
object
Example
{ "source": "console"}Bad request
object
object
With code module_not_enabled: the namespace of the module this node does not run.
Example generated
{ "error": { "code": "example", "message": "example", "module": "example" }}Unauthenticated
object
object
With code module_not_enabled: the namespace of the module this node does not run.
Example generated
{ "error": { "code": "example", "message": "example", "module": "example" }}Forbidden
object
object
With code module_not_enabled: the namespace of the module this node does not run.
Example generated
{ "error": { "code": "example", "message": "example", "module": "example" }}Not found
object
object
With code module_not_enabled: the namespace of the module this node does not run.
Example generated
{ "error": { "code": "example", "message": "example", "module": "example" }}Conflict / setup required
object
object
With code module_not_enabled: the namespace of the module this node does not run.
Example generated
{ "error": { "code": "example", "message": "example", "module": "example" }}Rate limited
object
object
With code module_not_enabled: the namespace of the module this node does not run.
Example generated
{ "error": { "code": "example", "message": "example", "module": "example" }}