Escalation
Get Escalation Config
Returns the escalation config for an organization. The :id parameter is the organization ID. If no config is saved yet, the inactive defaults are returned (`id`, `createdAt` and `updatedAt` are `null`) and nothing is created; the first PATCH stores them.
GET /api/escalation-config/:id
Also returns the organization's default notification settings and all notification channels.
Header values are never returned: webhookHeaders keeps the header names with null values, and hasWebhookHeaders says whether any header is stored. The same holds for config.headers of the channels in notificationChannels (names with null, plus hasHeaders). Header values are stored encrypted.
Example (cURL)
curl -X GET "$BASE_URL/api/escalation-config/1" \
-H "Authorization: Bearer $TOKEN" \
-H "Accept: application/json"Response
{
"id": 1,
"organizationId": 1,
"webhookUrl": "https://deinkunde.com/webhook",
"webhookMethod": "POST",
"webhookHeaders": { "Content-Type": null },
"hasWebhookHeaders": true,
"webhookBodyTemplate": "{\"websiteName\":\"{{websiteName}}\",...}",
"webhookTimeout": 30,
"webhookRetryAttempts": 3,
"webhookRetryDelay": 60,
"expectedStatusCodes": "200,201,202,204",
"isActive": false,
"lastTestedAt": null,
"lastTestStatus": null,
"lastTestError": null,
"organization": {
"defaultEmail": "ops@deinkunde.com",
"defaultPhoneNumber": "+1234567890",
"defaultNotificationChannels": null,
"defaultNotificationTargets": null,
"defaultNotificationRules": null
},
"notificationChannels": []
}Common errors
401 Unauthorizedwhen not authenticated403 Forbiddenunless you are an organization admin with unrestricted scope (forbidden, orcustomerScopedTokenForbiddenfor a customer-bound token or login). The response contains the webhook URL, headers and body template, so read access is not enough.