Skip to main content
POST
/
Create a new notification group
curl --request POST \
  --url https://api.altostrat.io/ \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "<string>",
  "schedule_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "mute": "schedule-active",
  "recipients": [
    "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  ],
  "topics": [
    "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  ],
  "sites": [
    "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  ],
  "notifiables": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "channel": "whatsapp"
    }
  ]
}'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "name": "<string>",
  "schedule_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "mute": "schedule-active",
  "recipients": [
    "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  ],
  "notifiables": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "channel": "<string>"
    }
  ],
  "topics": [
    "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  ],
  "sites": [
    "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  ],
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Group creation payload

name
string
required
Maximum length: 100
schedule_id
string<uuid>
required
mute
enum<string>
required
Available options:
schedule-active,
schedule-inactive,
never,
always
topics
string<uuid>[]
required

Array of topic IDs

sites
string<uuid>[]
required

Array of site IDs

recipients
string<uuid>[]

Legacy usage, array of user IDs (uuid) only. If provided, default channel=whatsapp. If not provided, use 'notifiables' array.

notifiables
object[]

If recipients is omitted, can specify more direct objects: [ { id: 'uuid', channel: 'whatsapp' }, ... ]

Response

Group successfully created

id
string<uuid>
name
string
schedule_id
string<uuid>
mute
enum<string>
Available options:
schedule-active,
schedule-inactive,
never,
always
recipients
string<uuid>[]

List of user IDs for the group

notifiables
object[]

Detailed list with channels

topics
string<uuid>[]

Topic ID references

sites
string<uuid>[]

Site ID references

created_at
string<date-time>
updated_at
string<date-time>
I