# Update a template in project

Updates a template DRAFT.
    
    Note that it is not possible to update all fields for a template,
    if you want to update a field that is not supported you will need to delete the draft and create a new one.

    Update a template REJECTED / APPROVED / PAUSED / DISABLED

    It is possible to update templates that have been rejected, approved, paused or disabled, we will automatically set the status to draft when update a rejected template.

Endpoint: PATCH /v1/projects/{projectId}/whatsapp/templates/{templateName}/languages/{languageCode}
Version: 1.2.79
Security: BasicAuth, BearerAuth, OAuth2Production

## Path parameters:

  - `projectId` (string, required)
    The unique ID of the project. You can find this on the Sinch Dashboard.

  - `templateName` (string, required)
    The unique name of the template.

  - `languageCode` (string, required)
    The language code of the specific template.
    Enum: "AF", "AR", "AZ", "BG", "BN", "CA", "CS", "DA", "DE", "EL", "EN", "EN_GB", "EN_US", "ES", "ES_AR", "ES_ES", "ES_MX", "ET", "FA", "FI", "FIL", "FR", "GA", "GU", "HA", "HE", "HI", "HR", "HU", "ID", "IT", "JA", "KA", "KK", "KN", "KO", "KY_KG", "LO", "LT", "LV", "MK", "ML", "MR", "MS", "NB", "NL", "PA", "PL", "PT_BR", "PT_PT", "RO", "RU", "RW_RW", "SK", "SL", "SQ", "SR", "SV", "SW", "TA", "TE", "TH", "TR", "UK", "UR", "UZ", "VI", "ZH_CN", "ZH_HK", "ZH_TW", "ZU", "UNRECOGNIZED"

## Request fields (application/json):

  - `status` (string)
    Create as draft or submit. Defaults to draft.
    Enum: "DRAFT", "SUBMIT"

  - `category` (string)
    Works if status template is DRAFT or it was rejected with INCORRECT_CATEGORY.
    Enum: "AUTHENTICATION", "MARKETING", "UTILITY"

  - `allowCategoryChange` (boolean)
    Works if status template is DRAFT or it was rejected with INCORRECT_CATEGORY True if Meta should be allowed to change the category if they determine the category is wrong. If false, Meta might reject the template if they determine the category is wrong based on the template contents. Defaults to false.

  - `details` (object)
    'Template input details and information.' Not required for draft.

  - `details.components` (array) — one of:
    List of components in the template. Must contain a BODY component and can only have one entry of each type. Not required for draft. Field 'type' must have unique values across items.
    - WhatsappLocationHeaderComponentInputDto:
      - `type` (string, required)
        Enum: "HEADER"
      - `format` (string, required)
        Enum: "LOCATION"
    - WhatsappTextHeaderComponentInputDto:
      - `type` (string, required)
        Enum: same as `type` in "WhatsappLocationHeaderComponentInputDto" (1 values)
      - `format` (string, required)
        Enum: "TEXT"
      - `text` (string, required)
        Text to show in the header. Can contain one header variable. Not required for draft.
      - `example` (string)
        Example for the header variable. Required if there is a variable in the text header.
    - WhatsappMediaHeaderComponentInputDto:
      - `type` (string, required)
        Enum: same as `type` in "WhatsappLocationHeaderComponentInputDto" (1 values)
      - `format` (string, required)
        Enum: "DOCUMENT", "IMAGE", "VIDEO"
      - `example` (object, required)
        Not required for draft.
      - `example.url` (string, required)
        File Requirements
1) Image
- Images must be 8-bit, RGB or RGBA
- supported mime types: image/jpeg or image/png
- max file size: 5MB
2) Video
- Only H.264 video codec and AAC audio codec is supported.
- We support videos with a single audio stream or no audio stream.
- supported mime types: video/3gp or video/mp4
- max file size: 16MB
3) Document
- supported mime types: application/pdf
- max file size: 100MB
Not required for draft.
      - `example.mimeType` (string)
        Optional mime type of file if it can not be determined by the file contents.
        Enum: "IMAGE/JPEG", "IMAGE/PNG", "APPLICATION/PDF", "VIDEO/3GP", "VIDEO/MP4"
    - WhatsappBodyComponentInputDto:
      - `type` (string, required)
        Enum: "BODY"
      - `text` (string)
      - `examples` (array)
        Examples for the body variables. Requires one example for each variable in the body text. If no variables are used, the examples are optional.
      - `addSecurityRecommendation` (boolean)
        Only valid if template category is AUTHENTICATION. If true, adds a security recommendation to the body. Defaults to false.
    - WhatsappFooterComponentInputDto:
      - `type` (string, required)
        Enum: "FOOTER"
      - `text` (string)
      - `codeExpirationMinutes` (number)
        Only valid if template category is AUTHENTICATION. If set will add a text detailing the expiration time.
    - WhatsappButtonsComponentInputDto:
      - `type` (string, required)
        Enum: "BUTTONS"
      - `buttons` (array, required) — one of:
        Not required for draft. Each field in (value, text) must have unique values across items.
        - WhatsappFlowButtonInputDto:
          - `type` (string, required)
            Enum: "FLOW"
          - `text` (string, required)
            Text to display on the Flow button. Not required for draft.
          - `flowId` (string, required)
            Flow ID to launch when button is pressed. Not required for draft.
          - `flowAction` (string, required)
            Flow action. Not required for draft.
            Enum: "DATA_EXCHANGE", "NAVIGATE"
          - `navigateScreen` (string)
            The unique ID of the first screen. Required for Navigate action.
        - WhatsappOtpButtonInputDto:
          - `type` (string, required)
            Enum: "OTP"
          - `otpType` (string, required)
            Enum: "COPY_CODE", "ONE_TAP", "ZERO_TAP"
          - `text` (string, required)
            Not required for draft.
          - `autofillText` (string)
            One-tap autofill button label text.
          - `supportedApps` (array)
            List of supported apps for the OTP button.
          - `supportedApps.packageName` (string, required)
            Your Android app's package name.
          - `supportedApps.signatureHash` (string, required)
            Your app signing key hash.
          - `zeroTapTermsAccepted` (boolean)
            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.
          - `packageName` (string)
            Your Android app's package name.
          - `signatureHash` (string)
            Your app signing key hash.
        - WhatsappPhoneNumberButtonInputDto:
          - `type` (string, required)
            Enum: "PHONE_NUMBER"
          - `text` (string, required)
            Not required for draft.
          - `phoneNumber` (string, required)
            Not required for draft.
        - WhatsappQuickReplyButtonInputDto:
          - `type` (string, required)
            Enum: "QUICK_REPLY"
          - `text` (string, required)
            Not required for draft.
        - WhatsappUrlButtonInputDto:
          - `type` (string, required)
            Enum: "URL"
          - `text` (string, required)
            Not required for draft.
          - `url` (string, required)
            The url address. To make it dynamic you can add '{{1}}' to the end of the url eg,

  https://www.my-website.com?name={{1}}, and not

  https://www.my-{{1}}.com.

  Restricted domains: wa.me or whatsapp.com
  
