Skip to main content
POST
/
v1
/
organizations
/
{id}
/
broadcast
Broadcast a push notification to organization members (admin only)
curl --request POST \
  --url http://0.0.0.0:3000/v1/organizations/{id}/broadcast \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "user_ids": [],
  "title": "Aviso",
  "message": "Manutenção amanhã às 14h"
}
'
{
  "totalRecipients": 3,
  "devicesNotified": 4,
  "recipientsWithoutDevices": [
    "user_xyz"
  ]
}

Authorizations

Authorization
string
header
required

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

Path Parameters

id
string
required

ID da organização

Body

application/json
message
string
required
user_ids
string[]

IDs dos destinatários. Vazio = todos os membros

title
string | null
data
object

Response

Broadcast dispatched

totalRecipients
integer
devicesNotified
integer
recipientsWithoutDevices
string[]