---
openapi: 3.0.3
info:
  title: Braze REST API – See email template information
  description: |
    ## Prerequisites

    To use this endpoint, you'll need an [API key]({{site.baseurl}}/api/basics/) with the `templates.email.info` permission.

    ## Rate limit

    We apply the default Braze rate limit of 250,000 requests per hour to this endpoint, as documented in [API rate limits]({{site.baseurl}}/api/api_limits/).
  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:
  "/templates/email/info":
    get:
      summary: See email template information
      operationId: get_templates_email_info_get_see_email_template_information
      parameters:
        - name: email_template_id
          in: query
          required: true
          description: See [email template API identifier]({{site.baseurl}}/api/identifier_types/).
          schema:
            type: string
          example: 232b6d29-7e41-4106-a0ab-1c4fe915d701
      responses:
        "200":
          description: |
            The request succeeded and the response body includes the email template information. No action needed.

            The following sample response shows an example of the response returned when you see email template information.

            Images in this response will show in the `body` variable as HTML.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SeeEmailTemplateInformationResponse'
              examples:
                success:
                  summary: Email template information
                  value:
                    email_template_id: 232b6d29-7e41-4106-a0ab-1c4fe915d701
                    template_name: email_template_name
                    description: Example email template description
                    subject: Welcome to my email template!
                    preheader: My preheader is pretty cool.
                    body: This is the text within my email body and https://www.braze.com/ here is a link to Braze.com.
                    plaintext_body: This is the text within my email body and here is a link to https://www.braze.com/.
                    should_inline_css: false
                    tags:
                      - Tag1
                      - Tag2
                    created_at: "2020-01-15T01:01:01.000Z"
                    updated_at: "2020-01-20T01:01:01.000Z"
                    message: success
        "400":
          description: |
            Bad request. To resolve it:

            - **The `email_template_id` is blank:** Include a valid `email_template_id`.
            - **The `email_template_id` doesn't match a template in this workspace:** Pass a valid `email_template_id`.
            - **The template was deleted:** Use a template that hasn't been deleted.
            - **The `include_has_translatable_content` value isn't a boolean:** Pass `include_has_translatable_content` as `true` or `false`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                template_id_blank:
                  summary: The email_template_id is blank
                  value:
                    message: Email template ID cannot be blank.
                template_id_invalid:
                  summary: The email_template_id doesn't match a template
                  value:
                    message: Email template ID is invalid for this App Group.
                template_deleted:
                  summary: The template was deleted
                  value:
                    message: Email template has been deleted - content not available.
                include_has_translatable_content_invalid:
                  summary: The include_has_translatable_content value isn't a boolean
                  value:
                    message: include_has_translatable_content should only be true or false
        "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 `templates.email.info` permission.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                access_denied:
                  summary: Missing permission
                  value:
                    message: Access Denied
        "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 `templates.email.info` permission.
        Pass the key as `Authorization: Bearer YOUR_REST_API_KEY`.
  schemas:
    SeeEmailTemplateInformationResponse:
      title: Email template information response
      type: object
      properties:
        email_template_id:
          type: string
          description: Your email template's API Identifier.
          example: 232b6d29-7e41-4106-a0ab-1c4fe915d701
        template_name:
          type: string
          description: The name of your email template.
          example: email_template_name
        description:
          type: string
          description: The email template description.
          example: Example email template description
        subject:
          type: string
          description: The email template subject line.
          example: Welcome to my email template!
        preheader:
          type: string
          nullable: true
          description: The email preheader used to generate previews in some clients.
          example: My preheader is pretty cool.
        body:
          type: string
          description: The email template body that may include HTML.
          example: This is the text within my email body and https://www.braze.com/ here is a link to Braze.com.
        plaintext_body:
          type: string
          nullable: true
          description: A plaintext version of the email template body.
          example: This is the text within my email body and here is a link to https://www.braze.com/.
        should_inline_css:
          type: boolean
          description: Whether there is inline CSS in the body of the template - defaults to the css inlining value for the workspace.
          example: false
        tags:
          type: array
          description: Tag names.
          items:
            type: string
          example:
            - Tag1
            - Tag2
        created_at:
          type: string
          description: The time the email was created at in ISO 8601.
          example: "2020-01-15T01:01:01.000Z"
        updated_at:
          type: string
          description: The time the email was updated in ISO 8601.
          example: "2020-01-20T01:01:01.000Z"
        message:
          type: string
          description: Returns `success` when the request completes without errors.
          example: success
    ErrorResponse:
      title: Error
      type: object
      properties:
        message:
          type: string
          description: The error message describing why the request failed.