Not required for draft.
          - `example` (string)
            Example of the full url together with the dynamic value. Required if there is a {{1}} in the URL field, eg
  
  If the 'url' field is 'https://www.my-website.com?name={{1}}', then example can have the following value

  'example' = 'https://www.my-website.com?name=john'
  
Not required for draft.
    - WhatsappInputCarouselComponentDto:
      - `type` (string, required)
        Enum: "CAROUSEL"
      - `cards` (array, required)
        Media cards.
All cards defined on a template must have the same components.
It is only necessary to define two product cards upon template creation. 
An approved template with two product cards can be used to send up to 10 cards in a template message.
Not required for draft.
      - `cards.components` (array, required) — one of:
        List of components in the cards.
Each card in the template has an image or video header asset, card body text, and up to two buttons.
All cards defined on a template must have the same components.
Not required for draft.

Field 'type' must have unique values across items.
        - WhatsappInputCardHeaderComponentDto:
          - `type` (string, required)
            Enum: same as `type` in "WhatsappLocationHeaderComponentInputDto" (1 values)
          - `format` (string, required)
            Card header format.
            Enum: "IMAGE", "VIDEO"
          - `example` (object, required)
            Uploaded media asset handle.
Media assets are automatically cropped to a wide ratio based on the WhatsApp user's device.
Not required for draft.
          - `example.url` (string, required)
            File Requirements
1) Image
- Images must be 8-bit, RGB or RGBA
- supported mime types: image/jpeg or image/png
- max file size: 5MB
2) Video
- Only H.264 video codec and AAC audio codec is supported.
- We support videos with a single audio stream or no audio stream.
- supported mime types: video/3gp or video/mp4
- max file size: 16MB
Not required for draft.
          - `example.mimeType` (string)
            Optional mime type of file if it can not be determined by the file contents.
            Enum: same as `example.mimeType` in "WhatsappMediaHeaderComponentInputDto" (5 values)
        - WhatsappInputCardBodyComponentDto:
          - `type` (string, required)
            Enum: same as `type` in "WhatsappBodyComponentInputDto" (1 values)
          - `text` (string, required)
            Card body text. Supports variables. Not required for draft.
          - `examples` (array)
            Examples for the body variables. Requires one example for each variable in the body text. If no variables are used, the examples are optional.
        - WhatsappInputCardButtonsComponentDto:
          - `type` (string, required)
            Enum: same as `type` in "WhatsappButtonsComponentInputDto" (1 values)
          - `buttons` (array, required) — one of:
            Card buttons.
Button combinations can be a mix of quick reply buttons, phone number buttons, and URL buttons.
Not required for draft.

Fields (type, text) must not all share the same value across items.
            - WhatsappUrlButtonInputDto:
              - `type` (string, required)
                Enum: same as `type` in "WhatsappUrlButtonInputDto" (1 values)
              - `text` (string, required)
                Not required for draft.
              - `url` (string, required)
                The url address. To make it dynamic you can add '{{1}}' to the end of the url eg,

  https://www.my-website.com?name={{1}}, and not

  https://www.my-{{1}}.com.

  Restricted domains: wa.me or whatsapp.com
  
Not required for draft.
              - `example` (string)
                Example of the full url together with the dynamic value. Required if there is a {{1}} in the URL field, eg
  
  If the 'url' field is 'https://www.my-website.com?name={{1}}', then example can have the following value

  'example' = 'https://www.my-website.com?name=john'
  
Not required for draft.
            - WhatsappQuickReplyButtonInputDto:
              - `type` (string, required)
                Enum: same as `type` in "WhatsappQuickReplyButtonInputDto" (1 values)
              - `text` (string, required)
                Not required for draft.
            - WhatsappPhoneNumberButtonInputDto:
              - `type` (string, required)
                Enum: same as `type` in "WhatsappPhoneNumberButtonInputDto" (1 values)
              - `text` (string, required)
                Not required for draft.
              - `phoneNumber` (string, required)
                Not required for draft.

  - `details.messageSendTtlSeconds` (number)
    Template message delivery retry time-to-live (TTL) override value. If unable to deliver the template message, it will be periodically retry for this period of time. If it is unable to deliver the message for this period of time, the message will be dropped.

|  | AUTHENTICATION | MARKETING | UTILITY |
| -- | -- | -- | -- |
| Default | 10 minutes | 30 days | 30 days |
| Customizable range | 10 seconds to 15 minutes | 12 hours to 30 days | 30 seconds to 12 hours |
| Valid values | 10 to 900 seconds | 43200 to 2592000 seconds | 30 to 43200 seconds |

  Please note that authentication templates created before October 23, 2024, have a default TTL of 30 days.

