# Creates a template

Endpoint: POST /v2/projects/{project_id}/templates
Version: 2.0
Security: Basic, oAuth2

## Path parameters:

  - `project_id` (string, required)
    Required. The project ID.

## Request fields (application/json):

  - `default_translation` (string, required)
    The default translation to use if not specified.
Specified as a BCP-47 language_code and the language_code must exist
in the translations list.
    Example: "en-US"

  - `translations` (array, required) — one of:
    - Card:
      - `card_message` (object)
        Message containing text, media and choices.
      - `card_message.choices` (array) — one of:
        You may include choices in your Card Message. The number of choices is limited to 10.
        - Call:
          - `call_message` (object)
          - `call_message.phone_number` (string, required)
            Phone number in E.164 with leading +.
            Example: "+15551231234"
          - `call_message.title` (string, required)
            Title shown close to the phone number.
The title is clickable in some cases.
            Example: "Message text"
        - Location:
          - `location_message` (object)
          - `location_message.coordinates` (object, required)
          - `location_message.coordinates.latitude` (number, required)
            The latitude.
          - `location_message.coordinates.longitude` (number, required)
            The longitude.
          - `location_message.title` (string, required)
            The title is shown close to the button or link that leads to a map showing the location. The title can be clickable in some cases.
          - `location_message.label` (string)
            Label or name for the position.
        - Text:
          - `text_message` (object)
          - `text_message.text` (string, required)
            The text to be sent.
        - URL:
          - `url_message` (object)
          - `url_message.title` (string, required)
            The title shown close to the URL. The title can be clickable in some cases.
          - `url_message.url` (string, required)
            The url to show.
        - Calendar:
          - `calendar_message` (object)
          - `calendar_message.title` (string, required)
            The title is shown close to the button that leads to open a user calendar.
          - `calendar_message.event_start` (string, required)
            The timestamp defines start of a calendar event.
            Example: "2025-11-30T10:00:00Z"
          - `calendar_message.event_end` (string, required)
            The timestamp defines end of a calendar event.
            Example: "2025-11-30T11:00:00Z"
          - `calendar_message.event_title` (string, required)
            Title of a calendar event.
          - `calendar_message.fallback_url` (string, required)
            The URL that is opened when the user cannot open a calendar event directly or channel does not have support for this type.
          - `calendar_message.event_description` (string)
            Description of a calendar event.
        - Request location:
          - `share_location_message` (object)
          - `share_location_message.title` (string, required)
            The title is shown close to the button that leads to open a map to share a location.
          - `share_location_message.fallback_url` (string, required)
            The URL that is opened when channel does not have support for this type.
      - `card_message.choices.postback_data` (any)
        An optional field. This data will be returned in the ChoiceResponseMessage. The default is message_id_{text, title}.
      - `card_message.description` (string)
        This is an optional description field that is displayed below the title on the card.
      - `card_message.height` (string)
        You can set the desired size of the card in the message.
        Enum: "UNSPECIFIED_HEIGHT", "SHORT", "MEDIUM", "TALL"
      - `card_message.title` (string)
        The title of the card message.
      - `card_message.media_message` (object)
        A message containing a media component.
      - `card_message.media_message.url` (string, required)
        Url to the media file.
      - `card_message.media_message.thumbnail_url` (string)
        An optional parameter. Will be used where it is natively supported.
      - `card_message.media_message.filename_override` (string)
        Overrides the media file name.
      - `card_message.message_properties` (object)
        Optional additional properties.
      - `card_message.message_properties.whatsapp_header` (string)
        Optional. Sets the header for the footer of a WhatsApp reply button message, if there is no media in the message. Ignored for other channels. Ignored if not transcoded to a native WhatsApp message with reply buttons.
    - Carousel:
      - `carousel_message` (object)
      - `carousel_message.cards` (array, required)
        A list of up to 10 cards.
      - `carousel_message.cards.choices` (array) — one of:
        You may include choices in your Card Message. The number of choices is limited to 10.
        - Call:
          - `call_message` (object)
          - `call_message.phone_number` (string, required)
            Phone number in E.164 with leading +.
            Example: "+15551231234"
          - `call_message.title` (string, required)
            Title shown close to the phone number.
