Skip to content
POST /notification-destination/test

Sends a test notification to the destination and waits for the result. A 200 means Slack or the mail service accepted it; a 502 means it refused it.

Request Body

idstring · uuid

The notification destination to test.

Response Body

successboolean
Example: true

Errors

StatusDescription
400id is missing.
404Notification destination not found
502The test notification was not delivered. For Slack, message carries the status Slack returned plus at most the first 200 characters of its response. For email, message is a fixed text; the mail service's own error is not returned.
curl -X POST 'https://api.truto.one/notification-destination/test' \
  -H 'Authorization: Bearer <your_api_token>' \
  -H 'Content-Type: application/json' \
  -d '{
  "id": "your_id"
}'
const body = {
  "id": "your_id"
};

const response = await fetch('https://api.truto.one/notification-destination/test', {
  method: 'POST',
  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/test"
headers = {
    "Authorization": "Bearer <your_api_token>",
    "Content-Type": "application/json",
}
params = {
}
payload = {
    "id": "your_id"
}

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