> ## Documentation Index
> Fetch the complete documentation index at: https://docs.prelude.so/llms.txt
> Use this file to discover all available pages before exploring further.

# Retrieve a message template

> Retrieve a single message template, with its approval status and its per-country readiness.

In order to get access to this endpoint, contact our support team.


Retrieve a single message template by its identifier, with its approval `status` and its per-country readiness in `region_statuses`.


## OpenAPI

````yaml get /v2/notify/management/templates/{template_id}
openapi: 3.1.0
info:
  title: Prelude API
  version: 2.0.0
  description: The Prelude API allows you to send messages to your users.
  contact:
    email: support@prelude.so
servers:
  - url: https://api.prelude.dev
    description: Production server
security:
  - apiToken: []
tags:
  - name: Notify
    description: Send transactional and marketing messages with compliance enforcement.
  - name: Transactional
    description: Send transactional messages (deprecated - use Notify API instead).
  - name: Verify
    description: Verify phone numbers.
  - name: Watch
    description: Evaluate email addresses and phone numbers for trustworthiness.
  - name: Lookup
    description: >-
      Retrieve detailed information about a phone number including carrier data,
      line type, and portability status.
paths:
  /v2/notify/management/templates/{template_id}:
    get:
      tags:
        - Notify
      summary: Retrieve a message template
      description: >
        Retrieve a single message template, with its approval status and its
        per-country readiness.


        In order to get access to this endpoint, contact our support team.
      operationId: getNotifyTemplate
      parameters:
        - name: template_id
          in: path
          required: true
          schema:
            type: string
          description: The identifier of the template.
          example: template_01k8ap1btqf5r9fq2c8ax5fhc9
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotifyTemplate'
        '400':
          description: KO
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    NotifyTemplate:
      type: object
      required:
        - id
        - type
        - name
        - status
        - channels
        - variables
        - variants
        - default_locale
        - countries
        - region_statuses
        - created_at
      properties:
        id:
          type: string
          description: >-
            The identifier of the template, to pass as `template_id` when
            sending a message.
          examples:
            - template_01k8ap1btqf5r9fq2c8ax5fhc9
        type:
          type: string
          description: |
            What the template is used for. Possible values are:
              * `transactional` - A message triggered by an action of the recipient.
              * `marketing` - A promotional message, subject to marketing rules.
          enum:
            - transactional
            - marketing
        name:
          type: string
          description: The name of the template.
          examples:
            - Acme Receipts
        status:
          type: string
          description: |
            Where the template stands in the approval flow. Possible values are:
              * `draft` - Yours to edit. Nothing is sent with it yet.
              * `pending` - Submitted, and waiting on our review and on the per-country registrations.
              * `ready` - Approved and usable in every country you asked for.
              * `rejected` - Refused. Contact support for the reason.
          enum:
            - draft
            - pending
            - ready
            - rejected
        channels:
          type: array
          description: The channels the template can be delivered over.
          items:
            type: string
            enum:
              - sms
              - rcs
              - whatsapp
              - viber
              - zalo
              - telegram
        variables:
          type: array
          description: >-
            The placeholder names found in the variants, to fill in when
            sending.
          items:
            type: string
          examples:
            - - name
              - order_id
        variants:
          type: array
          description: The wording of the message, one entry per locale.
          items:
            $ref: '#/components/schemas/NotifyTemplateVariantWithStatus'
        default_locale:
          type: string
          description: The locale used when the recipient's own locale has no variant.
          examples:
            - en
        countries:
          type: array
          description: >-
            The countries the template works in, with the monthly volume
            recorded for each.
          items:
            $ref: '#/components/schemas/NotifyTemplateCountry'
        region_statuses:
          type: object
          description: >-
            The readiness of the template per country, keyed by ISO 3166-1
            alpha-2 country code.
          additionalProperties:
            $ref: '#/components/schemas/NotifyTemplateRegionStatus'
        created_at:
          type: string
          format: date-time
          description: The date and time when the template was created.
          examples:
            - '2024-01-01T12:00:00Z'
    Error:
      type: object
      properties:
        code:
          type: string
          description: The error code.
          examples:
            - invalid_phone_number
        message:
          type: string
          examples:
            - >-
              The provided phone number is invalid. Provide a valid E.164 phone
              number.
          description: A human-readable message describing the error.
        type:
          type: string
          examples:
            - bad_request
          description: The error type.
        request_id:
          type: string
          examples:
            - 3d19215e-2991-4a05-a41a-527314e6ff6a
          description: >-
            A string that identifies this specific request. Report it back to us
            to help us diagnose your issues.
        param:
          type: string
          examples:
            - phone_number
          description: The parameter the error refers to, when it applies to a single one.
      required:
        - code
        - message
        - type
    NotifyTemplateVariantWithStatus:
      allOf:
        - $ref: '#/components/schemas/NotifyTemplateVariant'
        - type: object
          properties:
            whatsapp:
              $ref: '#/components/schemas/NotifyTemplateWhatsAppStatus'
    NotifyTemplateCountry:
      type: object
      required:
        - country
      properties:
        country:
          type: string
          description: An ISO 3166-1 alpha-2 country code the template should work in.
          examples:
            - ES
        monthly_volume:
          type: integer
          description: >-
            The number of messages you expect to send to this country each
            month. Required, and at least 1000, for a country that needs a
            sender registration.
          examples:
            - 5000
    NotifyTemplateRegionStatus:
      type: object
      required:
        - status
        - requires_registration
      properties:
        status:
          type: string
          description: >
            How far this country is from being usable with the template.
            Possible values are:
              * `draft` - The template is still a draft, so nothing is sent with it in this country yet.
              * `pending` - Registration is needed in this country and is not ready yet.
              * `in_review` - The template was submitted and is being reviewed, along with the registration this country needs.
              * `ready` - The template can be used in this country.
              * `rejected` - The template was refused. Contact support for the reason.
          enum:
            - draft
            - pending
            - in_review
            - ready
            - rejected
        requires_registration:
          type: boolean
          description: >-
            Whether this country needs a sender registration before the template
            can be used there.
          examples:
            - true
    NotifyTemplateVariant:
      type: object
      required:
        - locale
        - text
      properties:
        locale:
          type: string
          description: The BCP-47 locale this wording is written in.
          examples:
            - en
        text:
          type: string
          description: >-
            The message body, with `{{variable}}` placeholders for the values
            you pass when sending.
          examples:
            - Hi {{name}}, your order {{order_id}} shipped.
        rich:
          description: >
            A card that RCS and WhatsApp show in place of the `text`. Other
            channels send the `text`. The template needs the `rcs` or `whatsapp`
            channel.


            Omit `rich` to keep the stored block; send `null` to remove it.
          oneOf:
            - $ref: '#/components/schemas/NotifyTemplateRich'
            - type: 'null'
    NotifyTemplateWhatsAppStatus:
      type: object
      description: >
        Where this language stands on WhatsApp. Present only on a template whose
        `channels` include `whatsapp`.


        Once we approve the template, each language is sent to WhatsApp for
        review. WhatsApp reviews every language on its own, usually within
        minutes and sometimes up to a few days.
      required:
        - status
      properties:
        status:
          type: string
          description: |
            Possible values are:
              * `not_submitted` - Not sent to WhatsApp yet. A template is sent once we approve it.
              * `pending` - WhatsApp is reviewing this language.
              * `approved` - WhatsApp approved this language. Messages can be sent with it.
              * `rejected` - WhatsApp rejected this language. See `rejection_reason`. Fix the `text` or `rich` of this variant with an update, and it is sent back for review.
              * `paused` - WhatsApp paused this language after poor recipient feedback.
              * `disabled` - WhatsApp no longer sends this language.
              * `sync_failed` - The language could not be sent to WhatsApp. See `error`.
          enum:
            - not_submitted
            - pending
            - approved
            - rejected
            - paused
            - disabled
            - sync_failed
        category:
          type: string
          description: >
            The category WhatsApp holds for this language, which sets its price.
            A `transactional` template is submitted as `utility`, but WhatsApp
            approves it as `marketing` when it finds promotional content in it.
          enum:
            - utility
            - marketing
            - authentication
        rejection_reason:
          type: string
          description: >-
            WhatsApp's reason for a rejection, such as `invalid_format`,
            `incorrect_category`, `promotional` or `abusive_content`. Set only
            with the `rejected` status.
          examples:
            - invalid_format
        rejection_detail:
          type: string
          description: >-
            WhatsApp's explanation of the rejection. WhatsApp sends one for
            `invalid_format` only.
          examples:
            - >-
              Your template has parameters placed next to each other (like
              {{1}}{{2}}) without text or punctuation between them.
        rejection_recommendation:
          type: string
          description: >-
            WhatsApp's advice to fix the rejection. WhatsApp sends one for
            `invalid_format` only.
          examples:
            - >-
              Separate parameters with descriptive text and ensure each
              parameter is clearly contextualized.
        error:
          type: string
          description: >-
            Why the language could not be sent to WhatsApp. Set only with the
            `sync_failed` status.
    NotifyTemplateRich:
      type: object
      required:
        - cards
      properties:
        cards:
          type: array
          description: >-
            The cards of the message. One card sends a card; 2 to 10 cards send
            a carousel the user swipes through. On WhatsApp, a carousel needs a
            `marketing` template, and the variant `text` shows above the cards.
            Every card has an image or a video, of the same type on all cards,
            and the same buttons in the same order, 2 at most. Every card has a
            title or a body, or none does, 160 characters at most together. A
            card in a WhatsApp carousel has no footer.
          minItems: 1
          maxItems: 10
          items:
            $ref: '#/components/schemas/NotifyTemplateRichCard'
    NotifyTemplateRichCard:
      type: object
      description: >-
        An image or a video, a title, a body, a footer and buttons. Each field
        is optional, but a card needs at least one.
      properties:
        media:
          $ref: '#/components/schemas/NotifyTemplateRichMedia'
        title:
          type: string
          description: >-
            The bold line above the body. On WhatsApp, a card without media
            shows its title as the header, 60 characters at most and one
            `{{variable}}` at most; with an image or a video, the title is the
            first line of the body. 200 characters at most on RCS.
          examples:
            - Your order has shipped
        body:
          type: string
          description: >-
            The text of the card. A card without a body shows the variant
            `text`. On WhatsApp, 1,024 characters at most, with the title when
            the card has an image or a video, and each `{{variable}}` once. On
            RCS, 2,000 characters at most, with the footer.
          examples:
            - Order {{order_id}} is on its way.
        footer:
          type: string
          description: >-
            A short line under the body, without `{{variables}}`. 60 characters
            at most on WhatsApp.
          examples:
            - Dunder Mifflin Paper Company
        buttons:
          type: array
          description: >-
            Up to 4 buttons, with at most 2 `url` buttons and 1 `call` button.
            `reply` buttons stay together, before or after the others.
          items:
            $ref: '#/components/schemas/NotifyTemplateRichButton'
    NotifyTemplateRichMedia:
      type: object
      required:
        - type
        - url
      properties:
        type:
          type: string
          enum:
            - image
            - video
        url:
          type: string
          description: >-
            An https link to the image or video, or a link that starts with a
            `{{variable}}` you fill with an https link when sending.
          examples:
            - '{{image_url}}'
    NotifyTemplateRichButton:
      description: >-
        A button of the card. Its `type` names the one target it holds; a field
        of another type is refused.
      oneOf:
        - $ref: '#/components/schemas/NotifyTemplateRichURLButton'
        - $ref: '#/components/schemas/NotifyTemplateRichCallButton'
        - $ref: '#/components/schemas/NotifyTemplateRichReplyButton'
      discriminator:
        propertyName: type
        mapping:
          url: '#/components/schemas/NotifyTemplateRichURLButton'
          call: '#/components/schemas/NotifyTemplateRichCallButton'
          reply: '#/components/schemas/NotifyTemplateRichReplyButton'
    NotifyTemplateRichURLButton:
      title: URL button
      type: object
      description: Opens a link.
      required:
        - type
        - label
        - url
      properties:
        type:
          type: string
          enum:
            - url
        label:
          type: string
          description: >-
            The text on the button, 25 characters at most, without
            `{{variables}}`.
          examples:
            - Track
        url:
          type: string
          description: >-
            An https link or a link that starts with a `{{variable}}`. On
            WhatsApp, an https link that may end with one `{{variable}}`.
          examples:
            - https://acme.com/t/{{order_id}}
    NotifyTemplateRichCallButton:
      title: Call button
      type: object
      description: Calls a phone number.
      required:
        - type
        - label
        - phone
      properties:
        type:
          type: string
          enum:
            - call
        label:
          type: string
          description: >-
            The text on the button, 25 characters at most, without
            `{{variables}}`.
          examples:
            - Call us
        phone:
          type: string
          description: A phone number in E.164 format.
          examples:
            - '+33612345678'
    NotifyTemplateRichReplyButton:
      title: Reply button
      type: object
      description: >-
        Sends you `payload` in an `inbound.message.received` event when the user
        taps it.
      required:
        - type
        - label
        - payload
      properties:
        type:
          type: string
          enum:
            - reply
        label:
          type: string
          description: >-
            The text on the button, 25 characters at most, without
            `{{variables}}`.
          examples:
            - Yes, it arrived
        payload:
          type: string
          description: >-
            The value sent back to you when the user taps the button, 256
            characters at most. It may hold `{{variables}}`. The user does not
            see it.
          examples:
            - arrived:{{order_id}}
  securitySchemes:
    apiToken:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.