---
openapi: 3.0.3
info:
  title: Braze REST API – View default source values for a Content Block's translation tags
  description: |
    ## Prerequisites

    To use this endpoint, you'll need an [API key]({{site.baseurl}}/api/basics#rest-api-key-permissions) with the `content_blocks.translations.get` permission.

    ## Rate limit

    This endpoint has a rate limit of 250,000 requests per hour.
  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:
  "/content_blocks/translations/source":
    get:
      summary: View default source values for a Content Block's translation tags
      operationId: get_content_blocks_translations_source_get_source_content_block
      parameters:
        - name: content_block_id
          in: query
          required: true
          description: The ID of your Content Block.
          schema:
            type: string
          example: e24404b3-3626-4de0-bdec-06935f3aa0ab
        - name: locale_id
          in: query
          required: false
          description: A locale UUID to filter the responses.
          schema:
            type: string
          example: h94404b3-3626-4de0-bdec-06935f3aa0ad
      responses:
        "200":
          description: |
            The request succeeded and the response body includes the source Content Block content. No action needed.

            The status code `200` could return the following response header and body.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SourceContentBlockResponse'
              examples:
                success:
                  summary: Source translations
                  value:
                    translations:
                      translation_map:
                        id_0: Welcome!
                        id_1: Thank you for joining our program
                    message: success
        "400":
          description: |
            Bad request. To resolve it:

            - **The `content_block_id` isn't valid:** Pass a valid `content_block_id`. Find it with the [List content blocks endpoint]({{site.baseurl}}/api/endpoints/templates/content_blocks_templates/get_list_email_content_blocks/).
            - **The `locale_id` isn't a valid UUID:** Pass a valid `locale_id` UUID.
            - **The Content Block doesn't have multi-language set up:** Enable multi-language on the Content Block first.
            - **The Content Block type doesn't support multi-language:** Use a Content Block that supports multi-language translations.
            - **An unexpected error occurred while retrieving the translations:** Retry the request. If the error persists, contact [Support]({{site.baseurl}}/braze_support/).

            The status code `400` could return the following response body.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                unexpected_error:
                  summary: Unexpected error
                  value:
                    errors:
                      - message: Something went wrong. Please try again or notify support
                invalid_content_block_id:
                  summary: Invalid content block ID
                  value:
                    message: Invalid content block ID
                invalid_locale_id:
                  summary: Invalid locale ID
                  value:
                    message: Invalid locale ID
                content_block_not_set_up:
                  summary: Content Block doesn't have multi-language set up
                  value:
                    message: This content block does not have multi-language setup
                content_block_type_not_supported:
                  summary: Content Block type doesn't support multi-language
                  value:
                    message: This content block type does not support multi-language
        "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 `content_blocks.translations.get` permission.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                access_denied:
                  summary: Missing permission
                  value:
                    message: Access Denied
        "404":
          description: Not found. No Content Block matches the `content_block_id`. Pass a `content_block_id` for an existing Content Block.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                content_block_not_found:
                  summary: Content block not found
                  value:
                    message: Content block not found
        "429":
          description: |
            Rate limited. You exceeded the rate limit for this endpoint. Slow your request rate and retry with exponential backoff. See [API rate limits]({{site.baseurl}}/api/api_limits/).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                over_rate_limit:
                  summary: Over rate limit
                  value:
                    message: You have exceeded your limit of 250000 requests per hour. Please contact your account executive to increase your limit. If you do not have their info, you may contact Braze directly at https://www.braze.com/contact/.
        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 `content_blocks.translations.get` permission.
        Pass the key as `Authorization: Bearer YOUR_REST_API_KEY`.
  schemas:
    TranslationMap:
      title: Translation map
      type: object
      additionalProperties:
        type: string
      properties:
        id_0:
          type: string
          example: Welcome!
        id_1:
          type: string
          example: Thank you for joining our program
    SourceContentBlockResponse:
      title: Content Block source translations response
      type: object
      properties:
        translations:
          title: Source translations
          type: object
          properties:
            translation_map:
              $ref: '#/components/schemas/TranslationMap'
        message:
          type: string
          example: success
    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:
            title: Error detail
            type: object
            properties:
              message:
                type: string
              type:
                type: string
                description: The error type.