## Response 200 fields (application/json):

  - `name` (string, required)

  - `language` (string, required)
    Enum: same as `languageCode` (72 values)

  - `category` (string, required)
    Enum: "AUTHENTICATION", "MARKETING", "UTILITY", "UNRECOGNIZED"

  - `analytics` (array, required)
    Template analytics.

  - `analytics.sent` (number, required)
    Number of times template has been sent.

  - `analytics.delivered` (number, required)
    Number of times template has been delivered.

  - `analytics.read` (number, required)
    Number of times template has been read.

  - `analytics.start` (string, required)
    The UTC Date Time in ISO 8601 for start of date range.

  - `analytics.end` (string, required)
    The UTC Date Time in ISO 8601 for end of date range.

  - `analytics.buttons` (array, required)
    Number of times buttons in the template has been clicked.

  - `analytics.buttons.type` (string, required)
    Type of button.
    Enum: "QUICK_REPLY", "UNIQUE_URL", "URL", "UNRECOGNIZED"

  - `analytics.buttons.content` (string, required)
    Content of the button.

  - `analytics.buttons.clicks` (number, required)
    Number of times the button has been clicked.

  - `isMetaGenerated` (boolean, required)
    Indicates if the template was auto-generated by Meta.

  - `whatsappId` (string)

  - `state` (string)
    Enum: "APPROVED", "DISABLED", "PAUSED", "REJECTED"

  - `rejectionCode` (string)
    Rejection code if template is in status 'REJECTED'
    Enum: "ABUSIVE_CONTENT", "INCORRECT_CATEGORY", "INVALID_FORMAT", "NONE", "SCAM", "UNRECOGNIZED"

  - `qualityScore` (string)
    Quality score of the HSM.
    Enum: "QUALITY_SCORE_GREEN", "QUALITY_SCORE_RED", "QUALITY_SCORE_YELLOW", "QUALITY_SCORE_UNKNOWN", "UNRECOGNIZED"

  - `changes` (object)
    Object containing changes on the template. If empty the changes has been approved and applied to the template.

  - `changes.status` (string, required)
    The current status of the changes.
    
    DRAFT: The changes has not been submitted.
    IN_PROGRESS: The changes has been submitted.
    Enum: "DRAFT", "IN_PROGRESS", "REJECTED"

  - `changes.allowCategoryChange` (boolean)
    True if Meta should be allowed to change the category if they determine the category is wrong. If false, Meta might reject the template if they determine the category is wrong based on the template contents. Defaults to false.

  - `changes.details` (array) — one of:
    Template details and information.
    - WhatsappTemplateDetailsDto:
      - `components` (array, required) — one of:
        List of components in the template. Must contain a BODY component and can only have one entry of each type.
        - WhatsappTextHeaderComponentDto:
          - `type` (string, required)
            Enum: same as `type` in "WhatsappLocationHeaderComponentInputDto" (1 values)
          - `format` (string, required)
            Enum: same as `format` in "WhatsappTextHeaderComponentInputDto" (1 values)
          - `text` (string)
            Text to show in the header
          - `example` (string)
            Example for the header variable.
        - WhatsappMediaHeaderComponentDto:
          - `type` (string, required)
            Enum: same as `type` in "WhatsappLocationHeaderComponentInputDto" (1 values)
          - `format` (string, required)
            Enum: same as `format` in "WhatsappMediaHeaderComponentInputDto" (3 values)
          - `example` (object)
          - `example.url` (string)
        - WhatsappBodyComponentDto:
          - `type` (string, required)
            Enum: same as `type` in "WhatsappBodyComponentInputDto" (1 values)
          - `text` (string)
          - `examples` (array)
            Examples for the body variables.
          - `addSecurityRecommendation` (boolean)
        - WhatsappFooterComponentDto:
          - `type` (string, required)
            Enum: same as `type` in "WhatsappFooterComponentInputDto" (1 values)
          - `text` (string)
          - `codeExpirationMinutes` (number)
        - WhatsappButtonsComponentDto:
          - `type` (string, required)
            Enum: same as `type` in "WhatsappButtonsComponentInputDto" (1 values)
          - `buttons` (array, required) — one of:
            - WhatsappPhoneNumberButtonDto:
              - `type` (string, required)
                Enum: same as `type` in "WhatsappPhoneNumberButtonInputDto" (1 values)
              - `text` (string)
              - `phoneNumber` (string)
            - WhatsappUrlButtonDto:
              - `type` (string, required)
                Enum: same as `type` in "WhatsappUrlButtonInputDto" (1 values)
              - `text` (string)
              - `url` (string)
              - `example` (string)
            - WhatsappQuickReplyButtonDto:
              - `type` (string, required)
                Enum: same as `type` in "WhatsappQuickReplyButtonInputDto" (1 values)
              - `text` (string)
            - WhatsappOtpButtonDto:
              - `type` (string, required)
                Enum: same as `type` in "WhatsappOtpButtonInputDto" (1 values)
              - `otpType` (string, required)
                Enum: "COPY_CODE", "ONE_TAP", "ZERO_TAP", "UNRECOGNIZED"
              - `text` (string)
              - `autofillText` (string)
              - `supportedApps` (array)
              - `supportedApps.packageName` (string, required)
              - `supportedApps.signatureHash` (string, required)
              - `zeroTapTermsAccepted` (boolean)
              - `packageName` (string)
              - `signatureHash` (string)
            - WhatsappFlowButtonDto:
              - `type` (string, required)
                Enum: same as `type` in "WhatsappFlowButtonInputDto" (1 values)
              - `text` (string)
                Text to display on the Flow button
              - `flowId` (string)
                Flow ID to launch when button is pressed
              - `flowAction` (string)
                Flow action
                Enum: "DATA_EXCHANGE", "NAVIGATE", "UNKNOWN", "UNRECOGNIZED"
              - `navigateScreen` (string)
                The unique ID of the first screen. Required for Navigate action.
        - WhatsappLocationHeaderComponentDto:
          - `type` (string, required)
            Enum: same as `type` in "WhatsappLocationHeaderComponentInputDto" (1 values)
          - `format` (string, required)
            Enum: same as `format` in "WhatsappLocationHeaderComponentInputDto" (1 values)
        - WhatsappCarouselComponentDto:
          - `type` (string, required)
            Enum: same as `type` in "WhatsappInputCarouselComponentDto" (1 values)
          - `cards` (array, required)
            Media cards.
          - `cards.components` (array, required) — one of:
            List of components in the cards.
            - WhatsappCardHeaderComponentDto:
              - `type` (string, required)
                Enum: same as `type` in "WhatsappLocationHeaderComponentInputDto" (1 values)
              - `format` (string, required)
                Card header format.
                Enum: same as `format` in "WhatsappInputCardHeaderComponentDto" (2 values)
              - `example` (object)
                Uploaded media asset handle.
              - `example.url` (string)
            - WhatsappCardBodyComponentDto:
              - `type` (string, required)
                Enum: same as `type` in "WhatsappBodyComponentInputDto" (1 values)
              - `examples` (array)
                Examples for the body variables.
              - `text` (string)
                Card body text.
            - WhatsappCardButtonsComponentDto:
              - `type` (string, required)
                Enum: same as `type` in "WhatsappButtonsComponentInputDto" (1 values)
              - `buttons` (array, required) — one of:
                Card buttons.
                - WhatsappUrlButtonDto:
                  - `type` (string, required)
                    Enum: same as `type` in "WhatsappUrlButtonInputDto" (1 values)
                  - `text` (string)
                  - `url` (string)
                  - `example` (string)
                - WhatsappQuickReplyButtonDto:
                  - `type` (string, required)
                    Enum: same as `type` in "WhatsappQuickReplyButtonInputDto" (1 values)
                  - `text` (string)
                - WhatsappPhoneNumberButtonDto:
                  - `type` (string, required)
                    Enum: same as `type` in "WhatsappPhoneNumberButtonInputDto" (1 values)
                  - `text` (string)
                  - `phoneNumber` (string)
      - `messageSendTtlSeconds` (number)
        Template message delivery retry time-to-live (TTL) override value. If unable to deliver the template message, it will be periodically retry for this period of time. If it is unable to deliver the message for this period of time, the message will be dropped.

