Message

Quickly Create a Batch of Messages

Changed on

Creates a batch of messages in a fire-or-forget fashion.

This is the fastest and most-scalable way to create messages, but doesn't allow you to detect if your message failed certain validation steps (e.g., the eventId uniqueness check), and doesn't provide any back-pressure in the event of rate-limit exhaustion. Otherwise very similar to the v1.create.message action.

The entire batch may not exceed 5MB, and each individual payload may not exceed 1MiB; it's generally a good idea to keep webhook payloads under 40KiB.

post/api/v1/app/{app_id}/msg/batch

Request

Path parameters

app_idstring required

The Application's ID or UID.

Example:unique-identifier

Headers

idempotency-keystring

The request's idempotency key

Request body

Example request

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

Response

EmptyResponse required

Changes