The title is clickable in some cases.
            Example: "Message text"
        - Location:
          - `location_message` (object)
          - `location_message.coordinates` (object, required)
          - `location_message.coordinates.latitude` (number, required)
            The latitude.
          - `location_message.coordinates.longitude` (number, required)
            The longitude.
          - `location_message.title` (string, required)
            The title is shown close to the button or link that leads to a map showing the location. The title can be clickable in some cases.
          - `location_message.label` (string)
            Label or name for the position.
        - Text:
          - `text_message` (object)
          - `text_message.text` (string, required)
            The text to be sent.
        - URL:
          - `url_message` (object)
          - `url_message.title` (string, required)
            The title shown close to the URL. The title can be clickable in some cases.
          - `url_message.url` (string, required)
            The url to show.
        - Calendar:
          - `calendar_message` (object)
          - `calendar_message.title` (string, required)
            The title is shown close to the button that leads to open a user calendar.
          - `calendar_message.event_start` (string, required)
            The timestamp defines start of a calendar event.
            Example: "2025-11-30T10:00:00Z"
          - `calendar_message.event_end` (string, required)
            The timestamp defines end of a calendar event.
            Example: "2025-11-30T11:00:00Z"
          - `calendar_message.event_title` (string, required)
            Title of a calendar event.
          - `calendar_message.fallback_url` (string, required)
            The URL that is opened when the user cannot open a calendar event directly or channel does not have support for this type.
          - `calendar_message.event_description` (string)
            Description of a calendar event.
        - Request location:
          - `share_location_message` (object)
          - `share_location_message.title` (string, required)
            The title is shown close to the button that leads to open a map to share a location.
          - `share_location_message.fallback_url` (string, required)
            The URL that is opened when channel does not have support for this type.
      - `carousel_message.cards.choices.postback_data` (any)
        An optional field. This data will be returned in the ChoiceResponseMessage. The default is message_id_{text, title}.
      - `carousel_message.cards.description` (string)
        This is an optional description field that is displayed below the title on the card.
      - `carousel_message.cards.height` (string)
        You can set the desired size of the card in the message.
        Enum: same as `card_message.height` in "Card" (4 values)
      - `carousel_message.cards.title` (string)
        The title of the card message.
      - `carousel_message.cards.media_message` (object)
        A message containing a media component.
      - `carousel_message.cards.media_message.url` (string, required)
        Url to the media file.
      - `carousel_message.cards.media_message.thumbnail_url` (string)
        An optional parameter. Will be used where it is natively supported.
      - `carousel_message.cards.media_message.filename_override` (string)
        Overrides the media file name.
      - `carousel_message.cards.message_properties` (object)
        Optional additional properties.
      - `carousel_message.cards.message_properties.whatsapp_header` (string)
        Optional. Sets the header for the footer of a WhatsApp reply button message, if there is no media in the message. Ignored for other channels. Ignored if not transcoded to a native WhatsApp message with reply buttons.
      - `carousel_message.choices` (array) — one of:
        Optional. Outer choices on the carousel level. The number of outer choices is limited to 3.
        - Call:
          - `call_message` (object)
          - `call_message.phone_number` (string, required)
            Phone number in E.164 with leading +.
            Example: "+15551231234"
          - `call_message.title` (string, required)
            Title shown close to the phone number.
