Skip to content

Create a notification target

POST
/notification-targets
curl --request POST \
--url https://example.com/api/v1/notification-targets \
--header 'Content-Type: application/json' \
--data '{ "addresses": [ "example" ], "channels": [ "example" ], "enabled": true, "kind": "webhook", "label": "example", "name": "example", "role": "example", "secret": "example", "url": "example", "user": "example", "user_group": "example" }'

Adds a destination a notification can be sent to: a webhook, its URL and, optionally, the platform secret it signs or authenticates with; or people, a user_group (every person in the group, read at each alarm transition), one user, or a role (every person holding it, directly or through a group grant, read at each alarm transition), on the channels named. A person is told only about an alarm on a component their own component read scope admits. Binding a group takes user_group:read:admin, binding a person user:read:admin, and binding a role role:read:admin and user:read:admin (a 403 without it), since the target reaches whoever they name. Binding a secret takes the right to bind it (secret:bind, and the admin tier for an admin-sensitive one), since every send hands it to the URL: a secret the caller cannot read is a 404, one it can read but not bind a 403. A URL the egress contract refuses under the allow list in force, an unknown kind, or a secret that is not a platform hmac-key or bearer-token is a 422; a taken name a 409. Audited, the URL masked. Gated by notification_target:create with an all-scope grant.

Media type application/json
object
$schema

A URL to the JSON Schema for this object.

string format: uri
addresses

An email target’s recipient addresses

Array<string> | null
channels

A group, person or role target’s channels: inbox, email

Array<string> | null
enabled

Whether deliveries go to it (default true)

boolean
kind
required

The target kind

string
Allowed values: webhook email user_group user role
label

A human label

string
name
required

The target’s name (lowercase kebab)

string
>= 1 characters
role

A role target’s role, by name or uuid; binding one takes role:read:admin and user:read:admin, since it reaches whoever holds the role

string
secret

A platform secret, by name or uuid, of type hmac-key (signs each body) or bearer-token (sent as Authorization: Bearer)

string
url

A webhook’s destination URL: https, or plain http to a host or address the notification.egress_allow setting names. A private, loopback or link-local destination is refused at send unless that setting names it; a cloud metadata address always is

string
user

A user target’s person, by username or uuid; binding one takes user:read:admin

string
user_group

A user_group target’s group, by name or uuid; binding one takes user_group:read:admin

string

Created

Media type application/json

Where a notification goes, a webhook, a mailbox, a user group or a person.

object
$schema

A URL to the JSON Schema for this object.

string format: uri
addresses

An email target’s recipients: a shared mailbox, sent through the install’s mail relay

Array<string> | null
auth
required

How a send proves itself: hmac signs each body with the bound hmac-key (X-Omniglass-Signature), bearer presents the bound bearer-token, none sends unsigned

string
Allowed values: none hmac bearer
channels

The channels a group or person target delivers on: inbox (the console inbox) and email (each person’s directory email)

Array<string> | null
created_at
required
string format: date-time
enabled
required

Whether deliveries go to it; a disabled target is skipped

boolean
id
required

The target’s uuid, the stable form of name

string
kind
required

The target kind: webhook posts a signed JSON envelope to the URL; email sends to fixed addresses through the install’s mail relay; user_group reaches every person in a group, read at each alarm transition; user reaches one person; role reaches every person holding the role, directly or through a group grant, read at each alarm transition. A person is told only about alarms on components they can read

string
Allowed values: webhook email user_group user role
label
string
name
required
string
official
required

Shipped with Omniglass by the boot seed: only its label and enabled switch are the operator’s, and it cannot be deleted

boolean
role

The role a role target reaches the holders of, by name; shown to a caller who reads roles (role:read:admin, all-scope)

string
role_id

The role’s uuid

string
secret

The platform secret the send signs (an hmac-key) or authenticates (a bearer-token) with, by name; absent sends unsigned

string
secret_id

The bound secret’s uuid, the stable form of secret

string
updated_at
required
string format: date-time
url

A webhook’s destination, masked to its scheme and host (the path and query often carry a credential); :reveal returns it whole

string
user

The person a user target reaches, by username; shown to a caller who reads the user directory (user:read:admin, all-scope)

string
user_group

The group a user_group target reaches, by name; shown to a caller who reads the group directory (user_group:read:admin, all-scope)

string
user_group_id

The group’s uuid

string
user_id

The person’s uuid

string

Example

{
"$schema": "/api/v1/schemas/NotificationTargetBody.json",
"auth": "none",
"kind": "webhook"
}

Error

Media type application/problem+json
object
$schema

A URL to the JSON Schema for this object.

string format: uri
detail

A human-readable explanation specific to this occurrence of the problem.

string
errors

Optional list of individual error details

Array<object> | null
object
location

Where the error occurred, e.g. ‘body.items[3].tags’ or ‘path.thing-id’

string
message

Error message text

string
value

The value at the given location

instance

A URI reference that identifies the specific occurrence of the problem.

string format: uri
status

HTTP status code

integer format: int64
title

A short, human-readable summary of the problem type. This value should not change between occurrences of the error.

string
type

A URI reference to human-readable documentation for the error.

string format: uri
default: about:blank

Example

{
"$schema": "/api/v1/schemas/ErrorModel.json",
"detail": "Property foo is required but is missing.",
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "about:blank"
}