|  | AUTHENTICATION | MARKETING | UTILITY |
| -- | -- | -- | -- |
| Default | 10 minutes | 30 days | 30 days |
| Customizable range | 10 seconds to 15 minutes | 12 hours to 30 days | 30 seconds to 12 hours |
| Valid values | 10 to 900 seconds | 43200 to 2592000 seconds | 30 to 43200 seconds |

  Please note that authentication templates created before October 23, 2024, have a default TTL of 30 days.
    - WhatsappTemplateChangesDetailsDto:
      - `components` (array) — one of:
        The current status of the changes.
    
    DRAFT: The changes has not been submitted.
    IN_PROGRESS: The changes has been submitted.
        - WhatsappTextHeaderComponentDto:
          - `type` (string, required)
            Enum: same as `type` in "WhatsappLocationHeaderComponentInputDto" (1 values)
          - `format` (string, required)
            Enum: same as `format` in "WhatsappTextHeaderComponentInputDto" (1 values)
          - `text` (string)
            Text to show in the header
          - `example` (string)
            Example for the header variable.
        - WhatsappMediaHeaderComponentDto:
          - `type` (string, required)
            Enum: same as `type` in "WhatsappLocationHeaderComponentInputDto" (1 values)
          - `format` (string, required)
            Enum: same as `format` in "WhatsappMediaHeaderComponentInputDto" (3 values)
          - `example` (object)
          - `example.url` (string)
        - WhatsappLocationHeaderComponentDto:
          - `type` (string, required)
            Enum: same as `type` in "WhatsappLocationHeaderComponentInputDto" (1 values)
          - `format` (string, required)
            Enum: same as `format` in "WhatsappLocationHeaderComponentInputDto" (1 values)
        - WhatsappBodyComponentDto:
          - `type` (string, required)
            Enum: same as `type` in "WhatsappBodyComponentInputDto" (1 values)
          - `text` (string)
          - `examples` (array)
            Examples for the body variables.
          - `addSecurityRecommendation` (boolean)
        - WhatsappFooterComponentDto:
          - `type` (string, required)
            Enum: same as `type` in "WhatsappFooterComponentInputDto" (1 values)
          - `text` (string)
          - `codeExpirationMinutes` (number)
        - WhatsappButtonsComponentDto:
          - `type` (string, required)
            Enum: same as `type` in "WhatsappButtonsComponentInputDto" (1 values)
          - `buttons` (array, required) — one of:
            - WhatsappPhoneNumberButtonDto:
              - `type` (string, required)
                Enum: same as `type` in "WhatsappPhoneNumberButtonInputDto" (1 values)
              - `text` (string)
              - `phoneNumber` (string)
            - WhatsappUrlButtonDto:
              - `type` (string, required)
                Enum: same as `type` in "WhatsappUrlButtonInputDto" (1 values)
              - `text` (string)
              - `url` (string)
              - `example` (string)
            - WhatsappQuickReplyButtonDto:
              - `type` (string, required)
                Enum: same as `type` in "WhatsappQuickReplyButtonInputDto" (1 values)
              - `text` (string)
            - WhatsappOtpButtonDto:
              - `type` (string, required)
                Enum: same as `type` in "WhatsappOtpButtonInputDto" (1 values)
              - `otpType` (string, required)
                Enum: same as `otpType` in "WhatsappOtpButtonDto" (4 values)
              - `text` (string)
              - `autofillText` (string)
              - `supportedApps` (array)
              - `supportedApps.packageName` (string, required)
              - `supportedApps.signatureHash` (string, required)
              - `zeroTapTermsAccepted` (boolean)
              - `packageName` (string)
              - `signatureHash` (string)
            - WhatsappFlowButtonDto:
              - `type` (string, required)
                Enum: same as `type` in "WhatsappFlowButtonInputDto" (1 values)
              - `text` (string)
                Text to display on the Flow button
              - `flowId` (string)
                Flow ID to launch when button is pressed
              - `flowAction` (string)
                Flow action
                Enum: same as `flowAction` in "WhatsappFlowButtonDto" (4 values)
              - `navigateScreen` (string)
                The unique ID of the first screen. Required for Navigate action.
        - WhatsappCarouselComponentDto:
          - `type` (string, required)
            Enum: same as `type` in "WhatsappInputCarouselComponentDto" (1 values)
          - `cards` (array, required)
            Media cards.
          - `cards.components` (array, required) — one of:
            List of components in the cards.
            - WhatsappCardHeaderComponentDto:
              - `type` (string, required)
                Enum: same as `type` in "WhatsappLocationHeaderComponentInputDto" (1 values)
              - `format` (string, required)
                Card header format.
                Enum: same as `format` in "WhatsappInputCardHeaderComponentDto" (2 values)
              - `example` (object)
                Uploaded media asset handle.
              - `example.url` (string)
            - WhatsappCardBodyComponentDto:
              - `type` (string, required)
                Enum: same as `type` in "WhatsappBodyComponentInputDto" (1 values)
              - `examples` (array)
                Examples for the body variables.
              - `text` (string)
                Card body text.
            - WhatsappCardButtonsComponentDto:
              - `type` (string, required)
                Enum: same as `type` in "WhatsappButtonsComponentInputDto" (1 values)
              - `buttons` (array, required) — one of:
                Card buttons.
                - WhatsappUrlButtonDto:
                  - `type` (string, required)
                    Enum: same as `type` in "WhatsappUrlButtonInputDto" (1 values)
                  - `text` (string)
                  - `url` (string)
                  - `example` (string)
                - WhatsappQuickReplyButtonDto:
                  - `type` (string, required)
                    Enum: same as `type` in "WhatsappQuickReplyButtonInputDto" (1 values)
                  - `text` (string)
                - WhatsappPhoneNumberButtonDto:
                  - `type` (string, required)
                    Enum: same as `type` in "WhatsappPhoneNumberButtonInputDto" (1 values)
                  - `text` (string)
                  - `phoneNumber` (string)
      - `messageSendTtlSeconds` (number)
        Template message delivery retry time-to-live (TTL) override value. If unable to deliver the template message, it will be periodically retry for this period of time. If it is unable to deliver the message for this period of time, the message will be dropped.

