---
openapi: 3.0.3
info:
  title: Braze REST API – View default source values for a canvas'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 `canvas.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:
  /canvas/translations/source:
    get:
      summary: View default source values for a canvas's translation tags
      operationId: get_canvas_translations_source_get_source_canvas
      parameters:
        - name: workflow_id
          in: query
          required: true
          description: The ID of the Canvas.
          schema:
            type: string
          example: a74404b3-3626-4de0-bdec-06935f3aa0ad
        - name: step_id
          in: query
          required: true
          description: The ID of your Canvas step.
          schema:
            type: string
          example: a74404b3-3626-4de0-bdec-06935f3aa0ac
        - name: message_variation_id
          in: query
          required: true
          description: The ID of your message variation.
          schema:
            type: string
          example: a74404b3-3626-4de0-bdec-06935f3aa0ac
        - name: locale_id
          in: query
          required: false
          description: The ID (UUID) of the locale.
          schema:
            type: string
          example: c7c12345-de35-1234-5678-abcdefa99e3f
        - name: post_launch_draft_version
          in: query
          required: false
          description: When `true` returns the latest draft version instead of the latest live published version. Defaults to `false` returning the latest live version.
          schema:
            type: boolean
            default: false
          example: true
      responses:
        "200":
          description: |
            The request succeeded and the response body includes the source Canvas content. No action needed.

            The status code `200` could return the following response header and body.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SourceCanvasResponse'
              examples:
                success:
                  summary: Source translations
                  value:
                    translations:
                      translation_map:
                        id_0: Here's a Million Dollars
                        id_1: Hello World!
                    message: success
        "400":
          description: |
            Bad request. To resolve it:

            - **The `workflow_id` isn't a valid workflow UUID:** Pass a valid `workflow_id`. Find it with the [Export Canvas list endpoint]({{site.baseurl}}/api/endpoints/export/canvas/get_canvases/).
            - **The `step_id` isn't a valid UUID:** Pass a valid `step_id` UUID.
            - **The `message_variation_id` isn't a valid UUID:** Pass a valid `message_variation_id` UUID.
            - **The `locale_id` isn't a valid UUID:** Pass a valid `locale_id` UUID.
            - **No message matches the `message_variation_id`:** Pass a `message_variation_id` that exists on the object.
            - **The message doesn't have multi-language set up:** Enable multi-language on the message variation first.
            - **The message type doesn't support multi-language:** Use a channel that supports multi-language translations.

            The status code `400` could return the following response body.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                invalid_workflow_id:
                  summary: Invalid workflow ID
                  value:
                    message: Invalid workflow ID
                invalid_step_id:
                  summary: Invalid step ID
                  value:
                    message: Invalid campaign or step ID
                invalid_message_id:
                  summary: Invalid message variation ID
                  value:
                    message: Invalid message ID
                invalid_locale_id:
                  summary: Invalid locale ID
                  value:
                    message: Invalid locale ID
                message_not_found:
                  summary: Message not found
                  value:
                    message: Message not found
                multi_language_not_set_up:
                  summary: Multi-language not set up on the message
                  value:
                    message: This message does not have multi-language setup
                unsupported_message_type:
                  summary: Message type doesn't support multi-language
                  value:
                    message: This message 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 `canvas.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. To resolve it:

            - **No Canvas matches the `workflow_id`:** Pass a `workflow_id` for an existing Canvas.
            - **No Canvas step matches the provided step ID:** Pass a step ID that exists in the Canvas.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                workflow_not_found:
                  summary: Canvas not found
                  value:
                    message: Workflow not found
                workflow_step_not_found:
                  summary: Canvas step not found
                  value:
                    message: Workflow step 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 `canvas.translations.get` permission.
        Pass the key as `Authorization: Bearer YOUR_REST_API_KEY`.
  schemas:
    SourceCanvasResponse:
      title: View Canvas translation source response
      type: object
      properties:
        translations:
          title: Source translations
          type: object
          properties:
            translation_map:
              title: Translation map
              type: object
              properties:
                id_0:
                  type: string
                id_1:
                  type: string
        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: Errors encountered while processing the request. When this array is present, the request failed and the endpoint returns status code `400`.
          items:
            title: Error detail
            type: object
            properties:
              type:
                type: string
                description: The error type.
              message:
                type: string
                description: The error message.
