Skip to content

Add a notification target to a service.

POST
/service/{service_id}/notification_target
curl --request POST \
--url https://api.siteqwality.com/service/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/notification_target \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "type": "slack_channel", "details": "example", "confirm_external_recipients": true, "integration_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "min_severity": "minor", "events": [ "example" ] }'
service_id
required
string format: uuid

Service identifier

Media type application/json
object
type
required
string
Allowed values: slack_channel webhook email
details
required
confirm_external_recipients

Required (true) for an email target with an address outside the members’ domains; without it that target answers 409 email_target_confirmation_required.

boolean
integration_id

Send with this connected integration instead of a pasted token or URL: a Slack integration for slack_channel (details {channel}), a webhook integration for webhook (details {}).

string | null format: uuid
min_severity
One of:

Skip incidents below this severity. Compared with the highest severity the incident reached.

string
Allowed values: minor major critical
events

Only these lifecycle events: incident_opened, incident_acknowledged, incident_updated, incident_resolved, incident_reopened, incident_merged, incident_service_changed.

array | null

Notification target created. A pasted-URL webhook target carries its signing_secret here, once

Media type application/json
object
id
required
string format: uuid
service_id
required
string format: uuid
type
required
string
Allowed values: slack_channel webhook email
details
required

Stored details with a webhook URL cut to its host; a Slack token reads back as has_token: true.

created_at
required
string format: date-time
integration_id

The connected integration this target sends with, when it uses one.

string | null format: uuid
min_severity
One of:

Lifecycle events of incidents below this severity are not sent; absent sends every severity.

string
Allowed values: minor major critical
events

The lifecycle events this target takes; absent takes every one.

array | null
signing_secret

A pasted-URL webhook’s signing secret, returned once on create and never again.

string | null
Example
{
"type": "slack_channel",
"min_severity": "minor"
}

Invalid request body, an unknown event, or an integration that cannot back this target type

Missing or invalid authentication

Service or integration not found

The service has 20 targets (service_target_limit_reached), or an email address outside the members’ domains needs confirm_external_recipients (email_target_confirmation_required)

Internal server error