Templates Management

Endpoints for managing WhatsApp message templates

Get templates

get

Use this endpoint to get templates. Filtering is available. Rate limits: This endpoint is subject to rate limits. A maximum of 400 total requests per minute is allowed. Requests exceeding these limits will receive a 429 Too Many Requests response.

Authorizations
X-API-KeystringRequired

API Key for V2 authentication. Send your Partner API key in the X-API-Key header. Preferred authentication method.

Path parameters
partner_idstringRequired

The ID of the partner.

Example: examplePA
waba_account_idstringRequired

Internal 360dialog ID of the waba account. This ID always have postfix WA.

Example: exampleWA
Query parameters
limitintegerOptional

Maximum number of returned objects.

Example: 10
offsetintegerOptional

Number of objects to skip.

Example: 0
Responses
chevron-right
200

Successful response

application/json
get
/api/v2/partners/{partner_id}/waba_accounts/{waba_account_id}/waba_templates

Create a template

post

Use this endpoint to create a template. Rate limits: This endpoint is subject to rate limits. A maximum of 60 total requests per minute per waba id is allowed. Requests exceeding these limits will receive a 429 Too Many Requests response.

Authorizations
X-API-KeystringRequired

API Key for V2 authentication. Send your Partner API key in the X-API-Key header. Preferred authentication method.

Path parameters
partner_idstringRequired

The ID of the partner.

Example: examplePA
waba_account_idstringRequired

Internal 360dialog ID of the waba account. This ID always have postfix WA.

Example: exampleWA
Body
categorystring · enum · nullableRequired

Template category.

Example: MARKETINGPossible values:
languagestring · enumRequired

Template language short code.

Example: en_USPossible values:
namestring · min: 1 · max: 512Required

Template name.

Example: Template Example
message_send_ttl_secondsintegerOptional

To override the default time-to-live when creating an authentication, utility and marketing templates

Example: 30
allow_category_changebooleanOptionalDeprecated

Allow Meta to auto-update template category

Example: true
cta_url_link_tracking_opted_outbooleanOptional

Opt in or opt out of button click analytics for the template

Example: true
Responses
chevron-right
200

Successful response

application/json
post
/api/v2/partners/{partner_id}/waba_accounts/{waba_account_id}/waba_templates

Migrate templates

post

Use this endpoint to move templates from one waba account to another (in the same business account). Useful for migrating between WABAs.

Authorizations
X-API-KeystringRequired

API Key for V2 authentication. Send your Partner API key in the X-API-Key header. Preferred authentication method.

Path parameters
partner_idstringRequired

The ID of the partner.

Example: examplePA
waba_account_idstringRequired

Internal 360dialog ID of the waba account. This ID always have postfix WA.

Example: exampleWA
Body
source_waba_account_idstringRequired

Source WhatsApp Business Account ID to copy templates from

Example: 2388172987391
page_numberintegerOptional

This field specifies the index of which page of templates need to be migrated. Page 0 will migrate the first 2500 templates, and page 1 will migrate the next 2500 and so on.

Default: 0
Responses
chevron-right
200

Successful response

application/json
migrated_templatesstring[]Optional

List of template ids that successfully migrated.

Example: 147884035974987654
post
/api/v2/partners/{partner_id}/waba_accounts/{waba_account_id}/migrate_templates

Get template previews

get

Use this endpoint to generate previews of template texts in various languages. Currently only authentication templates are supported (use AUTHENTICATION as category parameter value). You can optionally include the security recommendation string and code expiration string.

Authorizations
X-API-KeystringRequired

API Key for V2 authentication. Send your Partner API key in the X-API-Key header. Preferred authentication method.

Path parameters
partner_idstringRequired

The ID of the partner.

Example: examplePA
waba_account_idstringRequired

Internal 360dialog ID of the waba account. This ID always have postfix WA.

Example: exampleWA
Query parameters
categorystringOptional

The category of the template.

Example: AUTHENTICATION
languagesstringOptional

Comma-separated template languages to preview (e.g. en_US,es_US)

Example: en_US
add_security_recommendationbooleanOptional

The security recommendation.

Example: true
code_expiration_minutesintegerOptional

The code expiration minutes.

Example: 10
button_typesstringOptional

The button types.

Example: OTP
Responses
chevron-right
200

Successful response

application/json
bodystringRequired

The body of the template.

Example: *{{1}}* is your verification code. For your security, do not share this code.
footerstringRequired

The footer of the template.

Example: This code expires in 10 minutes.
languagestringRequired

The language of the template.

Example: en_US
get
/api/v2/partners/{partner_id}/waba_accounts/{waba_account_id}/message_template_previews

Update a template

post

Use this endpoint to update a template. Rate limits: This endpoint is subject to rate limits. A maximum of 60 total requests per minute per waba id is allowed. Requests exceeding these limits will receive a 429 Too Many Requests response.

Authorizations
X-API-KeystringRequired

API Key for V2 authentication. Send your Partner API key in the X-API-Key header. Preferred authentication method.

Path parameters
partner_idstringRequired

The ID of the partner.

Example: examplePA
waba_account_idstringRequired

Internal 360dialog ID of the waba account. This ID always have postfix WA.

Example: exampleWA
template_idstringRequired

The ID of the template.

Example: exampleWT
Body
categorystring · enum · nullableOptional

Template category.

Example: MARKETINGPossible values:
languagestring · enumOptional

Template language short code.

Example: en_USPossible values:
namestring · min: 1 · max: 512Optional

Template name.

Example: Template Example
message_send_ttl_secondsintegerOptional

To override the default time-to-live when creating an authentication, utility and marketing templates

Example: 30
allow_category_changebooleanOptionalDeprecated

Allow Meta to auto-update template category

Example: true
cta_url_link_tracking_opted_outbooleanOptional

Opt in or opt out of button click analytics for the template

Example: true
Responses
chevron-right
200

Successful response

application/json
post
/api/v2/partners/{partner_id}/waba_accounts/{waba_account_id}/waba_templates/{template_id}

Delete a template

delete

Use this endpoint to delete a template by id.

Authorizations
X-API-KeystringRequired

API Key for V2 authentication. Send your Partner API key in the X-API-Key header. Preferred authentication method.

Path parameters
partner_idstringRequired

The ID of the partner.

Example: examplePA
waba_account_idstringRequired

Internal 360dialog ID of the waba account. This ID always have postfix WA.

Example: exampleWA
template_idstringRequired

The ID of the template.

Example: exampleWT
Responses
chevron-right
200

Successful response

application/json
status_codeintegerRequiredExample: 200
delete
/api/v2/partners/{partner_id}/waba_accounts/{waba_account_id}/waba_templates/{template_id}

Last updated

Was this helpful?