|  | AUTHENTICATION | MARKETING | UTILITY |
| -- | -- | -- | -- |
| Default | 10 minutes | 30 days | 30 days |
| Customizable range | 10 seconds to 15 minutes | 12 hours to 30 days | 30 seconds to 12 hours |
| Valid values | 10 to 900 seconds | 43200 to 2592000 seconds | 30 to 43200 seconds |

  Please note that authentication templates created before October 23, 2024, have a default TTL of 30 days.

  - `details` (object)
    Template details and information.

  - `details.components` (array, required) — one of:
    List of components in the template. Must contain a BODY component and can only have one entry of each type.
    - WhatsappTextHeaderComponentDto:
      - `type` (string, required)
        Enum: same as `type` in "WhatsappLocationHeaderComponentInputDto" (1 values)
      - `format` (string, required)
        Enum: same as `format` in "WhatsappTextHeaderComponentInputDto" (1 values)
      - `text` (string)
        Text to show in the header
      - `example` (string)
        Example for the header variable.
    - WhatsappMediaHeaderComponentDto:
      - `type` (string, required)
        Enum: same as `type` in "WhatsappLocationHeaderComponentInputDto" (1 values)
      - `format` (string, required)
        Enum: same as `format` in "WhatsappMediaHeaderComponentInputDto" (3 values)
      - `example` (object)
      - `example.url` (string)
    - WhatsappBodyComponentDto:
      - `type` (string, required)
        Enum: same as `type` in "WhatsappBodyComponentInputDto" (1 values)
      - `text` (string)
      - `examples` (array)
        Examples for the body variables.
      - `addSecurityRecommendation` (boolean)
    - WhatsappFooterComponentDto:
      - `type` (string, required)
        Enum: same as `type` in "WhatsappFooterComponentInputDto" (1 values)
      - `text` (string)
      - `codeExpirationMinutes` (number)
    - WhatsappButtonsComponentDto:
      - `type` (string, required)
        Enum: same as `type` in "WhatsappButtonsComponentInputDto" (1 values)
      - `buttons` (array, required) — one of:
        - WhatsappPhoneNumberButtonDto:
          - `type` (string, required)
            Enum: same as `type` in "WhatsappPhoneNumberButtonInputDto" (1 values)
          - `text` (string)
          - `phoneNumber` (string)
        - WhatsappUrlButtonDto:
          - `type` (string, required)
            Enum: same as `type` in "WhatsappUrlButtonInputDto" (1 values)
          - `text` (string)
          - `url` (string)
          - `example` (string)
        - WhatsappQuickReplyButtonDto:
          - `type` (string, required)
            Enum: same as `type` in "WhatsappQuickReplyButtonInputDto" (1 values)
          - `text` (string)
        - WhatsappOtpButtonDto:
          - `type` (string, required)
            Enum: same as `type` in "WhatsappOtpButtonInputDto" (1 values)
          - `otpType` (string, required)
            Enum: same as `otpType` in "WhatsappOtpButtonDto" (4 values)
          - `text` (string)
          - `autofillText` (string)
          - `supportedApps` (array)
          - `supportedApps.packageName` (string, required)
          - `supportedApps.signatureHash` (string, required)
          - `zeroTapTermsAccepted` (boolean)
          - `packageName` (string)
          - `signatureHash` (string)
        - WhatsappFlowButtonDto:
          - `type` (string, required)
            Enum: same as `type` in "WhatsappFlowButtonInputDto" (1 values)
          - `text` (string)
            Text to display on the Flow button
          - `flowId` (string)
            Flow ID to launch when button is pressed
          - `flowAction` (string)
            Flow action
            Enum: same as `flowAction` in "WhatsappFlowButtonDto" (4 values)
          - `navigateScreen` (string)
            The unique ID of the first screen. Required for Navigate action.
    - WhatsappLocationHeaderComponentDto:
      - `type` (string, required)
        Enum: same as `type` in "WhatsappLocationHeaderComponentInputDto" (1 values)
      - `format` (string, required)
        Enum: same as `format` in "WhatsappLocationHeaderComponentInputDto" (1 values)
    - WhatsappCarouselComponentDto:
      - `type` (string, required)
        Enum: same as `type` in "WhatsappInputCarouselComponentDto" (1 values)
      - `cards` (array, required)
        Media cards.
      - `cards.components` (array, required) — one of:
        List of components in the cards.
        - WhatsappCardHeaderComponentDto:
          - `type` (string, required)
            Enum: same as `type` in "WhatsappLocationHeaderComponentInputDto" (1 values)
          - `format` (string, required)
            Card header format.
            Enum: same as `format` in "WhatsappInputCardHeaderComponentDto" (2 values)
          - `example` (object)
            Uploaded media asset handle.
          - `example.url` (string)
        - WhatsappCardBodyComponentDto:
          - `type` (string, required)
            Enum: same as `type` in "WhatsappBodyComponentInputDto" (1 values)
          - `examples` (array)
            Examples for the body variables.
          - `text` (string)
            Card body text.
        - WhatsappCardButtonsComponentDto:
          - `type` (string, required)
            Enum: same as `type` in "WhatsappButtonsComponentInputDto" (1 values)
          - `buttons` (array, required) — one of:
            Card buttons.
            - WhatsappUrlButtonDto:
              - `type` (string, required)
                Enum: same as `type` in "WhatsappUrlButtonInputDto" (1 values)
              - `text` (string)
              - `url` (string)
              - `example` (string)
            - WhatsappQuickReplyButtonDto:
              - `type` (string, required)
                Enum: same as `type` in "WhatsappQuickReplyButtonInputDto" (1 values)
              - `text` (string)
            - WhatsappPhoneNumberButtonDto:
              - `type` (string, required)
                Enum: same as `type` in "WhatsappPhoneNumberButtonInputDto" (1 values)
              - `text` (string)
              - `phoneNumber` (string)

  - `details.messageSendTtlSeconds` (number)
    Template message delivery retry time-to-live (TTL) override value. If unable to deliver the template message, it will be periodically retry for this period of time. If it is unable to deliver the message for this period of time, the message will be dropped.

