v2

latestOpenAPI 3.1.02026-07-312303692.4 MB
Broadcast

Create Broadcast Message

Creates a background task to send the same message to each application in your organization.

A completed task will return a payload like the following:

{
  "id": "qtask_33qen93MNuelBAq1T9G7eHLJRsF",
  "status": "finished",
  "task": "message.broadcast",
  "data": {
    "messagesCreated": [
      {
        "appId": "app_33s1An2Zz5cO9SWbhHsYyDmVC6m",
        "msgId": "msg_33s1An2Zz5cO9SWbhHsYyDmVC6m"
      },
      {
        "appId": "app_33sXYjcO6bkWeZIXDI8w6ZYMivz",
        "msgId": "msg_33sZJfmYMOQGApyIgRdteOX0xlX"
      }
    ]
  }
}
post/api/v1/msg/broadcast

Headers

idempotency-keystring

The request's idempotency key

Request body

eventIdstring nullable

Optional unique identifier for the message.

eventTypestring required

The event type's name

payloadobject required
channelsstring[] nullable

List of free-form identifiers that endpoints can filter by.

payloadRetentionPeriodinteger nullable

Optional number of days to retain the message payload. Defaults to 90. Note that this is mutually exclusive with payloadRetentionHours.

payloadRetentionHoursinteger nullable

Optional number of hours to retain the message payload. Note that this is mutually exclusive with payloadRetentionPeriod.

Example request

{
  "eventId": "unique-identifier",
  "eventType": "user.signup",
  "payload": {
    "type": "user.created",
    "email": "test@example.com",
    "username": "test_user"
  },
  "channels": [
    "project_123",
    "group_2"
  ],
  "payloadRetentionPeriod": 90
}

Response

idstring required

The QueueBackgroundTask's ID.

status'running' | 'finished' | 'failed' required
task'endpoint.replay' | 'endpoint.recover' | 'application.stats' | 'message.broadcast' | 'sdk.generate' | 'event-type.aggregate' | 'application.purge_content' | 'endpoint.bulk-replay' required
updatedAtstring date-time required

Example response

{
  "id": "qtask_1srOrx2ZWZBpBUvZwXKQmoEYga2"
}