POST /v1/{waba_id}/templates/bulk
Creates or edits many templates in one request. A row whose name (and language) already
exists on the WABA is edited; otherwise it’s created.
curl -X POST "$HELLO_API_URL/v1/<your-waba-id>/templates/bulk" \ -H "Authorization: Bearer $HELLO_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "templates": [ { "name": "order_shipped", "language": "en", "category": "UTILITY", "components": [{ "type": "BODY", "text": "Hi {{1}}, your order {{2}} has shipped." }] }, { "name": "order_delivered", "language": "en", "category": "UTILITY", "components": [{ "type": "BODY", "text": "Hi {{1}}, your order {{2}} was delivered." }] } ] }'Request body
Section titled “Request body”| Field | Type | Required | Description |
|---|---|---|---|
templates |
array | Yes | Each entry is a template create body |
An entry that edits an existing APPROVED template omits category, since Meta doesn’t allow
changing the category of an approved template through an edit.
Response 200
Section titled “Response 200”{ "total_rows": 2, "created_count": 1, "updated_count": 1, "failed_count": 0, "skipped_count": 0, "results": [ { "index": 0, "template_name": "order_shipped", "language": "en", "status": "updated" }, { "index": 1, "template_name": "order_delivered", "language": "en", "status": "created" } ]}Each result’s status is created, updated, failed or skipped. A failed row carries
error_code, error_message and stage (input_validation, business_validation,
meta_api or database) — other rows in the same request still go through.
Errors
Section titled “Errors”| Status | code |
Cause |
|---|---|---|
400 |
VALIDATION_ERROR |
The body isn’t valid JSON, or templates is missing |
401 |
UNAUTHORIZED |
Missing, wrong or disabled API key |
404 |
NOT_FOUND |
No such WABA in your organization |
500 |
Temporary server error. Retry. |