The title is clickable in some cases.
            Example: "Message text"
        - Location:
          - `location_message` (object)
          - `location_message.coordinates` (object, required)
          - `location_message.coordinates.latitude` (number, required)
            The latitude.
          - `location_message.coordinates.longitude` (number, required)
            The longitude.
          - `location_message.title` (string, required)
            The title is shown close to the button or link that leads to a map showing the location. The title can be clickable in some cases.
          - `location_message.label` (string)
            Label or name for the position.
        - Text:
          - `text_message` (object)
          - `text_message.text` (string, required)
            The text to be sent.
        - URL:
          - `url_message` (object)
          - `url_message.title` (string, required)
            The title shown close to the URL. The title can be clickable in some cases.
          - `url_message.url` (string, required)
            The url to show.
        - Calendar:
          - `calendar_message` (object)
          - `calendar_message.title` (string, required)
            The title is shown close to the button that leads to open a user calendar.
          - `calendar_message.event_start` (string, required)
            The timestamp defines start of a calendar event.
            Example: "2025-11-30T10:00:00Z"
          - `calendar_message.event_end` (string, required)
            The timestamp defines end of a calendar event.
            Example: "2025-11-30T11:00:00Z"
          - `calendar_message.event_title` (string, required)
            Title of a calendar event.
          - `calendar_message.fallback_url` (string, required)
            The URL that is opened when the user cannot open a calendar event directly or channel does not have support for this type.
          - `calendar_message.event_description` (string)
            Description of a calendar event.
        - Request location:
          - `share_location_message` (object)
          - `share_location_message.title` (string, required)
            The title is shown close to the button that leads to open a map to share a location.
          - `share_location_message.fallback_url` (string, required)
            The URL that is opened when channel does not have support for this type.
    - Choice:
      - `choice_message` (object)
        A message containing choices.
      - `choice_message.choices` (array, required) — one of:
        The number of choices is limited to 10.
        - Call:
          - `call_message` (object)
          - `call_message.phone_number` (string, required)
            Phone number in E.164 with leading +.
            Example: "+15551231234"
          - `call_message.title` (string, required)
            Title shown close to the phone number.
The title is clickable in some cases.
            Example: "Message text"
        - Location:
          - `location_message` (object)
          - `location_message.coordinates` (object, required)
          - `location_message.coordinates.latitude` (number, required)
            The latitude.
          - `location_message.coordinates.longitude` (number, required)
            The longitude.
          - `location_message.title` (string, required)
            The title is shown close to the button or link that leads to a map showing the location. The title can be clickable in some cases.
          - `location_message.label` (string)
            Label or name for the position.
        - Text:
          - `text_message` (object)
          - `text_message.text` (string, required)
            The text to be sent.
        - URL:
          - `url_message` (object)
          - `url_message.title` (string, required)
            The title shown close to the URL. The title can be clickable in some cases.
          - `url_message.url` (string, required)
            The url to show.
        - Calendar:
          - `calendar_message` (object)
          - `calendar_message.title` (string, required)
            The title is shown close to the button that leads to open a user calendar.
          - `calendar_message.event_start` (string, required)
            The timestamp defines start of a calendar event.
            Example: "2025-11-30T10:00:00Z"
          - `calendar_message.event_end` (string, required)
            The timestamp defines end of a calendar event.
            Example: "2025-11-30T11:00:00Z"
          - `calendar_message.event_title` (string, required)
            Title of a calendar event.
          - `calendar_message.fallback_url` (string, required)
            The URL that is opened when the user cannot open a calendar event directly or channel does not have support for this type.
          - `calendar_message.event_description` (string)
            Description of a calendar event.
        - Request location:
          - `share_location_message` (object)
          - `share_location_message.title` (string, required)
            The title is shown close to the button that leads to open a map to share a location.
          - `share_location_message.fallback_url` (string, required)
            The URL that is opened when channel does not have support for this type.
      - `choice_message.choices.postback_data` (any)
        An optional field. This data will be returned in the ChoiceResponseMessage. The default is message_id_{text, title}.
      - `choice_message.text_message` (object)
      - `choice_message.text_message.text` (string, required)
        The text to be sent.
      - `choice_message.message_properties` (object)
      - `choice_message.message_properties.whatsapp_footer` (string)
        Optional. Sets the text for the footer of a WhatsApp reply button or URL button message. Ignored for other channels.
    - Location:
      - `location_message` (object)
      - `location_message.coordinates` (object, required)
      - `location_message.coordinates.latitude` (number, required)
        The latitude.
      - `location_message.coordinates.longitude` (number, required)
        The longitude.
      - `location_message.title` (string, required)
        The title is shown close to the button or link that leads to a map showing the location. The title can be clickable in some cases.
      - `location_message.label` (string)
        Label or name for the position.
    - Media Message:
      - `media_message` (object)
      - `media_message.url` (string, required)
        Url to the media file.
      - `media_message.thumbnail_url` (string)
        An optional parameter. Will be used where it is natively supported.
      - `media_message.filename_override` (string)
        Overrides the media file name.
    - Template Message:
      - `template_message` (object)
      - `template_message.channel_template` (object)
        Optional. Channel specific template reference with parameters per channel.
