Skip to content
PATCH /notification-destination/{id}

Request Body

configRecord<string, any>

Settings for the type. Each field is optional.

event_typesstring[]

Replaces the destination's event types.

is_activeboolean
labelstring
typestring
Possible values:
slackemail

Response Body

configobject

The destination's settings. The shape depends on type.

One of
Slack · 2 properties
ignored_status_codesnumber[]

For api_errors events, HTTP status codes not to notify about.

Example: [404]
webhook_urlstring

A Slack incoming webhook URL. Returned masked as ********. A PATCH that sends ******** back, or leaves the field out, keeps the stored URL.

Example: https://hooks.slack.com/services/T000/B000/XXXX
Email · 4 properties
bccstring[]
ccstring[]
subject_prefixstring
Example: [Truto]
tostring[]
Example: ["alerts@example.com"]
created_atstring · date-time
environment_idstring · uuid
event_typesstring[]

The notification event types this destination receives.

Example: ["api_errors","integrated_account:created"]
idstring · uuid

The ID of the notification destination.

is_activeboolean

Whether notifications are sent to this destination.

labelstring
Example: Ops channel
typestring
Possible values:
slackemail
updated_atstring · date-time
curl -X PATCH 'https://api.truto.one/notification-destination/{id}' \
  -H 'Authorization: Bearer <your_api_token>' \
  -H 'Content-Type: application/json' \
  -d '{
  "type": "slack",
  "config": {},
  "label": "your_label",
  "is_active": true,
  "event_types": []
}'
const body = {
  "type": "slack",
  "config": {},
  "label": "your_label",
  "is_active": true,
  "event_types": []
};

const response = await fetch('https://api.truto.one/notification-destination/{id}', {
  method: 'PATCH',
  headers: {
    'Authorization': 'Bearer <your_api_token>',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify(body),
});

const data = await response.json();
console.log(data);
import requests

url = "https://api.truto.one/notification-destination/{id}"
headers = {
    "Authorization": "Bearer <your_api_token>",
    "Content-Type": "application/json",
}
params = {
}
payload = {
    "type": "slack",
    "config": {},
    "label": "your_label",
    "is_active": True,
    "event_types": []
}

response = requests.patch(url, headers=headers, params=params, json=payload)
print(response.json())