---
openapi: 3.0.3
info:
  title: Braze REST API – Send transactional emails using API-triggered delivery
  description: |
    ## Prerequisites

    To use this endpoint, you'll need to generate an API key with the `transactional.send` permission.

    ## Rate limit

    The `/transactional/v1/campaigns/{campaign_id}/send` endpoint has a paid hourly allotment measured in units (for example, 50,000 units per hour, depending on your package). This endpoint has no separate per-endpoint rate limit. Requests above your allotment still send, but only the allotted volume is covered by SLA. Within the SLA-covered volume, 99.9% of emails send in less than one minute. The transactional volume count resets each hour.

    Requests to this endpoint don't count toward your [overall external API rate limit]({{site.baseurl}}/api/api_limits/). This endpoint bypasses standard REST API rate limiting, so it doesn't return the standard `X-RateLimit-*` response headers or `429` responses for exceeded limits. For more information, contact Braze Support.
  version: 1.0.0
  contact:
    name: Braze Support
    url: https://www.braze.com/docs/braze_support/
  license:
    name: Braze Documentation
    url: https://www.braze.com/docs/api/home/
servers:
  - url: https://rest.iad-01.braze.com
    description: US-01
  - url: https://rest.iad-02.braze.com
    description: US-02
  - url: https://rest.iad-03.braze.com
    description: US-03
  - url: https://rest.iad-04.braze.com
    description: US-04
  - url: https://rest.iad-05.braze.com
    description: US-05
  - url: https://rest.iad-06.braze.com
    description: US-06
  - url: https://rest.iad-07.braze.com
    description: US-07
  - url: https://rest.iad-08.braze.com
    description: US-08
  - url: https://rest.us-10.braze.com
    description: US-10
  - url: https://rest.fra-01.braze.eu
    description: EU-01
  - url: https://rest.fra-02.braze.eu
    description: EU-02
  - url: https://rest.au-01.braze.com
    description: AU-01
  - url: https://rest.id-01.braze.com
    description: ID-01
  - url: https://rest.jp-01.braze.com
    description: JP-01
  - url: https://rest.kr-01.braze.com
    description: KR-01
