Skip to main content
POST
/
v1
/
deployments
/
{deploymentId}
/
notifications
/
{id}
/
recipients
Add notification recipients
curl --request POST \
  --url https://{tenant}.cubecloud.dev/api/v1/deployments/{deploymentId}/notifications/{id}/recipients \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "recipients": [
    {
      "channelId": "<string>",
      "channelName": "<string>",
      "email": "<string>",
      "embedTenantName": "<string>",
      "externalId": "<string>",
      "groups": [
        "<string>"
      ],
      "securityContext": {},
      "userAttributes": [
        {
          "name": "<string>",
          "value": "<string>"
        }
      ],
      "userId": 123
    }
  ]
}
'
{
  "createdRecipients": [
    {
      "channelId": "<string>",
      "channelName": "<string>",
      "email": "<string>",
      "embedTenantName": "<string>",
      "embedUserId": 123,
      "externalId": "<string>",
      "userId": 123,
      "username": "<string>"
    }
  ],
  "unchangedRecipients": [
    {
      "channelId": "<string>",
      "channelName": "<string>",
      "email": "<string>",
      "embedTenantName": "<string>",
      "embedUserId": 123,
      "externalId": "<string>",
      "userId": 123,
      "username": "<string>"
    }
  ],
  "updatedRecipients": [
    {
      "channelId": "<string>",
      "channelName": "<string>",
      "email": "<string>",
      "embedTenantName": "<string>",
      "embedUserId": 123,
      "externalId": "<string>",
      "userId": 123,
      "username": "<string>"
    }
  ]
}
🔒 Admin only. Requires administrator privileges — the authenticated principal (API key, embed JWT, or any bearer token) must belong to a user with the admin role. Subscribes one or more recipients (1–1000 per request) to a notification. Each recipient is one of: a main console USER (identified by userId or email); an EMBED_USER (identified by embedTenantName + externalId, auto-provisioned if it does not yet exist, and optionally given securityContext, userAttributes, and groups that drive per-recipient rendering); or SLACKnot yet supported, a request containing a Slack recipient is rejected with 400. Every recipient must resolve to a valid email (an embed user’s email, or an email-shaped externalId); otherwise the whole request fails with 400 before anything is written. The operation is idempotent: the response buckets each recipient into createdRecipients, updatedRecipients (an existing recipient whose embed properties changed), or unchangedRecipients.

Authorizations

Authorization
string
header
required

Token authentication. Send Authorization: Bearer <YOUR_TOKEN>.

Path Parameters

deploymentId
integer
required

Numeric id of the deployment that owns the notification.

id
integer
required

Numeric id of the notification (scheduled run).

Body

application/json

AddNotificationRecipientsInput

recipients
object[]
required

Recipients to subscribe (1–1000 per request)

Required array length: 1 - 1000 elements

Response

200 - application/json
createdRecipients
object[]
required

Recipients newly subscribed by this request

unchangedRecipients
object[]
required

Recipients that already existed and were left unchanged

updatedRecipients
object[]
required

Existing recipients whose properties (e.g. embed security context / attributes / groups, or Slack channel name) were updated