Documentation Index
Fetch the complete documentation index at: https://plivo.com/docs/llms.txt
Use this file to discover all available pages before exploring further.
Submit, fetch, list, update, and delete WhatsApp message templates for a WhatsApp Business Account (WABA) linked to your Plivo account. See the WhatsAppTemplate object for the resource schema. Templates start in
PENDING; Meta reviews them asynchronously and emits status events that Plivo forwards to your configured WABA webhook URL.waba_id.
API Endpoint
Find your
waba_id in the Plivo console under Messaging > WhatsApp Business Account.auth_id as the username and auth_token as the password. Find these on the Plivo console.
Asynchronous review
When you create or update a template, Meta reviews it asynchronously. The template’s status moves from PENDING to APPROVED, REJECTED, PAUSED, or DISABLED over time. Meta emits an event for each transition, which Plivo forwards to the webhook URL configured for your WABA. You can also call Get a Template or List Templates at any time to fetch the current status.
The WhatsAppTemplate Object
Attributes
Meta-issued template ID. Use this in path parameters for Get, Update, and Delete.
snake_case template name, unique per WABA. Allowed characters:
a-z, 0-9, underscore.BCP-47 language code. Examples:
en, en_US, es_MX.Template category. Values:
MARKETING, UTILITY, AUTHENTICATION.Current Meta-assigned status. Values:
PENDING, APPROVED, REJECTED, PAUSED, DISABLED.Quality metric assigned by Meta. When present, contains a single field
score with values GREEN, YELLOW, RED, or UNKNOWN. May be null or absent for templates in PENDING status — check for the field before reading quality_score.score.Reason for rejection assigned by Meta. Returned as
NONE for templates that have not been rejected. Possible values when status is REJECTED: ABUSIVE_CONTENT, INVALID_FORMAT, PROMOTIONAL, TAG_CONTENT_MISMATCH, INCORRECT_CATEGORY, SCAM.Ordered list of template sections. See Component object below.
Component Object
Each item incomponents is a TemplateComponent:
Component type. Values:
HEADER, BODY, FOOTER, BUTTONS, CAROUSEL.Header format. Only meaningful when
type is HEADER. Values: TEXT, IMAGE, VIDEO, DOCUMENT, LOCATION.Text content for
BODY, FOOTER, and text-format HEADER. Use {{1}}, {{2}} for positional placeholders, or named placeholders like {{customer_name}} paired with example.body_text_named_params.Sample values Meta uses during review. Pick the variant matching your component:
header_text— array of sample strings for a TEXT header with placeholders.header_handle— array of media handles from Meta’s resumable-upload API forIMAGE,VIDEO, orDOCUMENTheaders.header_text_named_params— array of{ param_name, example }for a TEXT header that uses{{name}}style placeholders.body_text— array of example sets for positional{{1}},{{2}}placeholders. The outer array contains one or more example sets; each inner array contains one sample value per placeholder, in order.body_text_named_params— array of{ param_name, example }for a body that uses{{name}}style placeholders.
Only meaningful when
type is BUTTONS. Each button has type (QUICK_REPLY, PHONE_NUMBER, URL, OTP, COPY_CODE), text, and optionally phone_number, url, or example.Only meaningful when
type is CAROUSEL. Each card has its own components array (at minimum a HEADER and a BODY).Example Object
Create a Template
Submit a new template to Meta via the bound WABA. The new template starts inPENDING. Meta reviews it asynchronously and emits a status event that Plivo forwards to your configured WABA webhook URL.
Create returns an action confirmation envelope (api_id, template_id, template_status, etc.) — not the full template object. Call Get a Template to fetch components and other fields.
Arguments
snake_case template name, unique per WABA. After you delete a template, Meta enforces a 30-day cooldown before the same name can be reused.
BCP-47 language code (for example,
en_US).Values:
MARKETING, UTILITY, AUTHENTICATION.Non-empty array of components. At least one
BODY component is required; HEADER, FOOTER, BUTTONS, and CAROUSEL are optional. See Component object.When
true, Meta is allowed to switch the template’s category during review (for example, UTILITY to MARKETING) instead of rejecting the submission for mismatched content. Defaults to false, in which case Meta typically rejects templates whose content doesn’t match the requested category.Example — Text-only marketing template
Example — Body with named parameters
Example — Image header with media handle
Upload your media via Meta’s resumable-upload API and pass the returned handle inheader_handle.
Example — Carousel template
Meta requires a CAROUSEL component to contain between 2 and 10 cards.Response
List Templates
Retrieve a paginated list of templates for a WABA. List returns a summary projection of each template — call Get a Template to fetchcomponents, quality_score, and rejected_reason.
Query Parameters
Substring filter on template name.
The number of results per page. The maximum number of results that can be fetched is 20. Defaults to 20.
The number of value items by which the results should be offset. Defaults to 0. Read more about offset-based pagination.
Example
Response
Get a Template
Retrieve the current state of a single template, including its components.Example
Response
Update a Template
Submit an update to an existing template. The body shape is identical to Create. The template typically transitions back toPENDING while Meta re-reviews; the resulting APPROVED or REJECTED status is delivered to your configured WABA webhook URL.
Arguments
Same as Create a Template.Example
Response
Delete a Template
Remove a template from the WABA via Meta. This operation cannot be undone — to reuse the same template name later, you may need to wait out Meta’s name-reuse cooldown.Query Parameters
The template’s
name (the same value you sent on Create or received on List).Example
Response
HTTP Status Codes
| Code | Description |
|---|---|
| 200 | Request executed successfully. |
| 204 | Template deleted (no body). |
| 400 | Validation error — missing or invalid parameter. |
| 401 | Authentication failed. |
| 404 | Template not found. |
| 429 | Rate limit exceeded. Rate limits are applied per auth_id per endpoint. |
| 502 | Upstream service (messaging-whatsapp or Meta) returned a transient failure. |
Related
- Manage WhatsApp Templates (concept) — UI walkthrough and template structure overview.
- Send a Message — Send a templated WhatsApp message once the template is
APPROVED. - WhatsApp Prerequisites — WABA setup steps.