---
title: "Add notification recipients"
method: POST
path: "/api/v1/deployments/{deploymentId}/notifications/{id}/recipients"
tags: ["Notifications"]
---

# Add notification recipients

`POST /api/v1/deployments/{deploymentId}/notifications/{id}/recipients`

## Path parameters

- `deploymentId` integer, required
- `id` integer, required

## Request body

- AddNotificationRecipientsInput
  - `recipients` NotificationRecipientInput[], required — Recipients to subscribe (1–1000 per request)
    - `channelId` string, nullable — Slack channel id (for type=SLACK)
    - `channelName` string, nullable — Slack channel display name (optional, for type=SLACK)
    - `email` string, nullable — Main user email (for type=USER; provide this OR userId)
    - `embedTenantName` string, nullable — Embed tenant name (for type=EMBED_USER)
    - `externalId` string, nullable — Embed user external id (for type=EMBED_USER)
    - `groups` string[], nullable — Embed user groups (type=EMBED_USER). Must reference groups that already exist; drives per-recipient access when the report is rendered.
    - `securityContext` object, nullable — Embed user security context (type=EMBED_USER). Applied for per-recipient row-level security when the report is rendered.
    - `type` 'USER' | 'EMBED_USER' | 'SLACK', required
    - `userAttributes` UserAttributeInput[], nullable — Embed user attribute values (type=EMBED_USER). Names must reference attribute definitions that already exist.
      - `name` string, required
      - `value` union
        - string
        - number
        - boolean
        - string[]
        - number[]
    - `userId` integer, nullable — Main user id (for type=USER; provide this OR email)

## Response `200`

- NotificationRecipientsMutationResponse
  - `createdRecipients` NotificationRecipient[], required — Recipients newly subscribed by this request
    - `channelId` string, nullable
    - `channelName` string, nullable
    - `email` string, nullable
    - `embedTenantName` string, nullable
    - `embedUserId` integer, nullable
    - `externalId` string, nullable
    - `type` 'USER' | 'EMBED_USER' | 'SLACK', required
    - `userId` integer, nullable
    - `username` string, nullable
  - `unchangedRecipients` NotificationRecipient[], required — Recipients that already existed and were left unchanged
    - `channelId` string, nullable
    - `channelName` string, nullable
    - `email` string, nullable
    - `embedTenantName` string, nullable
    - `embedUserId` integer, nullable
    - `externalId` string, nullable
    - `type` 'USER' | 'EMBED_USER' | 'SLACK', required
    - `userId` integer, nullable
    - `username` string, nullable
  - `updatedRecipients` NotificationRecipient[], required — Existing recipients whose properties (e.g. embed security context / attributes / groups, or Slack channel name) were updated
    - `channelId` string, nullable
    - `channelName` string, nullable
    - `email` string, nullable
    - `embedTenantName` string, nullable
    - `embedUserId` integer, nullable
    - `externalId` string, nullable
    - `type` 'USER' | 'EMBED_USER' | 'SLACK', required
    - `userId` integer, nullable
    - `username` string, nullable

---

[API](https://skmtc.net/cube-js/apis/cube-cloud-rest-api.md) · [All operations](https://skmtc.net/cube-js/apis/cube-cloud-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/cube-js/cube-cloud-rest-api/revisions/a0c6b1d2ac96/schema)
