---
openapi: 3.0.3
info:
  title: Braze REST API – Create send IDs
  description: |
    ## Prerequisites

    To use this endpoint, you'll need to generate an API key with the `sends.id.create` permission.

    ## Rate limit

    You can create up to 100 custom send identifiers per day using this endpoint for a given workspace. Each `send_id` and `campaign_id` combination that you create will count toward your daily limit. The response headers for any valid request include the current rate limit status. See [API rate limits]({{site.baseurl}}/api/api_limits/) for details.
  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: []
paths:
  "/sends/id/create":
    post:
      summary: Create send IDs
      operationId: post_sends_id_create_post_create_send_ids
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateSendIdsRequest'
            examples:
              example_request:
                summary: Create a send ID for a campaign
                value:
                  campaign_id: campaign_identifier
                  send_id: send_identifier
      responses:
        "201":
          description: Created. The request succeeded and a new `send_id` was created. No action needed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateSendIdsResponse'
              examples:
                success:
                  summary: Example success response
                  value:
                    message: success
                    send_id: send_identifier
        "400":
          description: |
            Bad request. To resolve it:

            - **The `campaign_id` isn't valid:** Pass a valid `campaign_id`. Find it with the [Export campaign list endpoint]({{site.baseurl}}/api/endpoints/export/campaigns/get_campaigns/).
            - **The `send_id` isn't a string:** Pass `send_id` as a string.
            - **The `send_id` is longer than 64 characters:** Use a `send_id` of 64 characters or fewer.
            - **The `send_id` contains non-ASCII characters:** Use only ASCII characters in `send_id`.
            - **The `send_id` already exists for this campaign:** Use a new `send_id`, or reuse the existing one in your send requests.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                invalid_campaign_id:
                  summary: The campaign_id isn't valid
                  value:
                    message: campaign_id must be a valid campaign id
                send_id_not_string:
                  summary: The send_id isn't a string
                  value:
                    message: Invalid send_id, must be a string
                send_id_too_long:
                  summary: The send_id is longer than 64 characters
                  value:
                    message: Invalid send_id, must be less than or equal to 64 characters
                send_id_not_ascii:
                  summary: The send_id contains non-ASCII characters
                  value:
                    message: Invalid send_id, must be ASCII characters
                send_id_exists:
                  summary: The send_id already exists for this campaign
                  value:
                    message: send_id already exists for this campaign
        "401":
          description: |
            Unauthorized. 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).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                invalid_api_key:
                  summary: Invalid API key
                  value:
                    message: 'Invalid API key: YOUR_REST_API_KEY'
        "403":
          description: Access denied. The REST API key doesn't have the required permission. Use a REST API key that has the `sends.id.create` permission.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                access_denied:
                  summary: Missing permission
                  value:
                    message: Access Denied
        "429":
          description: |
            Rate limited. You reached the daily limit for creating send IDs in this workspace. Wait until the limit resets at the end of the day, or reuse existing send IDs.

            The error message reports your count and limit: `You've created <count> send_ids today. Your limit is <limit> per day.`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                daily_limit_reached:
                  summary: Daily send ID limit reached
                  value:
                    message: You've created 100 send_ids today. Your limit is 100 per day.
        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 `sends.id.create` permission.
        Pass the key as `Authorization: Bearer YOUR_REST_API_KEY`.
  schemas:
    CreateSendIdsRequest:
      title: Create send ID request
      type: object
      required: [campaign_id, send_id]
      properties:
        campaign_id:
          type: string
          description: See [campaign identifier]({{site.baseurl}}/api/identifier_types/).
          example: campaign_identifier
        send_id:
          type: string
          maxLength: 64
          description: |
            See [send identifier]({{site.baseurl}}/api/identifier_types/).

            Use up to 64 ASCII characters. A request without a `send_id` returns `Invalid send_id, must be a string`.
          example: send_identifier
    CreateSendIdsResponse:
      title: Create send ID response
      type: object
      properties:
        message:
          type: string
          example: success
        send_id:
          type: string
          description: The send identifier.
          example: send_identifier
    ErrorResponse:
      title: Error
      type: object
      properties:
        message:
          type: string
          description: The error message describing why the request failed.
        errors:
          type: array
          description: Non-fatal errors encountered while processing the request. Data unaffected by these errors is still processed.
          items:
            type: object
            properties:
              type:
                type: string
                description: The error type.