security:
- BearerAuth: []
# cspell:ignore triggerable
paths:
  "/transactional/v1/campaigns/{campaign_id}/send":
    post:
      summary: Send transactional emails using API-triggered delivery
      operationId: post_transactional_v1_campaigns_campaign_id_send_post_send_transactional_message
      parameters:
        - name: campaign_id
          in: path
          required: true
          description: ID of the campaign
          schema:
            type: string
          example: campaign_identifier
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SendTransactionalMessageRequest'
            examples:
              external_user_id:
                summary: Send to an external user ID
                value:
                  external_send_id: YOUR_BASE64_COMPATIBLE_ID
                  trigger_properties:
                    example_string_property: YOUR_EXAMPLE_STRING
                    example_integer_property: YOUR_EXAMPLE_INTEGER
                  recipient:
                    external_user_id: TARGETED_USER_ID_STRING
              user_alias_with_attributes:
                summary: Send to a user alias and update attributes
                value:
                  recipient:
                    user_alias:
                      alias_name: example_name
                      alias_label: example_label
                    attributes:
                      first_name: Alex
      responses:
        "201":
          description: |
            The request was accepted and the transactional message was sent. The response includes a `dispatch_id`. No action needed.

            The Send transactional email endpoint responds with the message's `dispatch_id` which represents the instance of this message send. This identifier can be used along with events from the Transactional HTTP event postback to trace the status of an individual email sent to a single user.

            For the postback setup steps, payload, and message statuses, see [Transactional HTTP event postback](#transactional-http-event-postback) on this page or [Track transactional emails]({{site.baseurl}}/user_guide/channels/transactional_email/tracking/).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SendTransactionalMessageResponse'
              examples:
                success:
                  summary: Send accepted
                  value:
                    dispatch_id: example_dispatch_id
                    status: pending
        "400":
          description: |
            Bad request. To resolve it:

            - **The `campaign_id` in the path isn't in a valid format:** Pass the campaign ID shown in the transactional campaign's **API identifier** field.
            - **The `campaign_id` isn't a valid campaign API identifier:** Pass the campaign ID shown in the transactional campaign's **API identifier** field.
            - **No campaign matches the `campaign_id`:** Pass the ID of an existing transactional email campaign. This returns the same `campaign_id must be a string of the campaign api identifier` message.
            - **The campaign can't be triggered by the API:** Use a transactional email campaign, which uses API-triggered delivery.
            - **The campaign isn't a transactional email campaign:** Use a transactional email campaign, or send other campaigns with `/campaigns/trigger/send`.
            - **The campaign is archived:** Unarchive the campaign, then retry.
            - **The campaign is paused:** Resume the campaign, then retry.
            - **A send with this `external_send_id` was created recently:** Use a new `external_send_id` to send a new message. Braze deduplicates an `external_send_id` for 24 hours.
            - **The `external_send_id` isn't valid:** Pass an `external_send_id` of 1 to 255 characters that matches the regex in the request body description.
            - **The request doesn't include `recipient`:** Include a `recipient` object with an `external_user_id` or `user_alias`.
            - **The `recipient` doesn't include an `external_user_id` or `user_alias`:** Include a `recipient` object with an `external_user_id` or `user_alias`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                invalid_campaign_id_format:
                  summary: The campaign_id isn't in a valid format
                  value:
                    error: id is invalid
                bad_campaign_id:
                  summary: The campaign_id isn't a valid campaign API identifier
                  value:
                    error: campaign_id must be a string of the campaign api identifier
                not_api_triggered:
                  summary: The campaign can't be triggered by the API
                  value:
                    error: Campaign must be triggerable by API
                not_transactional:
                  summary: The campaign isn't a transactional email campaign
                  value:
                    error: The campaign is not a transactional campaign. Only transactional campaigns may use this endpoint
                campaign_archived:
                  summary: The campaign is archived
                  value:
                    error: The campaign is archived. Unarchive the campaign to ensure trigger requests will take effect.
                campaign_paused:
                  summary: The campaign is paused
                  value:
                    error: The campaign is paused. Resume the campaign to ensure trigger requests will take effect.
                external_send_id_queued:
                  summary: A send with this external_send_id was created recently
                  value:
                    error: The external reference has been queued.  Please retry to obtain send_id.
                external_send_id_invalid:
                  summary: The external_send_id isn't valid
                  value:
                    error: external_send_id is invalid
                recipient_missing:
                  summary: The request doesn't include recipient
                  value:
                    error: recipient is missing, recipient is invalid, recipient[user_alias], recipient[external_user_id] are missing, at least one parameter must be provided
                recipient_identifier_missing:
                  summary: The recipient has no user identifier
                  value:
                    error: recipient is invalid, recipient[user_alias], recipient[external_user_id] are missing, at least one parameter must be provided
        "401":
          description: |
            Unauthorized. To resolve it:

            - **The REST API key is missing, malformed, or sent to the wrong REST endpoint:** Send the key as `Authorization: Bearer YOUR_REST_API_KEY` to the correct [REST endpoint]({{site.baseurl}}/api/basics/#endpoints). For more causes, see [Errors and responses]({{site.baseurl}}/api/errors/#fatal-errors).
            - **The REST API key doesn't have the required permission:** Use a REST API key that has the `transactional.send` permission.
            - **The IP address sending the request isn't on the API key's IP allowlist:** Send the request from an allowlisted IP address, or update the API key's allowlist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                access_denied:
                  summary: Invalid API key or missing permission
                  value:
                    error: You do not have permission to access this resource
        5XX:
          description: |
            Internal server error. An unexpected error occurred on the Braze server. Retry with exponential backoff. If the error persists, contact [Support]({{site.baseurl}}/braze_support/).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: REST API key
      description: |
        REST API keys are created in the Braze dashboard at **Settings → APIs and
        Identifiers → API Keys**. The key must include the `transactional.send` permission.
        Pass the key as `Authorization: Bearer YOUR_REST_API_KEY`.
  schemas:
    UserAlias:
      title: User alias
      type: object
      required: [alias_name, alias_label]
      description: See [user alias object]({{site.baseurl}}/api/objects_filters/user_alias_object/).
      properties:
        alias_name:
          type: string
          example: example_name
        alias_label:
          type: string
          example: example_label
    TransactionalRecipient:
      title: Recipient
      type: object
      description: |
        Either `external_user_id` or `user_alias` is required. Requests must specify only one.
      properties:
        user_alias:
          allOf:
            - $ref: '#/components/schemas/UserAlias'
          description: User alias of the user to receive message.
        external_user_id:
          type: string
          description: External identifier of user to receive message.
          example: TARGETED_USER_ID_STRING
        attributes:
          type: object
          additionalProperties: true
          description: Fields in the attributes object create or update an attribute of that name with the given value on the specified user profile before the message is sent and existing values are overwritten.
          example:
            first_name: Alex
    SendTransactionalMessageRequest:
      title: Send transactional email request
      type: object
      required: [recipient]
      properties:
        external_send_id:
          type: string
          minLength: 1
          maxLength: 255
          pattern: '^[a-zA-Z0-9_+/=-]+$'
          description: |
            A Base64 compatible string. Validated against the following regex:

            `/^[a-zA-Z0-9-_+\/=]+$/`

            This optional field lets you pass a custom identifier for this send, which is included in events sent from the Transactional HTTP event postback. When passed, this identifier is also used as a deduplication key, which Braze stores for 24 hours.

            Passing the same identifier in another request does not result in a new instance of a send by Braze for 24 hours.
          example: YOUR_BASE64_COMPATIBLE_ID
        trigger_properties:
          type: object
          additionalProperties: true
          description: See [trigger properties]({{site.baseurl}}/api/objects_filters/trigger_properties_object/). Personalization key-value pairs that apply to the user in this request.
          example:
            example_string_property: YOUR_EXAMPLE_STRING
            example_integer_property: YOUR_EXAMPLE_INTEGER
        recipient:
          allOf:
            - $ref: '#/components/schemas/TransactionalRecipient'
          description: |
            The user you are targeting this message to. Can contain `attributes` and a single `external_user_id` or `user_alias`.

            Note that if you provide an external user ID that doesn't already exist in Braze, passing any fields to the `attributes` object creates this user profile in Braze and sends this message to the newly created user.

            If you send multiple requests to the same user with different data in the `attributes` object, `first_name`, `last_name`, and `email` attributes are updated synchronously and templated into your message. Custom attributes don't have this same protection, so proceed with caution when updating a user through this API and passing different custom attribute values in quick succession.
    SendTransactionalMessageResponse:
      title: Send transactional email response
      type: object
      properties:
        dispatch_id:
          type: string
          description: A randomly generated unique identifier for this send, used to look up its status at the message status endpoint.
          example: example_dispatch_id
        status:
          type: string
          description: The current status of the message.
          example: pending
        metadata:
          type: object
          description: The metadata associated with this send, such as `received_at`, `enqueued_at`, `campaign_api_id`, and `external_send_id`. Fields appear as the send progresses.
          additionalProperties: true
    ErrorResponse:
      title: Error
      type: object
      properties:
        error:
          type: string
          description: The error message describing why the request failed.
