Create a notification target
const url = 'http://localhost:3000/api/v1/notification-targets';const options = { method: 'POST', headers: {'X-API-Key': '<X-API-Key>', 'Content-Type': 'application/json'}, body: '{"name":"Ops on-call email","channel":"EMAIL","email":"ops@example.com","url":"https://hooks.example.com/services/T000/B000/XXXX","headers":{"X-Tenant-Token":"abc123"},"enabled":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url http://localhost:3000/api/v1/notification-targets \ --header 'Content-Type: application/json' \ --header 'X-API-Key: <X-API-Key>' \ --data '{ "name": "Ops on-call email", "channel": "EMAIL", "email": "ops@example.com", "url": "https://hooks.example.com/services/T000/B000/XXXX", "headers": { "X-Tenant-Token": "abc123" }, "enabled": true }'A WEBHOOK target is assigned a server-generated HMAC-SHA256 signing secret. That secret is returned in THIS response only and is never readable again; replace it with POST /:id/rotate-secret. A client cannot choose the secret (FM-1660).
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”UUID of the organization (tenant) the request acts in. It selects the tenant and grants nothing: the server checks membership or an open tenant switch. Not needed for global operations. A malformed value returns 400. API keys are fixed to their own organization; another organization returns 403. The x-organization-source header grants nothing.
Request Bodyrequired
Section titled “Request Bodyrequired”object
Human-readable target name
Example
Ops on-call emailDelivery transport
Recipient address. Required when channel is EMAIL.
Example
ops@example.comEndpoint to POST to. Required when channel is WEBHOOK. Must be a public http(s) URL — private, loopback, link-local and in-cluster addresses are rejected to prevent SSRF.
Example
https://hooks.example.com/services/T000/B000/XXXXExtra headers sent on every webhook delivery. WEBHOOK only. Values are write-only: responses show the names with a masked value. At most 20; Host, Content-Length, Content-Type, Transfer-Encoding, Connection and the X-Webhook-* headers are reserved.
object
Example
{ "X-Tenant-Token": "abc123"}Whether the target receives deliveries
Responses
Section titled “Responses”object
EMAIL targets only
object
WEBHOOK targets only
object
WEBHOOK targets only. Header names with a masked value (********): the values are write-only because they often carry credentials (FM-1660).
object
Whether webhook deliveries to this target are signed
HMAC-SHA256 signing key for webhook deliveries. Shown once, on creation, and never returned again. Store it in the receiving system to verify X-Webhook-Signature.
object
Example
{ "name": "Ops on-call email", "channel": "EMAIL"}Missing channel-specific field, or a webhook URL pointing at a private, loopback, link-local or in-cluster address