|  | AUTHENTICATION | MARKETING | UTILITY |
| -- | -- | -- | -- |
| Default | 10 minutes | 30 days | 30 days |
| Customizable range | 10 seconds to 15 minutes | 12 hours to 30 days | 30 seconds to 12 hours |
| Valid values | 10 to 900 seconds | 43200 to 2592000 seconds | 30 to 43200 seconds |

  Please note that authentication templates created before October 23, 2024, have a default TTL of 30 days.

## Response 400 fields (application/json):

  - `body` (ProjectNotInitializedErrorTitle (object) or TemplateInvalidLanguageCodeErrorTitle (object) or TemplatePoliciesViolationsErrorTitle (object) or TemplateCheckMediaFileSizeErrorTitle (object) or TemplateInvalidButtonExampleErrorTitle (object) or TemplateMediaFileSizeExceedsMaximumFileSizeLimitErrorTitle (object) or FileInvalidMimeTypeErrorTitle (object) or InvalidPayloadErrorTitle (object)) — one of:
    - ProjectNotInitializedErrorTitle:
      - `errorCode` (string)
        Error code allows to programmatically handle errors.
        Example: "project_not_initialized"
      - `message` (string)
        Human readable message.
        Example: "Project not initialized for WhatsApp."
      - `resolution` (string)
        Human readable message with an explanation of how to solve the error.
        Example: "Verify that the project ID is correct and that it has been onboarded for WhatsApp."
    - TemplateInvalidLanguageCodeErrorTitle:
      - `errorCode` (string)
        Error code allows to programmatically handle errors.
        Example: "template_invalid_language_code"
      - `message` (string)
        Human readable message.
        Example: "Invalid language code."
      - `resolution` (string)
        Human readable message with an explanation of how to solve the error.
        Example: "Verify that the language code used is supported by the Provisioning API and WhatsApp."
      - `additionalInformation` (object)
        Additional information for error.
        Example: {"supportedCodes":"AF, AR, AZ, BG, BN, CA, CS, DA, DE, EL, EN, EN_GB, EN_US, ES, ES_AR, ES_ES, ES_MX, ET, FA, FI, FIL, FR, GA, GU, HA, HE, HI, HR, HU, ID, IT, JA, KA, KK, KN, KO, KY_KG, LO, LT, LV, MK, ML, MR, MS, NB, NL, PA, PL, PT_BR, PT_PT, RO, RU, RW_RW, SK, SL, SQ, SR, SV, SW, TA, TE, TH, TR, UK, UR, UZ, VI, ZH_CN, ZH_HK, ZH_TW, ZU"}
    - TemplatePoliciesViolationsErrorTitle:
      - `errorCode` (string)
        Error code allows to programmatically handle errors.
        Example: "template_policies_violations"
      - `message` (string)
        Human readable message.
        Example: "Your message couldn't be sent because it includes content that other people on Facebook have reported as abusive."
      - `resolution` (string)
        Human readable message with an explanation of how to solve the error.
        Example: "Remove violating content. If template is saved as draft, try to submit the template again. If option \"saveDraftOnFailure\" is specified as \"false\", try the request again."
    - TemplateCheckMediaFileSizeErrorTitle:
      - `errorCode` (string)
        Error code allows to programmatically handle errors.
        Example: "template_check_media_file_size"
      - `message` (string)
        Human readable message.
        Example: "Failed to check media file size."
      - `resolution` (string)
        Human readable message with an explanation of how to solve the error.
        Example: "Ensure media file URL is correct and then try again later. If template is saved as draft, try to submit the template again. If option \"saveDraftOnFailure\" is specified as \"false\", try the request again."
    - TemplateInvalidButtonExampleErrorTitle:
      - `errorCode` (string)
        Error code allows to programmatically handle errors.
        Example: "template_invalid_button_example"
      - `message` (string)
        Human readable message.
        Example: "Invalid button example."
      - `resolution` (string)
        Human readable message with an explanation of how to solve the error.
        Example: "Only dynamic URL buttons are allowed to have an example."
    - TemplateMediaFileSizeExceedsMaximumFileSizeLimitErrorTitle:
      - `errorCode` (string)
        Error code allows to programmatically handle errors.
        Example: "template_media_file_size_exceeds_maximum_file_size_limit"
      - `message` (string)
        Human readable message.
        Example: "Template media file size exceeds maximum file size limit."
      - `resolution` (string)
        Human readable message with an explanation of how to solve the error.
        Example: "Try again with a smaller file."
    - FileInvalidMimeTypeErrorTitle:
      - `errorCode` (string)
        Error code allows to programmatically handle errors.
        Example: "file_invalid_mime_type"
      - `message` (string)
        Human readable message.
        Example: "details.components[0].headerExample.media.url: invalid file mime type."
      - `resolution` (string)
        Human readable message with an explanation of how to solve the error.
        Example: "Try again with supported mime types: image/jpeg, image/png, application/pdf, video/3gp, video/mp4."
    - InvalidPayloadErrorTitle:
      - `errorCode` (string)
        Error code allows to programmatically handle errors.
        Example: "invalid_payload"
      - `message` (string)
        Human readable message.
        Example: "Invalid payload."
      - `resolution` (string)
        Human readable message with an explanation of how to solve the error.
        Example: "Correct payload and submit again."