The channel template if exists overrides the omnichannel template.
At least one of channel_template or omni_template needs to be present.
The key in the map must point to a valid conversation channel as
defined by the enum ConversationChannel.
      - `template_message.omni_template` (object)
        The referenced template can be an omnichannel template stored in Conversation API Template Store as an AppMessage. You may also reference external channel-specific templates, such as a WhatsApp Business Template. Note that channel-specific template references are not supported when populating the explicit_channel_omni_message field.
      - `template_message.omni_template.version` (string, required)
        Used to specify what version of a template to use. Required when using omni_channel_override and omni_template fields.
This will be used in conjunction with language_code. Note that, when referencing omni-channel templates using the [Sinch Customer Dashboard](https://dashboard.sinch.com/), the latest version of a given omni-template can be identified by populating this field with latest.
      - `template_message.omni_template.template_id` (string, required)
        The ID of the template. Note that, in the case of WhatsApp channel-specific templates, this field must be populated by the name of the template.
      - `template_message.omni_template.language_code` (string)
        The BCP-47 language code, such as en_US or sr_Latn.
For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. English is the default language_code.
Note that, while many API calls involving templates accept either the dashed format (en-US) or the underscored format (en_US), some channel specific templates (for example, WhatsApp channel-specific templates) only accept the underscored format. Note that this field is required for WhatsApp channel-specific templates.
      - `template_message.omni_template.parameters` (object)
        Required if the template has parameters. Concrete values must
be present for all defined parameters
in the template. Parameters can be different for
different versions and/or languages of the template.
    - Text:
      - `text_message` (object)
      - `text_message.text` (string, required)
        The text to be sent.
    - List:
      - `list_message` (object)
      - `list_message.title` (string, required)
        A title for the message that is displayed near the products or choices.
      - `list_message.sections` (array, required)
        List of ListSection objects containing choices to be presented in the list message.
      - `list_message.sections.items` (array, required) — one of:
        - Choice:
          - `choice` (object, required)
            A message component for interactive messages, containing a choice.
          - `choice.title` (string, required)
            Required parameter. Title for the choice item.
          - `choice.description` (string)
            Optional parameter. The description (or subtitle) of this choice item.
          - `choice.media` (object)
            Optional parameter. The media of this choice item.
          - `choice.media.url` (string, required)
            Url to the media file.
          - `choice.media.thumbnail_url` (string)
            An optional parameter. Will be used where it is natively supported.
          - `choice.media.filename_override` (string)
            Overrides the media file name.
          - `choice.postback_data` (string)
            Optional parameter. Postback data that will be returned in the MO if the user selects this option.
        - Product:
          - `product` (object, required)
            A message component for interactive messages, containing a product.
          - `product.id` (string, required)
            Required parameter. The ID for the product.
          - `product.marketplace` (string, required)
            Required parameter. The marketplace to which the product belongs.
            Example: "FACEBOOK"
          - `product.quantity` (integer)
            Output only. The quantity of the chosen product.
          - `product.item_price` (number)
            Output only. The price for one unit of the chosen product.
          - `product.currency` (string)
            Output only. The currency of the item_price.
      - `list_message.sections.title` (string)
        Optional parameter. Title for list section.
      - `list_message.description` (string)
        This is an optional field, containing a description for the message.
      - `list_message.media` (object)
      - `list_message.media.url` (string, required)
        Url to the media file.
      - `list_message.media.thumbnail_url` (string)
        An optional parameter. Will be used where it is natively supported.
      - `list_message.media.filename_override` (string)
        Overrides the media file name.
      - `list_message.message_properties` (object)
        Additional properties for the message. Required if sending a product list message.
      - `list_message.message_properties.catalog_id` (string)
        Required if sending a product list message. The ID of the catalog to which the products belong.
      - `list_message.message_properties.menu` (string)
        Optional. Sets the text for the menu of a choice list message.
      - `list_message.message_properties.whatsapp_header` (string)
        Optional. Sets the text for the header of a WhatsApp choice list message. Ignored for other channels.
    - Contact Info:
      - `contact_info_message` (object)
      - `contact_info_message.name` (object, required)
        Name information of the contact.
      - `contact_info_message.name.full_name` (string, required)
        Full name of the contact
      - `contact_info_message.name.first_name` (string)
        First name.
      - `contact_info_message.name.last_name` (string)
        Last name.
      - `contact_info_message.name.middle_name` (string)
        Middle name.
      - `contact_info_message.name.prefix` (string)
        Prefix before the name. e.g. Mr, Mrs, Dr etc.
      - `contact_info_message.name.suffix` (string)
        Suffix after the name.
      - `contact_info_message.phone_numbers` (array, required)
        Phone numbers of the contact
      - `contact_info_message.phone_numbers.phone_number` (string, required)
        Phone number with country code included.
      - `contact_info_message.phone_numbers.type` (string)
        Phone number type, e.g. WORK or HOME.
      - `contact_info_message.addresses` (array)
        Physical addresses of the contact
      - `contact_info_message.addresses.city` (string)
        City Name
      - `contact_info_message.addresses.country` (string)
        Country Name
      - `contact_info_message.addresses.state` (string)
        Name of a state or region of a country.
      - `contact_info_message.addresses.zip` (string)
        Zip/postal code
      - `contact_info_message.addresses.type` (string)
        Address type, e.g. WORK or HOME
      - `contact_info_message.addresses.country_code` (string)
        Two letter country code.
      - `contact_info_message.email_addresses` (array)
        Email addresses of the contact
      - `contact_info_message.email_addresses.email_address` (string, required)
        Email address.
      - `contact_info_message.email_addresses.type` (string)
        Email address type. e.g. WORK or HOME.
      - `contact_info_message.organization` (object)
        Organization information of the contact.
      - `contact_info_message.organization.company` (string)
        Company name
      - `contact_info_message.organization.department` (string)
        Department at the company
      - `contact_info_message.organization.title` (string)
        Corporate title, e.g. Software engineer
      - `contact_info_message.urls` (array)
        URLs/websites associated with the contact
      - `contact_info_message.urls.url` (string, required)
        The URL to be referenced
      - `contact_info_message.urls.type` (string)
        Optional. URL type, e.g. Org or Social
      - `contact_info_message.birthday` (string)
        Date of birth in YYYY-MM-DD format.

  - `translations.language_code` (string, required)
    The BCP-47 language code, such as en-US or sr-Latn. For more information,
see https://www.unicode.org/reports/tr35/#Unicode_locale_identifier.

  - `translations.version` (string)
    The version of the translation.
    Example: "1"

  - `translations.channel_template_overrides` (object)
    Field to override the omnichannel template by referring to a channel-specific template.
The key in the map must point to a valid conversation channel.
Currently only WHATSAPP and KAKAOTALK are supported

  - `translations.variables` (array)
    List of expected variables. Can be used for request validation.

  - `translations.variables.key` (string)

  - `translations.variables.preview_value` (string)

  - `id` (string)
    The id of the template. Specify this yourself during creation.
Otherwise, we will generate an ID for you. This must be unique
for a given project.
    Example: "id_string"

  - `description` (string)
    The description of the template.
    Example: "Template description"

  - `version` (integer)
    The version of the template. While creating a template, this will be defaulted to 1.
When updating a template, you must supply the latest version of the template in order for the update to be successful.
    Example: 1

## Response default fields (application/json):

  - `error` (object)

  - `error.code` (integer)

  - `error.details` (array)

  - `error.details.type_url` (string)

  - `error.details.value` (string)

  - `error.message` (string)

  - `error.status` (string)


