API reference

Templates

Pre-approved WhatsApp copy.

Create

POST/v1/templates201 Created

Template language is a string WhatsApp language code such as pt_BR or en_US. Do not send Meta's nested {"code":"pt_BR"} object shape.

Request body

FieldTypeNotes
namerequiredstring
len 1..512; pattern: ^[a-z0-9_]+$
languagerequiredstring
WhatsApp template language code as a string, for example "pt_BR" or "en_US".
len 1..∞
categoryrequired"marketing" | "utility" | "authentication"
componentsrequiredobject[]

Response

FieldTypeNotes
idrequiredstring
objectrequired"template"
namerequiredstring
languagerequiredstring
categoryrequired"marketing" | "utility" | "authentication"
statusrequired"draft" | "submitted" | "approved" | "rejected" | "paused" | "disabled" | "orphaned"
environmentrequired"sandbox" | "production"
componentsrequiredobject[]
provider_template_idrequiredstring | null
rejection_reasonrequiredstring | null
provider_qualityrequired"green" | "yellow" | "red" | "unknown"
authoring_signalsrequiredobject[]
submitted_atrequiredstring<ISO-8601> | null
approved_atrequiredstring<ISO-8601> | null
created_atrequiredstring<ISO-8601>
pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
updated_atrequiredstring<ISO-8601>
pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$

Generate draft

POST/v1/templates/generate

Request body

FieldTypeNotes
namestring
len 1..512; pattern: ^[a-z0-9_]+$
descriptionrequiredstring
len 10..500
languagerequiredstring
WhatsApp template language code as a string, for example "pt_BR" or "en_US".
len 1..∞
categoryrequired"marketing" | "utility" | "authentication"
template_typerequired"text" | "media"

Response

FieldTypeNotes
objectrequired"template_generation"
namerequiredstring
languagerequiredstring
categoryrequired"marketing" | "utility" | "authentication"
componentsrequiredobject[]
authoring_signalsrequiredobject[]

List

GET/v1/templates

Query

FieldTypeNotes
limitrequiredinteger
Maximum number of items to return. Defaults to 20; maximum 100.
range 1..100
starting_afterstring
Opaque cursor from the previous response next_cursor.

Response

FieldTypeNotes
objectrequired"list"
datarequiredobject[]
has_morerequiredboolean
next_cursorrequiredstring | null

Retrieve

GET/v1/templates/{'{id}'}

Response

FieldTypeNotes
idrequiredstring
objectrequired"template"
namerequiredstring
languagerequiredstring
categoryrequired"marketing" | "utility" | "authentication"
statusrequired"draft" | "submitted" | "approved" | "rejected" | "paused" | "disabled" | "orphaned"
environmentrequired"sandbox" | "production"
componentsrequiredobject[]
provider_template_idrequiredstring | null
rejection_reasonrequiredstring | null
provider_qualityrequired"green" | "yellow" | "red" | "unknown"
authoring_signalsrequiredobject[]
submitted_atrequiredstring<ISO-8601> | null
approved_atrequiredstring<ISO-8601> | null
created_atrequiredstring<ISO-8601>
pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
updated_atrequiredstring<ISO-8601>
pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$

Update

PATCH/v1/templates/{'{id}'}

Request body

FieldTypeNotes
namestring
len 1..512; pattern: ^[a-z0-9_]+$
languagestring
WhatsApp template language code as a string, for example "pt_BR" or "en_US".
len 1..∞
category"marketing" | "utility" | "authentication"
componentsobject[]

Response

FieldTypeNotes
idrequiredstring
objectrequired"template"
namerequiredstring
languagerequiredstring
categoryrequired"marketing" | "utility" | "authentication"
statusrequired"draft" | "submitted" | "approved" | "rejected" | "paused" | "disabled" | "orphaned"
environmentrequired"sandbox" | "production"
componentsrequiredobject[]
provider_template_idrequiredstring | null
rejection_reasonrequiredstring | null
provider_qualityrequired"green" | "yellow" | "red" | "unknown"
authoring_signalsrequiredobject[]
submitted_atrequiredstring<ISO-8601> | null
approved_atrequiredstring<ISO-8601> | null
created_atrequiredstring<ISO-8601>
pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
updated_atrequiredstring<ISO-8601>
pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$

Duplicate

POST/v1/templates/{'{id}'}/duplicate201 Created

Request body

FieldTypeNotes
namestring
len 1..512; pattern: ^[a-z0-9_]+$
languagestring
WhatsApp template language code as a string, for example "pt_BR" or "en_US".
len 1..∞
category"marketing" | "utility" | "authentication"

Response

FieldTypeNotes
idrequiredstring
objectrequired"template"
namerequiredstring
languagerequiredstring
categoryrequired"marketing" | "utility" | "authentication"
statusrequired"draft" | "submitted" | "approved" | "rejected" | "paused" | "disabled" | "orphaned"
environmentrequired"sandbox" | "production"
componentsrequiredobject[]
provider_template_idrequiredstring | null
rejection_reasonrequiredstring | null
provider_qualityrequired"green" | "yellow" | "red" | "unknown"
authoring_signalsrequiredobject[]
submitted_atrequiredstring<ISO-8601> | null
approved_atrequiredstring<ISO-8601> | null
created_atrequiredstring<ISO-8601>
pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
updated_atrequiredstring<ISO-8601>
pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$

Submit for Meta approval

POST/v1/templates/{'{id}'}/submit202 Accepted

Response

FieldTypeNotes
idrequiredstring
objectrequired"template"
namerequiredstring
languagerequiredstring
categoryrequired"marketing" | "utility" | "authentication"
statusrequired"draft" | "submitted" | "approved" | "rejected" | "paused" | "disabled" | "orphaned"
environmentrequired"sandbox" | "production"
componentsrequiredobject[]
provider_template_idrequiredstring | null
rejection_reasonrequiredstring | null
provider_qualityrequired"green" | "yellow" | "red" | "unknown"
authoring_signalsrequiredobject[]
submitted_atrequiredstring<ISO-8601> | null
approved_atrequiredstring<ISO-8601> | null
created_atrequiredstring<ISO-8601>
pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
updated_atrequiredstring<ISO-8601>
pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$

Analytics

GET/v1/templates/{'{id}'}/analytics

Response

FieldTypeNotes
objectrequired"template_analytics"
template_idrequiredstring
approvalsrequiredobject
sendsrequiredobject

Estimate cost

POST/v1/templates/{'{id}'}/estimate-cost

Request body

FieldTypeNotes
recipientsinteger
range -∞..9007199254740991

Response

FieldTypeNotes
objectrequired"template_cost_estimate"
template_idrequiredstring
categoryrequired"marketing" | "utility" | "authentication"
meter_idrequiredstring
recipientsrequiredinteger
range -∞..9007199254740991
unit_amount_brlrequiredstring
total_brlrequiredstring
currencyrequired"brl"
rate_card_idrequiredstring