---
title: "Create a template"
method: POST
path: "/whatsapp/templates"
tags: ["WhatsApp Templates"]
---

# Create a template

`POST /whatsapp/templates`

Creates a WhatsApp template.

## Request body

- WhatsappTemplateCreateRequest — See [WhatsApp Templates](https://developers.facebook.com/docs/whatsapp/business-management-api/message-templates).
  - `wabaId` string, required — WhatsApp Business Account ID.
  - `name` string, required — Name of the template.
  - `language` string, required — Language code of the template. See [Supported Languages](https://developers.facebook.com/documentation/business-messaging/whatsapp/templates/supported-languages) for all codes.
  - `category` 'AUTHENTICATION' | 'MARKETING' | 'UTILITY', required — Category of WhatsApp templates. - `AUTHENTICATION`: Enable businesses to authenticate users with one-time passcodes, potentially at multiple steps in the login process (e.g., account verification, account recovery, integrity challenges). - `MARKETING`: Include promotions or offers, informational updates, or invitations for customers to respond / take action. Any conversation that does not qualify as utility or authentication is a marketing conversation. - `UTILITY`: Facilitate a specific, agreed-upon request or transaction or update to a customer about an ongoing transaction, including post-purchase notifications and recurring billing statements.
  - `subCategory` 'ORDER_STATUS' — Subcategory of WhatsApp templates. - ORDER_STATUS: Order status template is categorized as `UTILITY` template and apart from name and language of choice, it has general template components such as `BODY`, `FOOTER` and additionally subcategory as `ORDER_STATUS`.
  - `messageSendTtlSeconds` integer — If we are unable to deliver a message for an amount of time that exceeds its time-to-live, we will stop retrying and drop the message. By default, messages that use an authentication template have a default TTL of **10 minutes**, and messages that use a utility or marketing template have a default TTL of **30 days**. Set its value between `30` and `900` seconds (i.e., 30 seconds to 15 minutes) for authentication templates, or `30` and `43200` seconds (i.e., 30 seconds to 12 hours) for utility templates, or `43200` and `2592000` seconds (i.e., 12 hours to 30 days) for marketing templates. Alternatively, you can set this value to `-1`, which will set a custom TTL of 30 days for either type of template. We encourage you to set a time-to-live for all of your authentication templates, preferably equal to or less than your code expiration time, to ensure your customers only get a message when a code is still usable. Authentication templates created before October 23, 2024, have a default TTL of 30 days.
  - `components` WhatsappTemplateComponent[], required
    - `type` 'BODY' | 'HEADER' | 'FOOTER' | 'BUTTONS' | 'LIMITED_TIME_OFFER' | 'CAROUSEL' — **Required.** Template component type. - `BODY`: Body components are text-only components and are required by all templates. Templates are limited to one body component. - `HEADER`: Headers are optional components that appear at the top of template messages. Headers support text, media (images, gif, videos, documents). Templates are limited to one header component. - `FOOTER`: Footers are optional text-only components that appear immediately after the body component. Templates are limited to one footer component. - `BUTTONS`: Buttons are optional interactive components that perform specific actions when tapped. - `LIMITED_TIME_OFFER`: Use for limited-time offer templates. The delivered message can display an offer expiration details section with a heading, an optional expiration timer, and the offer code itself. - `CAROUSEL`: Carousel templates allow you to send a single text message (1), accompanied by a set of up to 10 carousel cards (2) in a horizontally scrollable view.
    - `format` 'TEXT' | 'IMAGE' | 'GIF' | 'VIDEO' | 'DOCUMENT' | 'LOCATION' — **Required for type `HEADER`.**
    - `text` string — For body text (type = `BODY`), maximum 1024 characters. For header text (type = `HEADER`, format = `TEXT`), maximum 60 characters. For footer text (type = `FOOTER`), maximum 60 characters. For card body text (`CAROUSEL` card component type = `BODY`), maximum 160 characters.
    - `buttons` WhatsappTemplateComponentButton[] — **Required for type `BUTTONS`.** Buttons are optional interactive components that perform specific actions when tapped. Templates can have a mixture of up to 10 button components total, although there are limits to individual buttons of the same type as well as combination limits. If a template has more than three buttons, two buttons will appear in the delivered message and the remaining buttons will be replaced with a **See all options** button. Tapping the **See all options** button reveals the remaining buttons.
      - `type` 'PHONE_NUMBER' | 'URL' | 'QUICK_REPLY' | 'COPY_CODE' | 'OTP' | 'CATALOG' | 'MPM' | 'FLOW' | 'ORDER_DETAILS' | 'VOICE_CALL', required — Button type. - `PHONE_NUMBER`: Phone number buttons call the specified business phone number when tapped by the app user. Templates are limited to one phone number button. - `URL`: URL buttons load the specified URL in the device's default web browser when tapped by the app user. Templates are limited to two URL buttons. - `QUICK_REPLY`: Quick reply buttons are custom text-only buttons that immediately message you with the specified text string when tapped by the app user. Templates are limited to 10 quick reply buttons. If using quick reply buttons with other buttons, buttons must be organized into two groups: quick reply buttons and non-quick reply buttons. - `COPY_CODE`: Copy code buttons copy a text string (defined when the template is sent in a template message) to the device's clipboard when tapped by the app user. Templates are limited to one copy code button. - `OTP`: One-time password (OTP) buttons are a special type of URL button component used with authentication templates. - `CATALOG`: When a customer taps the **View catalog** button in a catalog template message, your product catalog appears within WhatsApp. - `MPM`: Customers can browse products and sections by tapping the **View items** button in a multi-product template message. - `FLOW`: Use this type to specify the [Flow](https://developers.facebook.com/docs/whatsapp/flows) to be sent with the template message. - `ORDER_DETAILS`: Provides a order details button with `Review and Pay` text. - `VOICE_CALL`: Triggers a WhatsApp call, when clicked by a WhatsApp customer.
      - `text` string — **Required for button type `PHONE_NUMBER` or `URL`.** Button text. For `CODE_CODE` buttons, the text is a pre-set value and cannot be customized. For `OTP` buttons, if omitted, the text will default to a pre-set value localized to the template's language. For example, `Copy Code` for English (US). If your template is using a one-tap autofill button and you supply this value, the authentication template message will display a copy code button with this text if we are unable to validate your [handshake](https://developers.facebook.com/docs/whatsapp/business-management-api/authentication-templates/autofill-button-authentication-templates#handshake). Maximum 25 characters.
      - `url` string — **Required for button type `URL`.** URL of website. There can be at most 1 variable at the end of the URL. Example: `https://www.luckyshrub.com/shop?promo={{1}}`. 2000 characters maximum.
      - `phone_number` string — **Required for button type `PHONE_NUMBER`.** Alphanumeric string. Business phone number to be (display phone number) called when the user taps the button. 20 characters maximum.
      - `otp_type` 'COPY_CODE' | 'ONE_TAP' | 'ZERO_TAP' — Indicates button OTP type. Set to `COPY_CODE` if you want the template to use a copy code button, `ONE_TAP` to have it use a one-tap autofill button, or `ZERO_TAP` to have no button at all.
      - `autofill_text` string — **One-tap and zero-tap buttons only.** One-tap button text. Maximum 25 characters.
      - `package_name` string — **One-tap and zero-tap buttons only.** Your Android app's package name.
      - `signature_hash` string — **One-tap and zero-tap buttons only.** Your app signing key hash. See [App Signing Key Hash](https://developers.facebook.com/docs/whatsapp/business-management-api/authentication-templates/zero-tap-authentication-templates#app-signing-key-hash).
      - `zero_tap_terms_accepted` boolean — **Zero-tap buttons only.** Set to `true` to indicate that you understand that your use of zero-tap authentication is subject to the WhatsApp Business Terms of Service, and that it's your responsibility to ensure your customers expect that the code will be automatically filled in on their behalf when they choose to receive the zero-tap code through WhatsApp. If set to `false`, the template will not be created as you need to accept zero-tap terms before creating zero-tap enabled message templates.
      - `example` string[] — Sample full URL for a `URL` button with a variable.
      - `flow_id` string — **Conditionally required for button type `FLOW`.** The unique ID of the Flow. Cannot be used if `flow_name` or `flow_json` parameters are provided. Only one of these parameters is allowed.
      - `flow_name` string — **Conditionally required for button type `FLOW`.** The name of the Flow. Cannot be used if `flow_id` or `flow_json` parameters are provided. Only one of these parameters is allowed. The Flow ID is stored in the message template, not the name, so changing the Flow name will not affect existing message templates.
      - `flow_json` string — **Conditionally required for button type `FLOW`.** The Flow JSON encoded as string with escaping. The Flow JSON specifies the content of the Flow. Cannot be used if `flow_id` or `flow_name` parameters are provided. Only one of these parameters is allowed.
      - `flow_action` string — **Use for button type `FLOW`.** Either `navigate` or `data_exchange`. Defaults to `navigate`.
      - `navigate_screen` string — **Required if `flow_action` is `navigate`.** The unique ID of the Screen in the Flow.
    - `add_security_recommendation` boolean — **Optional. Only applicable in the `BODY` component of an AUTHENTICATION template.** Set to `true` if you want the template to include the string, *For your security, do not share this code.* Set to `false` to exclude the string.
    - `code_expiration_minutes` integer — **Optional. Only applicable in the `FOOTER` component of an AUTHENTICATION template.** Indicates number of minutes the password or code is valid. If omitted, the code expiration warning will not be displayed in the delivered message. Minimum 1, maximum 90.
    - `limited_time_offer` WhatsappTemplateComponentLimitedTimeOffer — Use for `LIMITED_TIME_OFFER` components.
      - `text` string — **Required.** Offer details text. Maximum 16 characters.
      - `has_expiration` boolean — **Optional.** Set to `true` to have the [offer expiration details](https://developers.facebook.com/docs/whatsapp/business-management-api/message-templates/limited-time-offer-templates#offer-expiration-details) appear in the delivered message. If set to `true`, the copy code button component must be included in the `buttons` array, and must appear first in the array. If set to `false`, offer expiration details will not appear in the delivered message and the copy code button component is optional. If including the copy code button, it must appear first in the `buttons` array.
    - `example` WhatsappTemplateComponentExample — **Required** when: - `type` is `HEADER`, and `format` is one of `IMAGE`, `GIF`, `VIDEO`, or `DOCUMENT`. Provide a sample media URL in `header_url`. - `type` is `HEADER`, `format` is `TEXT`, and a variable is used in `text`. Provide a sample value for that variable in `header_text`. There can be at most 1 variable in `HEADER` text. - `type` is `BODY`, and variables are used in `text`. Provide sample values for those variables in `body_text`.
      - `body_text` array[] — Sample values for variables in `text` of a `BODY` component.
        - string[]
      - `header_text` string[] — Sample value for the variable in `text` of a `HEADER` component.
      - `header_url` string[] — Sample media URL for a `HEADER` component whose format is one of `IMAGE`, `GIF`, `VIDEO`, or `DOCUMENT`. Supported types: - For `IMAGE`, the URL must end with one of `.jpg`, `.jpeg`, or `.png`, size limit is 5MB. - For `GIF`, the URL must end with `.mp4`, size limit is 3.5MB. - For `VIDEO`, the URL must end with `.mp4`, size limit is 16MB. - For `DOCUMENT`, the URL must end with `.pdf`, size limit is 100MB.
    - `cards` WhatsappTemplateComponentCard[] — **Required for type `CAROUSEL`.** Carousel templates support up to 10 carousel cards.
      - `components` WhatsappTemplateComponentCardComponent[] — **Required.** Card components.
        - `type` 'BODY' | 'HEADER' | 'BUTTONS' — **Required.** Card component type. - `BODY`: Body components are text-only components. Cards must have body text. - `HEADER`: Cards must have a media header (image or video). - `BUTTONS`: Buttons are interactive components that perform specific actions when tapped. Cards must have at least one button, up to 2 buttons.
        - `format` 'IMAGE' | 'VIDEO' — **Required for type `HEADER`.** Cards must have a media header (image or video).
        - `text` string — **Required for type `BODY`.** Card body text supports variables. Maximum 160 characters.
        - `buttons` WhatsappTemplateComponentButton[] — **Required for type `BUTTONS`.** Cards must have at least one button. Supports 2 buttons. Buttons can be the same or a mix of quick reply buttons, phone number buttons, or URL buttons.
          - `type` 'PHONE_NUMBER' | 'URL' | 'QUICK_REPLY' | 'COPY_CODE' | 'OTP' | 'CATALOG' | 'MPM' | 'FLOW' | 'ORDER_DETAILS' | 'VOICE_CALL', required — Button type. - `PHONE_NUMBER`: Phone number buttons call the specified business phone number when tapped by the app user. Templates are limited to one phone number button. - `URL`: URL buttons load the specified URL in the device's default web browser when tapped by the app user. Templates are limited to two URL buttons. - `QUICK_REPLY`: Quick reply buttons are custom text-only buttons that immediately message you with the specified text string when tapped by the app user. Templates are limited to 10 quick reply buttons. If using quick reply buttons with other buttons, buttons must be organized into two groups: quick reply buttons and non-quick reply buttons. - `COPY_CODE`: Copy code buttons copy a text string (defined when the template is sent in a template message) to the device's clipboard when tapped by the app user. Templates are limited to one copy code button. - `OTP`: One-time password (OTP) buttons are a special type of URL button component used with authentication templates. - `CATALOG`: When a customer taps the **View catalog** button in a catalog template message, your product catalog appears within WhatsApp. - `MPM`: Customers can browse products and sections by tapping the **View items** button in a multi-product template message. - `FLOW`: Use this type to specify the [Flow](https://developers.facebook.com/docs/whatsapp/flows) to be sent with the template message. - `ORDER_DETAILS`: Provides a order details button with `Review and Pay` text. - `VOICE_CALL`: Triggers a WhatsApp call, when clicked by a WhatsApp customer.
          - `text` string — **Required for button type `PHONE_NUMBER` or `URL`.** Button text. For `CODE_CODE` buttons, the text is a pre-set value and cannot be customized. For `OTP` buttons, if omitted, the text will default to a pre-set value localized to the template's language. For example, `Copy Code` for English (US). If your template is using a one-tap autofill button and you supply this value, the authentication template message will display a copy code button with this text if we are unable to validate your [handshake](https://developers.facebook.com/docs/whatsapp/business-management-api/authentication-templates/autofill-button-authentication-templates#handshake). Maximum 25 characters.
          - `url` string — **Required for button type `URL`.** URL of website. There can be at most 1 variable at the end of the URL. Example: `https://www.luckyshrub.com/shop?promo={{1}}`. 2000 characters maximum.
          - `phone_number` string — **Required for button type `PHONE_NUMBER`.** Alphanumeric string. Business phone number to be (display phone number) called when the user taps the button. 20 characters maximum.
          - `otp_type` 'COPY_CODE' | 'ONE_TAP' | 'ZERO_TAP' — Indicates button OTP type. Set to `COPY_CODE` if you want the template to use a copy code button, `ONE_TAP` to have it use a one-tap autofill button, or `ZERO_TAP` to have no button at all.
          - `autofill_text` string — **One-tap and zero-tap buttons only.** One-tap button text. Maximum 25 characters.
          - `package_name` string — **One-tap and zero-tap buttons only.** Your Android app's package name.
          - `signature_hash` string — **One-tap and zero-tap buttons only.** Your app signing key hash. See [App Signing Key Hash](https://developers.facebook.com/docs/whatsapp/business-management-api/authentication-templates/zero-tap-authentication-templates#app-signing-key-hash).
          - `zero_tap_terms_accepted` boolean — **Zero-tap buttons only.** Set to `true` to indicate that you understand that your use of zero-tap authentication is subject to the WhatsApp Business Terms of Service, and that it's your responsibility to ensure your customers expect that the code will be automatically filled in on their behalf when they choose to receive the zero-tap code through WhatsApp. If set to `false`, the template will not be created as you need to accept zero-tap terms before creating zero-tap enabled message templates.
          - `example` string[] — Sample full URL for a `URL` button with a variable.
          - `flow_id` string — **Conditionally required for button type `FLOW`.** The unique ID of the Flow. Cannot be used if `flow_name` or `flow_json` parameters are provided. Only one of these parameters is allowed.
          - `flow_name` string — **Conditionally required for button type `FLOW`.** The name of the Flow. Cannot be used if `flow_id` or `flow_json` parameters are provided. Only one of these parameters is allowed. The Flow ID is stored in the message template, not the name, so changing the Flow name will not affect existing message templates.
          - `flow_json` string — **Conditionally required for button type `FLOW`.** The Flow JSON encoded as string with escaping. The Flow JSON specifies the content of the Flow. Cannot be used if `flow_id` or `flow_name` parameters are provided. Only one of these parameters is allowed.
          - `flow_action` string — **Use for button type `FLOW`.** Either `navigate` or `data_exchange`. Defaults to `navigate`.
          - `navigate_screen` string — **Required if `flow_action` is `navigate`.** The unique ID of the Screen in the Flow.
        - `example` WhatsappTemplateComponentExample — **Required** when: - `type` is `HEADER`, and `format` is one of `IMAGE`, `GIF`, `VIDEO`, or `DOCUMENT`. Provide a sample media URL in `header_url`. - `type` is `HEADER`, `format` is `TEXT`, and a variable is used in `text`. Provide a sample value for that variable in `header_text`. There can be at most 1 variable in `HEADER` text. - `type` is `BODY`, and variables are used in `text`. Provide sample values for those variables in `body_text`.
          - `body_text` array[] — Sample values for variables in `text` of a `BODY` component.
            - string[]
          - `header_text` string[] — Sample value for the variable in `text` of a `HEADER` component.
          - `header_url` string[] — Sample media URL for a `HEADER` component whose format is one of `IMAGE`, `GIF`, `VIDEO`, or `DOCUMENT`. Supported types: - For `IMAGE`, the URL must end with one of `.jpg`, `.jpeg`, or `.png`, size limit is 5MB. - For `GIF`, the URL must end with `.mp4`, size limit is 3.5MB. - For `VIDEO`, the URL must end with `.mp4`, size limit is 16MB. - For `DOCUMENT`, the URL must end with `.pdf`, size limit is 100MB.
  - `ctaUrlLinkTrackingOptedOut` boolean — **Optional.** Indicates if template button click tracking is disabled. Set to `true` to disable button click tracking on the template, or `false` to enable. You can disable button click tracking on an individual template by setting this field to `true`. Once disabled, button engagement/clicks will not be displayed in the WhatsApp Manager when viewing the template's insights. If not provided, this value defaults to `false`, which means button click tracking is enabled by default.

## Response `200`

Successfully created a WhatsApp template.

- WhatsappTemplate — See [WhatsApp Templates](https://developers.facebook.com/docs/whatsapp/business-management-api/message-templates).
  - `officialTemplateId` string — Official template ID assigned by WhatsApp. This ID is used to identify the template in WhatsApp's system.
  - `wabaId` string, required — WhatsApp Business Account ID.
  - `name` string, required — Name of the template.
  - `language` string, required — Language code of the template. See [Supported Languages](https://developers.facebook.com/documentation/business-messaging/whatsapp/templates/supported-languages) for all codes.
  - `category` 'AUTHENTICATION' | 'MARKETING' | 'UTILITY' — Category of WhatsApp templates. - `AUTHENTICATION`: Enable businesses to authenticate users with one-time passcodes, potentially at multiple steps in the login process (e.g., account verification, account recovery, integrity challenges). - `MARKETING`: Include promotions or offers, informational updates, or invitations for customers to respond / take action. Any conversation that does not qualify as utility or authentication is a marketing conversation. - `UTILITY`: Facilitate a specific, agreed-upon request or transaction or update to a customer about an ongoing transaction, including post-purchase notifications and recurring billing statements.
  - `subCategory` 'ORDER_STATUS' — Subcategory of WhatsApp templates. - ORDER_STATUS: Order status template is categorized as `UTILITY` template and apart from name and language of choice, it has general template components such as `BODY`, `FOOTER` and additionally subcategory as `ORDER_STATUS`.
  - `previousCategory` string — This field indicates the template's previous category (or `null`, for newly created templates after April 1, 2023). Compare this value to the template's `category` field value, which indicates the template's current category.
  - `messageSendTtlSeconds` integer — If we are unable to deliver a message for an amount of time that exceeds its time-to-live, we will stop retrying and drop the message. By default, messages that use an authentication template have a default TTL of **10 minutes**, and messages that use a utility or marketing template have a default TTL of **30 days**. Set its value between `30` and `900` seconds (i.e., 30 seconds to 15 minutes) for authentication templates, or `30` and `43200` seconds (i.e., 30 seconds to 12 hours) for utility templates, or `43200` and `2592000` seconds (i.e., 12 hours to 30 days) for marketing templates. Alternatively, you can set this value to `-1`, which will set a custom TTL of 30 days for either type of template. We encourage you to set a time-to-live for all of your authentication templates, preferably equal to or less than your code expiration time, to ensure your customers only get a message when a code is still usable. Authentication templates created before October 23, 2024, have a default TTL of 30 days.
  - `components` WhatsappTemplateComponent[] — Template components. A template consists of `HEADER`, `BODY`, `FOOTER`, and `BUTTONS` components. `BODY` component is required, the other types are optional.
    - `type` 'BODY' | 'HEADER' | 'FOOTER' | 'BUTTONS' | 'LIMITED_TIME_OFFER' | 'CAROUSEL' — **Required.** Template component type. - `BODY`: Body components are text-only components and are required by all templates. Templates are limited to one body component. - `HEADER`: Headers are optional components that appear at the top of template messages. Headers support text, media (images, gif, videos, documents). Templates are limited to one header component. - `FOOTER`: Footers are optional text-only components that appear immediately after the body component. Templates are limited to one footer component. - `BUTTONS`: Buttons are optional interactive components that perform specific actions when tapped. - `LIMITED_TIME_OFFER`: Use for limited-time offer templates. The delivered message can display an offer expiration details section with a heading, an optional expiration timer, and the offer code itself. - `CAROUSEL`: Carousel templates allow you to send a single text message (1), accompanied by a set of up to 10 carousel cards (2) in a horizontally scrollable view.
    - `format` 'TEXT' | 'IMAGE' | 'GIF' | 'VIDEO' | 'DOCUMENT' | 'LOCATION' — **Required for type `HEADER`.**
    - `text` string — For body text (type = `BODY`), maximum 1024 characters. For header text (type = `HEADER`, format = `TEXT`), maximum 60 characters. For footer text (type = `FOOTER`), maximum 60 characters. For card body text (`CAROUSEL` card component type = `BODY`), maximum 160 characters.
    - `buttons` WhatsappTemplateComponentButton[] — **Required for type `BUTTONS`.** Buttons are optional interactive components that perform specific actions when tapped. Templates can have a mixture of up to 10 button components total, although there are limits to individual buttons of the same type as well as combination limits. If a template has more than three buttons, two buttons will appear in the delivered message and the remaining buttons will be replaced with a **See all options** button. Tapping the **See all options** button reveals the remaining buttons.
      - `type` 'PHONE_NUMBER' | 'URL' | 'QUICK_REPLY' | 'COPY_CODE' | 'OTP' | 'CATALOG' | 'MPM' | 'FLOW' | 'ORDER_DETAILS' | 'VOICE_CALL', required — Button type. - `PHONE_NUMBER`: Phone number buttons call the specified business phone number when tapped by the app user. Templates are limited to one phone number button. - `URL`: URL buttons load the specified URL in the device's default web browser when tapped by the app user. Templates are limited to two URL buttons. - `QUICK_REPLY`: Quick reply buttons are custom text-only buttons that immediately message you with the specified text string when tapped by the app user. Templates are limited to 10 quick reply buttons. If using quick reply buttons with other buttons, buttons must be organized into two groups: quick reply buttons and non-quick reply buttons. - `COPY_CODE`: Copy code buttons copy a text string (defined when the template is sent in a template message) to the device's clipboard when tapped by the app user. Templates are limited to one copy code button. - `OTP`: One-time password (OTP) buttons are a special type of URL button component used with authentication templates. - `CATALOG`: When a customer taps the **View catalog** button in a catalog template message, your product catalog appears within WhatsApp. - `MPM`: Customers can browse products and sections by tapping the **View items** button in a multi-product template message. - `FLOW`: Use this type to specify the [Flow](https://developers.facebook.com/docs/whatsapp/flows) to be sent with the template message. - `ORDER_DETAILS`: Provides a order details button with `Review and Pay` text. - `VOICE_CALL`: Triggers a WhatsApp call, when clicked by a WhatsApp customer.
      - `text` string — **Required for button type `PHONE_NUMBER` or `URL`.** Button text. For `CODE_CODE` buttons, the text is a pre-set value and cannot be customized. For `OTP` buttons, if omitted, the text will default to a pre-set value localized to the template's language. For example, `Copy Code` for English (US). If your template is using a one-tap autofill button and you supply this value, the authentication template message will display a copy code button with this text if we are unable to validate your [handshake](https://developers.facebook.com/docs/whatsapp/business-management-api/authentication-templates/autofill-button-authentication-templates#handshake). Maximum 25 characters.
      - `url` string — **Required for button type `URL`.** URL of website. There can be at most 1 variable at the end of the URL. Example: `https://www.luckyshrub.com/shop?promo={{1}}`. 2000 characters maximum.
      - `phone_number` string — **Required for button type `PHONE_NUMBER`.** Alphanumeric string. Business phone number to be (display phone number) called when the user taps the button. 20 characters maximum.
      - `otp_type` 'COPY_CODE' | 'ONE_TAP' | 'ZERO_TAP' — Indicates button OTP type. Set to `COPY_CODE` if you want the template to use a copy code button, `ONE_TAP` to have it use a one-tap autofill button, or `ZERO_TAP` to have no button at all.
      - `autofill_text` string — **One-tap and zero-tap buttons only.** One-tap button text. Maximum 25 characters.
      - `package_name` string — **One-tap and zero-tap buttons only.** Your Android app's package name.
      - `signature_hash` string — **One-tap and zero-tap buttons only.** Your app signing key hash. See [App Signing Key Hash](https://developers.facebook.com/docs/whatsapp/business-management-api/authentication-templates/zero-tap-authentication-templates#app-signing-key-hash).
      - `zero_tap_terms_accepted` boolean — **Zero-tap buttons only.** Set to `true` to indicate that you understand that your use of zero-tap authentication is subject to the WhatsApp Business Terms of Service, and that it's your responsibility to ensure your customers expect that the code will be automatically filled in on their behalf when they choose to receive the zero-tap code through WhatsApp. If set to `false`, the template will not be created as you need to accept zero-tap terms before creating zero-tap enabled message templates.
      - `example` string[] — Sample full URL for a `URL` button with a variable.
      - `flow_id` string — **Conditionally required for button type `FLOW`.** The unique ID of the Flow. Cannot be used if `flow_name` or `flow_json` parameters are provided. Only one of these parameters is allowed.
      - `flow_name` string — **Conditionally required for button type `FLOW`.** The name of the Flow. Cannot be used if `flow_id` or `flow_json` parameters are provided. Only one of these parameters is allowed. The Flow ID is stored in the message template, not the name, so changing the Flow name will not affect existing message templates.
      - `flow_json` string — **Conditionally required for button type `FLOW`.** The Flow JSON encoded as string with escaping. The Flow JSON specifies the content of the Flow. Cannot be used if `flow_id` or `flow_name` parameters are provided. Only one of these parameters is allowed.
      - `flow_action` string — **Use for button type `FLOW`.** Either `navigate` or `data_exchange`. Defaults to `navigate`.
      - `navigate_screen` string — **Required if `flow_action` is `navigate`.** The unique ID of the Screen in the Flow.
    - `add_security_recommendation` boolean — **Optional. Only applicable in the `BODY` component of an AUTHENTICATION template.** Set to `true` if you want the template to include the string, *For your security, do not share this code.* Set to `false` to exclude the string.
    - `code_expiration_minutes` integer — **Optional. Only applicable in the `FOOTER` component of an AUTHENTICATION template.** Indicates number of minutes the password or code is valid. If omitted, the code expiration warning will not be displayed in the delivered message. Minimum 1, maximum 90.
    - `limited_time_offer` WhatsappTemplateComponentLimitedTimeOffer — Use for `LIMITED_TIME_OFFER` components.
      - `text` string — **Required.** Offer details text. Maximum 16 characters.
      - `has_expiration` boolean — **Optional.** Set to `true` to have the [offer expiration details](https://developers.facebook.com/docs/whatsapp/business-management-api/message-templates/limited-time-offer-templates#offer-expiration-details) appear in the delivered message. If set to `true`, the copy code button component must be included in the `buttons` array, and must appear first in the array. If set to `false`, offer expiration details will not appear in the delivered message and the copy code button component is optional. If including the copy code button, it must appear first in the `buttons` array.
    - `example` WhatsappTemplateComponentExample — **Required** when: - `type` is `HEADER`, and `format` is one of `IMAGE`, `GIF`, `VIDEO`, or `DOCUMENT`. Provide a sample media URL in `header_url`. - `type` is `HEADER`, `format` is `TEXT`, and a variable is used in `text`. Provide a sample value for that variable in `header_text`. There can be at most 1 variable in `HEADER` text. - `type` is `BODY`, and variables are used in `text`. Provide sample values for those variables in `body_text`.
      - `body_text` array[] — Sample values for variables in `text` of a `BODY` component.
        - string[]
      - `header_text` string[] — Sample value for the variable in `text` of a `HEADER` component.
      - `header_url` string[] — Sample media URL for a `HEADER` component whose format is one of `IMAGE`, `GIF`, `VIDEO`, or `DOCUMENT`. Supported types: - For `IMAGE`, the URL must end with one of `.jpg`, `.jpeg`, or `.png`, size limit is 5MB. - For `GIF`, the URL must end with `.mp4`, size limit is 3.5MB. - For `VIDEO`, the URL must end with `.mp4`, size limit is 16MB. - For `DOCUMENT`, the URL must end with `.pdf`, size limit is 100MB.
    - `cards` WhatsappTemplateComponentCard[] — **Required for type `CAROUSEL`.** Carousel templates support up to 10 carousel cards.
      - `components` WhatsappTemplateComponentCardComponent[] — **Required.** Card components.
        - `type` 'BODY' | 'HEADER' | 'BUTTONS' — **Required.** Card component type. - `BODY`: Body components are text-only components. Cards must have body text. - `HEADER`: Cards must have a media header (image or video). - `BUTTONS`: Buttons are interactive components that perform specific actions when tapped. Cards must have at least one button, up to 2 buttons.
        - `format` 'IMAGE' | 'VIDEO' — **Required for type `HEADER`.** Cards must have a media header (image or video).
        - `text` string — **Required for type `BODY`.** Card body text supports variables. Maximum 160 characters.
        - `buttons` WhatsappTemplateComponentButton[] — **Required for type `BUTTONS`.** Cards must have at least one button. Supports 2 buttons. Buttons can be the same or a mix of quick reply buttons, phone number buttons, or URL buttons.
          - `type` 'PHONE_NUMBER' | 'URL' | 'QUICK_REPLY' | 'COPY_CODE' | 'OTP' | 'CATALOG' | 'MPM' | 'FLOW' | 'ORDER_DETAILS' | 'VOICE_CALL', required — Button type. - `PHONE_NUMBER`: Phone number buttons call the specified business phone number when tapped by the app user. Templates are limited to one phone number button. - `URL`: URL buttons load the specified URL in the device's default web browser when tapped by the app user. Templates are limited to two URL buttons. - `QUICK_REPLY`: Quick reply buttons are custom text-only buttons that immediately message you with the specified text string when tapped by the app user. Templates are limited to 10 quick reply buttons. If using quick reply buttons with other buttons, buttons must be organized into two groups: quick reply buttons and non-quick reply buttons. - `COPY_CODE`: Copy code buttons copy a text string (defined when the template is sent in a template message) to the device's clipboard when tapped by the app user. Templates are limited to one copy code button. - `OTP`: One-time password (OTP) buttons are a special type of URL button component used with authentication templates. - `CATALOG`: When a customer taps the **View catalog** button in a catalog template message, your product catalog appears within WhatsApp. - `MPM`: Customers can browse products and sections by tapping the **View items** button in a multi-product template message. - `FLOW`: Use this type to specify the [Flow](https://developers.facebook.com/docs/whatsapp/flows) to be sent with the template message. - `ORDER_DETAILS`: Provides a order details button with `Review and Pay` text. - `VOICE_CALL`: Triggers a WhatsApp call, when clicked by a WhatsApp customer.
          - `text` string — **Required for button type `PHONE_NUMBER` or `URL`.** Button text. For `CODE_CODE` buttons, the text is a pre-set value and cannot be customized. For `OTP` buttons, if omitted, the text will default to a pre-set value localized to the template's language. For example, `Copy Code` for English (US). If your template is using a one-tap autofill button and you supply this value, the authentication template message will display a copy code button with this text if we are unable to validate your [handshake](https://developers.facebook.com/docs/whatsapp/business-management-api/authentication-templates/autofill-button-authentication-templates#handshake). Maximum 25 characters.
          - `url` string — **Required for button type `URL`.** URL of website. There can be at most 1 variable at the end of the URL. Example: `https://www.luckyshrub.com/shop?promo={{1}}`. 2000 characters maximum.
          - `phone_number` string — **Required for button type `PHONE_NUMBER`.** Alphanumeric string. Business phone number to be (display phone number) called when the user taps the button. 20 characters maximum.
          - `otp_type` 'COPY_CODE' | 'ONE_TAP' | 'ZERO_TAP' — Indicates button OTP type. Set to `COPY_CODE` if you want the template to use a copy code button, `ONE_TAP` to have it use a one-tap autofill button, or `ZERO_TAP` to have no button at all.
          - `autofill_text` string — **One-tap and zero-tap buttons only.** One-tap button text. Maximum 25 characters.
          - `package_name` string — **One-tap and zero-tap buttons only.** Your Android app's package name.
          - `signature_hash` string — **One-tap and zero-tap buttons only.** Your app signing key hash. See [App Signing Key Hash](https://developers.facebook.com/docs/whatsapp/business-management-api/authentication-templates/zero-tap-authentication-templates#app-signing-key-hash).
          - `zero_tap_terms_accepted` boolean — **Zero-tap buttons only.** Set to `true` to indicate that you understand that your use of zero-tap authentication is subject to the WhatsApp Business Terms of Service, and that it's your responsibility to ensure your customers expect that the code will be automatically filled in on their behalf when they choose to receive the zero-tap code through WhatsApp. If set to `false`, the template will not be created as you need to accept zero-tap terms before creating zero-tap enabled message templates.
          - `example` string[] — Sample full URL for a `URL` button with a variable.
          - `flow_id` string — **Conditionally required for button type `FLOW`.** The unique ID of the Flow. Cannot be used if `flow_name` or `flow_json` parameters are provided. Only one of these parameters is allowed.
          - `flow_name` string — **Conditionally required for button type `FLOW`.** The name of the Flow. Cannot be used if `flow_id` or `flow_json` parameters are provided. Only one of these parameters is allowed. The Flow ID is stored in the message template, not the name, so changing the Flow name will not affect existing message templates.
          - `flow_json` string — **Conditionally required for button type `FLOW`.** The Flow JSON encoded as string with escaping. The Flow JSON specifies the content of the Flow. Cannot be used if `flow_id` or `flow_name` parameters are provided. Only one of these parameters is allowed.
          - `flow_action` string — **Use for button type `FLOW`.** Either `navigate` or `data_exchange`. Defaults to `navigate`.
          - `navigate_screen` string — **Required if `flow_action` is `navigate`.** The unique ID of the Screen in the Flow.
        - `example` WhatsappTemplateComponentExample — **Required** when: - `type` is `HEADER`, and `format` is one of `IMAGE`, `GIF`, `VIDEO`, or `DOCUMENT`. Provide a sample media URL in `header_url`. - `type` is `HEADER`, `format` is `TEXT`, and a variable is used in `text`. Provide a sample value for that variable in `header_text`. There can be at most 1 variable in `HEADER` text. - `type` is `BODY`, and variables are used in `text`. Provide sample values for those variables in `body_text`.
          - `body_text` array[] — Sample values for variables in `text` of a `BODY` component.
            - string[]
          - `header_text` string[] — Sample value for the variable in `text` of a `HEADER` component.
          - `header_url` string[] — Sample media URL for a `HEADER` component whose format is one of `IMAGE`, `GIF`, `VIDEO`, or `DOCUMENT`. Supported types: - For `IMAGE`, the URL must end with one of `.jpg`, `.jpeg`, or `.png`, size limit is 5MB. - For `GIF`, the URL must end with `.mp4`, size limit is 3.5MB. - For `VIDEO`, the URL must end with `.mp4`, size limit is 16MB. - For `DOCUMENT`, the URL must end with `.pdf`, size limit is 100MB.
  - `status` 'PENDING' | 'REJECTED' | 'APPROVED' | 'PAUSED' | 'DISABLED' | 'ARCHIVED' | 'IN_APPEAL' | 'DELETED' — The status of a WhatsApp template. - `PENDING`: The template is still under review. Review can take up to 24 hours. - `REJECTED`: The template has been rejected during review process. - `APPROVED`: The template is approved, and you may begin sending it to customers. - `PAUSED`: The template has been paused due to recurring negative feedback from customers. Message templates with this status cannot be sent to customers. See [Template Pausing](https://developers.facebook.com/docs/whatsapp/message-templates/guidelines#template-pausing). - `DISABLED`: The template has been disabled due to recurring negative feedback from customers or for violating one or more of our policies. Message templates with this status cannot be sent to customers. You may be able to edit a disabled message template and request an appeal. See [Appeals](https://developers.facebook.com/docs/whatsapp/message-templates/guidelines#appeals). - `ARCHIVED`: The template has been archived. Archived templates cannot be sent or edited. - `IN_APPEAL`: The template is in appeal. See also [Template Appeals](https://developers.facebook.com/docs/whatsapp/message-templates/guidelines#appeals). - `DELETED`: The template is deleted.
  - `qualityRating` 'GREEN' | 'YELLOW' | 'RED' | 'UNKNOWN' — Quality rating of WhatsApp template. One of `GREEN`, `YELLOW`, `RED`, or `UNKNOWN`. See also [Template Quality Rating](https://developers.facebook.com/docs/whatsapp/message-templates/guidelines/#quality-rating). - `GREEN`: High quality. - `YELLOW`: Medium quality. - `RED`: Low quality. - `UNKNOWN`: Unknown quality.
  - `reason` string — The reason why the template is rejected.
  - `createTime` string, date-time — The time at which this object is created, formatted in [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339). e.g., `2022-06-01T12:00:00.000Z`.
  - `updateTime` string, date-time — The time at which this object is updated, formatted in [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339). e.g., `2022-06-01T12:00:00.000Z`.
  - `statusUpdateEvent` 'PENDING' | 'APPROVED' | 'REJECTED' | 'IN_APPEAL' | 'PAUSED' | 'FLAGGED' | 'DISABLED' | 'ARCHIVED' | 'UNARCHIVED' | 'REINSTATED' | 'PENDING_DELETION' — Used when an event happened on WhatsApp template status updates. - `PENDING`: Pending. - `APPROVED`: Approved. - `REJECTED`: Rejected. - `IN_APPEAL`: In appeal. See also [Template Appeals](https://developers.facebook.com/docs/whatsapp/message-templates/guidelines#appeals). - `PAUSED`: Paused. See also [Template Pausing](https://developers.facebook.com/docs/whatsapp/message-templates/guidelines#template-pausing). - `FLAGGED`: Flagged. The template is scheduled for disabling. - `DISABLED`: Disabled. See also [Template Pausing](https://developers.facebook.com/docs/whatsapp/message-templates/guidelines#template-pausing). - `ARCHIVED`: Archived. The template status is updated to `ARCHIVED`. - `UNARCHIVED`: Unarchived. The template status is restored to the current status returned by Meta. If the status is `APPROVED`, this event still does not represent a new approval review. - `REINSTATED`: Reinstated. - `PENDING_DELETION`: Pending deletion.
  - `disableDate` string — The date at which the template will be disabled. When a WhatsApp template `FLAGGED` event is received, this field is set.
  - `whatsappApiError` WhatsappApiError — The original error object returned by WhatsApp. See [Handling Errors](https://developers.facebook.com/docs/graph-api/guides/error-handling), [Cloud API Error Codes](https://developers.facebook.com/docs/whatsapp/cloud-api/support/error-codes).
    - `message` string, required — A human-readable description of the error.
    - `code` string, required — An error code.
    - `type` string — Error type.
    - `error_subcode` string — Additional code about the error.
    - `error_user_msg` string — The message to display to the user. The language of the message is based on the locale of the API request.
    - `error_user_title` string — The title of the dialog, if shown. The language of the message is based on the locale of the API request.
    - `fbtrace_id` string — Internal support identifier. When reporting a bug related to a Graph API call, include the fbtrace_id to help us find log data for debugging.
    - `error_data` object — Additional data about the error. A string or map. - For template APIs, this field is a string describing the reason for the error. - For message APIs, this field is a map with property `details` describing the reason for the error.

---

[API](https://skmtc.net/ycloud/apis/ycloud-api.md) · [All operations](https://skmtc.net/ycloud/apis/ycloud-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/ycloud/ycloud-api/versions/4e13d3ca9df8/schema)