## Response 401 fields (application/json):

  - `errorCode` (string)
    Error code allows to programmatically handle errors.
    Example: "unauthorized_error"

  - `message` (string)
    Human readable message.
    Example: "Unauthorized error."

  - `resolution` (string)
    Human readable message with an explanation of how to solve the error.
    Example: "Verify that projectId is correct."

## Response 404 fields (application/json):

  - `errorCode` (string)
    Error code allows to programmatically handle errors.
    Example: "template_not_found"

  - `message` (string)
    Human readable message.
    Example: "Template not found."

  - `resolution` (string)
    Human readable message with an explanation of how to solve the error.
    Example: "Verify that the parameters are correct."

## Response 409 fields (application/json):

  - `body` (TemplateNotUpdatableErrorTitle (object) or TemplateChangesNotUpdatableErrorTitle (object) or TemplateCategoryNotUpdatableErrorTitle (object) or TemplateAllowCategoryChangeNotUpdatableErrorTitle (object) or TemplateSourceNotUpdatableErrorTitle (object) or TemplateNameRecentlyUsedErrorTitle (object) or TemplateRestrictedDomainForButtonUrlErrorTitle (object) or FileNotFoundErrorTitle (object) or FileSizeTooLargeErrorTitle (object) or FileUnexpectedErrorErrorTitle (object) or ObjectWithWhatsappBusinessAccountIdDoesNotExistErrorTitle (object) or TemplateLanguageRecentlyDeletedErrorTitle (object)) — one of:
    - TemplateNotUpdatableErrorTitle:
      - `errorCode` (string)
        Error code allows to programmatically handle errors.
        Example: "template_not_updatable"
      - `message` (string)
        Human readable message.
        Example: "Template is not updatable."
      - `resolution` (string)
        Human readable message with an explanation of how to solve the error.
        Example: "Updates are only supported by templates with state: APPROVED, DISABLED, PAUSED, REJECTED."
    - TemplateChangesNotUpdatableErrorTitle:
      - `errorCode` (string)
        Error code allows to programmatically handle errors.
        Example: "template_changes_not_updatable"
      - `message` (string)
        Human readable message.
        Example: "Template is not updatable."
      - `resolution` (string)
        Human readable message with an explanation of how to solve the error.
        Example: "Updates are only supported by template changes with status: DRAFT, REJECTED."
    - TemplateCategoryNotUpdatableErrorTitle:
      - `errorCode` (string)
        Error code allows to programmatically handle errors.
        Example: "template_category_not_updatable"
      - `message` (string)
        Human readable message.
        Example: "Template category is not updatable."
      - `resolution` (string)
        Human readable message with an explanation of how to solve the error.
        Example: "Updates are only supported by template with state: DRAFT or with state: REJECTED and rejectionCode: INCORRECT_CATEGORY."
    - TemplateAllowCategoryChangeNotUpdatableErrorTitle:
      - `errorCode` (string)
        Error code allows to programmatically handle errors.
        Example: "template_allow_category_change_not_updatable"
      - `message` (string)
        Human readable message.
        Example: "Template allowCategoryChange is not updatable."
      - `resolution` (string)
        Human readable message with an explanation of how to solve the error.
        Example: "Updates are only supported by template with state: DRAFT or with state: REJECTED and rejectionCode: INCORRECT_CATEGORY."
    - TemplateSourceNotUpdatableErrorTitle:
      - `errorCode` (string)
        Error code allows to programmatically handle errors.
        Example: "template_source_not_updatable"
      - `message` (string)
        Human readable message.
        Example: "Template is not updatable."
      - `resolution` (string)
        Human readable message with an explanation of how to solve the error.
        Example: "Templates generated by Meta cannot be updated."
    - TemplateNameRecentlyUsedErrorTitle:
      - `errorCode` (string)
        Error code allows to programmatically handle errors.
        Example: "template_name_recently_used"
      - `message` (string)
        Human readable message.
        Example: "A template with the same name has been deleted within 30 days."
      - `resolution` (string)
        Human readable message with an explanation of how to solve the error.
        Example: "Use another \"name\" for \"EN\" or wait the required time."
    - TemplateRestrictedDomainForButtonUrlErrorTitle:
      - `errorCode` (string)
        Error code allows to programmatically handle errors.
        Example: "template_restricted_Domain_for_button_url"
      - `message` (string)
        Human readable message.
        Example: "Restricted domain for button url."
      - `resolution` (string)
        Human readable message with an explanation of how to solve the error.
        Example: "Replace any of the following restricted domains: wa.me, whatsapp.com"
    - FileNotFoundErrorTitle:
      - `errorCode` (string)
        Error code allows to programmatically handle errors.
        Example: "file_not_found"
      - `message` (string)
        Human readable message.
        Example: "details.components[0].headerExample.media.url: file not found."
      - `resolution` (string)
        Human readable message with an explanation of how to solve the error.
        Example: "Verify that the url is correct."
    - FileSizeTooLargeErrorTitle:
      - `errorCode` (string)
        Error code allows to programmatically handle errors.
        Example: "file_size_too_large"
      - `message` (string)
        Human readable message.
        Example: "details.components[0].headerExample.media.url: file size is too large."
      - `resolution` (string)
        Human readable message with an explanation of how to solve the error.
        Example: "Try again with a smaller file. Max size for `image/jpeg` is 5MB."
    - FileUnexpectedErrorErrorTitle:
      - `errorCode` (string)
        Error code allows to programmatically handle errors.
        Example: "file_unexpected_error"
      - `message` (string)
        Human readable message.
        Example: "details.components[0].headerExample.media.url: file unexpected error."
      - `resolution` (string)
        Human readable message with an explanation of how to solve the error.
        Example: "The file cannot be handled properly. Please try with another one."
    - ObjectWithWhatsappBusinessAccountIdDoesNotExistErrorTitle:
      - `errorCode` (string)
        Error code allows to programmatically handle errors.
        Example: "object_with_whatsapp_business_account_id_does_not_exist"
      - `message` (string)
        Human readable message.
        Example: "WhatsApp Business Account does not exist."
      - `resolution` (string)
        Human readable message with an explanation of how to solve the error.
        Example: "Verify that WhatsApp Business ID still exists and contact support."
    - TemplateLanguageRecentlyDeletedErrorTitle:
      - `errorCode` (string)
        Error code allows to programmatically handle errors.
        Example: "template_language_recently_deleted"
      - `message` (string)
        Human readable message.
        Example: "A template with the same language has been deleted within 4 weeks."
      - `resolution` (string)
        Human readable message with an explanation of how to solve the error.
        Example: "Try to create EN content again in 4 weeks or create a new template."

