Skip to main content
PATCH

Authorizations

X-API-Key
string
header
required

Path Parameters

wabaId
string
required

WhatsApp Business Account ID.

Example:

"whatsapp-business-account-id"

name
string
required

Name of the template.

Pattern: [a-z0-9]{1,512}
Example:

"sample_whatsapp_template"

language
string
required

Language code of the template. See Supported Languages for all codes.

Example:

"en"

Body

application/json

The request body to edit a WhatsApp template.

components
object[]
required
messageSendTtlSeconds
integer<int32>

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.

Example:

600

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 or set to null, this value defaults to true, which means button click tracking is disabled by default.

Example:

true

Response

Successfully edited the template.

wabaId
string
required

WhatsApp Business Account ID.

Example:

"whatsapp-business-account-id"

name
string
required

Name of the template.

Maximum string length: 512
Pattern: [a-z0-9]{1,512}
language
string
required

Language code of the template. See Supported Languages for all codes.

Example:

"en"

officialTemplateId
string

Official template ID assigned by WhatsApp. This ID is used to identify the template in WhatsApp's system.

Example:

"official-template-id"

category
enum<string>

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.
Available options:
AUTHENTICATION,
MARKETING,
UTILITY
subCategory
enum<string>

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.
Available options:
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<int32>

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.

Example:

600

components
object[]

Template components. A template consists of HEADER, BODY, FOOTER, and BUTTONS components. BODY component is required, the other types are optional.

Minimum array length: 1

Whether Meta CTA URL click tracking is disabled. Historical null values are returned as true.

Example:

true

status
enum<string>

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.
  • 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.
  • ARCHIVED: The template has been archived. Archived templates cannot be sent or edited.
  • IN_APPEAL: The template is in appeal. See also Template Appeals.
  • DELETED: The template is deleted.
Available options:
PENDING,
REJECTED,
APPROVED,
PAUSED,
DISABLED,
ARCHIVED,
IN_APPEAL,
DELETED
Example:

"REJECTED"

qualityRating
enum<string>

Quality rating of WhatsApp template. One of GREEN, YELLOW, RED, or UNKNOWN. See also Template Quality Rating.

  • GREEN: High quality.
  • YELLOW: Medium quality.
  • RED: Low quality.
  • UNKNOWN: Unknown quality.
Available options:
GREEN,
YELLOW,
RED,
UNKNOWN
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. e.g., 2022-06-01T12:00:00.000Z.

Example:

"2022-06-01T12:00:00.000Z"

updateTime
string<date-time>

The time at which this object is updated, formatted in RFC 3339. e.g., 2022-06-01T12:00:00.000Z.

Example:

"2022-06-01T12:00:00.000Z"

statusUpdateEvent
enum<string>

The WhatsApp template status update event that caused this webhook. For ARCHIVED, the template status is ARCHIVED. For UNARCHIVED, the template status is the current status returned by Meta, for example APPROVED; it does not represent a new approval review.

Available options:
PENDING,
APPROVED,
REJECTED,
IN_APPEAL,
PAUSED,
FLAGGED,
DISABLED,
ARCHIVED,
UNARCHIVED,
REINSTATED,
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.

Example:

"December 9, 2022"

whatsappApiError
object

The original error object returned by WhatsApp. See Handling Errors, Cloud API Error Codes.