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
}
]
}
'import requests
url = "https://{tenant}.cubecloud.dev/api/v1/deployments/{deploymentId}/notifications/{id}/recipients"
payload = { "recipients": [
{
"channelId": "<string>",
"channelName": "<string>",
"email": "<string>",
"embedTenantName": "<string>",
"externalId": "<string>",
"groups": ["<string>"],
"securityContext": {},
"userAttributes": [
{
"name": "<string>",
"value": "<string>"
}
],
"userId": 123
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
recipients: [
{
channelId: '<string>',
channelName: '<string>',
email: '<string>',
embedTenantName: '<string>',
externalId: '<string>',
groups: ['<string>'],
securityContext: {},
userAttributes: [{name: '<string>', value: '<string>'}],
userId: 123
}
]
})
};
fetch('https://{tenant}.cubecloud.dev/api/v1/deployments/{deploymentId}/notifications/{id}/recipients', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{tenant}.cubecloud.dev/api/v1/deployments/{deploymentId}/notifications/{id}/recipients",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'recipients' => [
[
'channelId' => '<string>',
'channelName' => '<string>',
'email' => '<string>',
'embedTenantName' => '<string>',
'externalId' => '<string>',
'groups' => [
'<string>'
],
'securityContext' => [
],
'userAttributes' => [
[
'name' => '<string>',
'value' => '<string>'
]
],
'userId' => 123
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{tenant}.cubecloud.dev/api/v1/deployments/{deploymentId}/notifications/{id}/recipients"
payload := strings.NewReader("{\n \"recipients\": [\n {\n \"channelId\": \"<string>\",\n \"channelName\": \"<string>\",\n \"email\": \"<string>\",\n \"embedTenantName\": \"<string>\",\n \"externalId\": \"<string>\",\n \"groups\": [\n \"<string>\"\n ],\n \"securityContext\": {},\n \"userAttributes\": [\n {\n \"name\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"userId\": 123\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{tenant}.cubecloud.dev/api/v1/deployments/{deploymentId}/notifications/{id}/recipients")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"recipients\": [\n {\n \"channelId\": \"<string>\",\n \"channelName\": \"<string>\",\n \"email\": \"<string>\",\n \"embedTenantName\": \"<string>\",\n \"externalId\": \"<string>\",\n \"groups\": [\n \"<string>\"\n ],\n \"securityContext\": {},\n \"userAttributes\": [\n {\n \"name\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"userId\": 123\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenant}.cubecloud.dev/api/v1/deployments/{deploymentId}/notifications/{id}/recipients")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"recipients\": [\n {\n \"channelId\": \"<string>\",\n \"channelName\": \"<string>\",\n \"email\": \"<string>\",\n \"embedTenantName\": \"<string>\",\n \"externalId\": \"<string>\",\n \"groups\": [\n \"<string>\"\n ],\n \"securityContext\": {},\n \"userAttributes\": [\n {\n \"name\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"userId\": 123\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"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>"
}
]
}Notifications
Add notification recipients
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
}
]
}
'import requests
url = "https://{tenant}.cubecloud.dev/api/v1/deployments/{deploymentId}/notifications/{id}/recipients"
payload = { "recipients": [
{
"channelId": "<string>",
"channelName": "<string>",
"email": "<string>",
"embedTenantName": "<string>",
"externalId": "<string>",
"groups": ["<string>"],
"securityContext": {},
"userAttributes": [
{
"name": "<string>",
"value": "<string>"
}
],
"userId": 123
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
recipients: [
{
channelId: '<string>',
channelName: '<string>',
email: '<string>',
embedTenantName: '<string>',
externalId: '<string>',
groups: ['<string>'],
securityContext: {},
userAttributes: [{name: '<string>', value: '<string>'}],
userId: 123
}
]
})
};
fetch('https://{tenant}.cubecloud.dev/api/v1/deployments/{deploymentId}/notifications/{id}/recipients', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{tenant}.cubecloud.dev/api/v1/deployments/{deploymentId}/notifications/{id}/recipients",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'recipients' => [
[
'channelId' => '<string>',
'channelName' => '<string>',
'email' => '<string>',
'embedTenantName' => '<string>',
'externalId' => '<string>',
'groups' => [
'<string>'
],
'securityContext' => [
],
'userAttributes' => [
[
'name' => '<string>',
'value' => '<string>'
]
],
'userId' => 123
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{tenant}.cubecloud.dev/api/v1/deployments/{deploymentId}/notifications/{id}/recipients"
payload := strings.NewReader("{\n \"recipients\": [\n {\n \"channelId\": \"<string>\",\n \"channelName\": \"<string>\",\n \"email\": \"<string>\",\n \"embedTenantName\": \"<string>\",\n \"externalId\": \"<string>\",\n \"groups\": [\n \"<string>\"\n ],\n \"securityContext\": {},\n \"userAttributes\": [\n {\n \"name\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"userId\": 123\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{tenant}.cubecloud.dev/api/v1/deployments/{deploymentId}/notifications/{id}/recipients")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"recipients\": [\n {\n \"channelId\": \"<string>\",\n \"channelName\": \"<string>\",\n \"email\": \"<string>\",\n \"embedTenantName\": \"<string>\",\n \"externalId\": \"<string>\",\n \"groups\": [\n \"<string>\"\n ],\n \"securityContext\": {},\n \"userAttributes\": [\n {\n \"name\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"userId\": 123\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenant}.cubecloud.dev/api/v1/deployments/{deploymentId}/notifications/{id}/recipients")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"recipients\": [\n {\n \"channelId\": \"<string>\",\n \"channelName\": \"<string>\",\n \"email\": \"<string>\",\n \"embedTenantName\": \"<string>\",\n \"externalId\": \"<string>\",\n \"groups\": [\n \"<string>\"\n ],\n \"securityContext\": {},\n \"userAttributes\": [\n {\n \"name\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"userId\": 123\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"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 SLACK — not 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
Token authentication. Send Authorization: Bearer <YOUR_TOKEN>.
Path Parameters
Numeric id of the deployment that owns the notification.
Numeric id of the notification (scheduled run).
Body
application/json
AddNotificationRecipientsInput
Recipients to subscribe (1–1000 per request)
Required array length:
1 - 1000 elementsShow child attributes
Show child attributes
Response
200 - application/json
Recipients newly subscribed by this request
Show child attributes
Show child attributes
Recipients that already existed and were left unchanged
Show child attributes
Show child attributes
Existing recipients whose properties (e.g. embed security context / attributes / groups, or Slack channel name) were updated
Show child attributes
Show child attributes
⌘I