## Response 424 fields (application/json):

  - `body` (TemplateLimitReachedErrorTitle (object) or TemplateContentAlreadyExistsErrorTitle (object) or TemplateSubmitErrorErrorTitle (object)) — one of:
    - TemplateLimitReachedErrorTitle:
      - `errorCode` (string)
        Error code allows to programmatically handle errors.
        Example: "template_limit_reached"
      - `message` (string)
        Human readable message.
        Example: "Number of templates has reached the limit."
      - `resolution` (string)
        Human readable message with an explanation of how to solve the error.
        Example: "Delete some templates or reach out to support to increase the template limit. If template is saved as draft, try to submit the template again. If option \"saveDraftOnFailure\" is specified as \"false\", try the request again."
    - TemplateContentAlreadyExistsErrorTitle:
      - `errorCode` (string)
        Error code allows to programmatically handle errors.
        Example: "template_content_already_exists"
      - `message` (string)
        Human readable message.
        Example: "Template cannot be submitted because the content is the same as the content in another template."
      - `resolution` (string)
        Human readable message with an explanation of how to solve the error.
        Example: "Use other template or edit template data and submit again. If template is saved as draft, try to submit the template again. If option \"saveDraftOnFailure\" is specified as \"false\", try the request again."
    - TemplateSubmitErrorErrorTitle:
      - `errorCode` (string)
        Error code allows to programmatically handle errors.
        Example: "template_submit_error"
      - `message` (string)
        Human readable message.
        Example: "Template submit error."
      - `resolution` (string)
        Human readable message with an explanation of how to solve the error.
        Example: "Please try again later. If template is saved as draft, try to submit the template again. If option \"saveDraftOnFailure\" is specified as \"false\", try the request again."
      - `additionalInformation` (object)
        Additional information for error.
        Example: {"metaError":{"code":"123","subcode":"123456","message":"Invalid parameter","description":"Character Limit Exceeded","reason":"field 'name' can't have more than 1,024 characters"}}

## Response 429 fields (application/json):

  - `errorCode` (string)
    Error code allows to programmatically handle errors.
    Example: "whatsapp_business_api_request_limit_exceeded"

  - `message` (string)
    Human readable message.
    Example: "WhatsApp business api request limit reached."

  - `resolution` (string)
    Human readable message with an explanation of how to solve the error.
    Example: "WhatsApp business API request limits reached. Please try again later."

## Response 500 fields (application/json):

  - `body` (TemplateStartSessionForUploadingMediaErrorTitle (object) or InternalErrorErrorTitle (object)) — one of:
    - TemplateStartSessionForUploadingMediaErrorTitle:
      - `errorCode` (string)
        Error code allows to programmatically handle errors.
        Example: "template_start_session_for_uploading_media"
      - `message` (string)
        Human readable message.
        Example: "Failed to start session for uploading template media example."
      - `resolution` (string)
        Human readable message with an explanation of how to solve the error.
        Example: "Please try again later. If template is saved as draft, try to submit the template again. If option \"saveDraftOnFailure\" is specified as \"false\", try the request again."
    - InternalErrorErrorTitle:
      - `errorCode` (string)
        Error code allows to programmatically handle errors.
        Example: "internal_error"
      - `message` (string)
        Human readable message.
        Example: "Internal server error."
      - `resolution` (string)
        Human readable message with an explanation of how to solve the error.
        Example: "Please wait and try again, if the error persist please contact support. If template is saved as draft, try to submit the template again. If option \"saveDraftOnFailure\" is specified as \"false\", try the request again."
    - InternalErrorErrorTitle:
      - `errorCode` (string)
        Error code allows to programmatically handle errors.
        Example: "internal_error"
      - `message` (string)
        Human readable message.
        Example: "Internal server error."
      - `resolution` (string)
        Human readable message with an explanation of how to solve the error.
        Example: "Please wait and try again, if the error persist please contact support."


