Templates API
Read your Meta-approved templates, save drafts, submit templates for approval, browse the template library and find files in your media library.
/v1/templates#List message templates
WhatsApp message templates registered with Meta, with status, body and the placeholders each needs. Only APPROVED templates can be sent. For one template's buttons and rejection reason use GET /v1/templates/{template_name}/{language_code}.
Permission: templates:view
Query parameters (5)
status"APPROVED" | "PENDING" | "REJECTED" | "PAUSED" | "DISABLED"
No extra notes.category"MARKETING" | "UTILITY" | "AUTHENTICATION"
No extra notes.querystring
Substring of the template name or body.cursorstring
next_cursorfrom the previous page; omit for the first page. Keep the other filters the same; the page size stays as on the first page.page_sizeinteger
Rows per page, 1-100. Default 20.Default20
curl "https://backend.sheetwa.com/v1/templates?page_size=20" \
-H "Authorization: Bearer $SHEETWA_API_KEY"/v1/templates/submit#Submit a template to Meta for approval
Sends a WhatsApp template to Meta for approval. Pass draft_id alone for a saved draft, or the full fields. Approval takes minutes to hours; the template can be sent only once GET /v1/templates/{template_name}/{language_code} shows APPROVED. Owner or admin keys only.
Permission: templates:change
Body parameters (11)
template_namestring
Template name as registered with Meta: lowercase snake case.language_codestring
Template language code, e.g.en_US,en,hi.category"MARKETING" | "UTILITY" | "AUTHENTICATION"
MARKETING for promotions, UTILITY for transactional updates, AUTHENTICATION for codes.bodystring
Message body. Positional placeholders{{1}},{{2}}… in order; no placeholder at the very start or end.header_textstring
Short text header. Give this or header_format, not both.header_format"IMAGE" | "VIDEO" | "DOCUMENT"
Media header type; pair with header_media_asset_id.header_media_asset_idstring
Amedia_asset_idfrom GET /v1/media, used as the header sample.footer_textstring
No extra notes.quick_reply_buttonsstring[]
Up to 3 button labels, 25 characters each.url_buttonobject
One link button: label and https URL.draft_idstring
Adraft_idfrom GET /v1/template-drafts; give it alone to submit that draft.
curl -X POST "https://backend.sheetwa.com/v1/templates/submit" \
-H "Authorization: Bearer $SHEETWA_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"draft_id": "DRAFT_ID"
}'/v1/templates/{template_name}/{language_code}#Get a message template
One WhatsApp template: body, placeholders, buttons, status and rejection reason; a rejected one also lists the workspace's other rejected templates (other_rejected_templates). Check placeholders before POST /v1/messages, POST /v1/chats/{chat_id}/reply-template or a template POST /v1/broadcasts.
Permission: templates:view
Path parameters (2)
template_namerequiredstring
Template name as registered with Meta: lowercase snake case.language_coderequiredstring
Template language code, e.g.en_US,en,hi.
curl "https://backend.sheetwa.com/v1/templates/order_update/en" \
-H "Authorization: Bearer $SHEETWA_API_KEY"/v1/template-drafts#List template drafts
WhatsApp template drafts saved in SheetWA and not yet sent to Meta. Submit one with POST /v1/templates/submit.
Permission: templates:view
Query parameters (2)
cursorstring
next_cursorfrom the previous page; omit for the first page. Keep the other filters the same; the page size stays as on the first page.page_sizeinteger
Rows per page, 1-100. Default 20.Default20
curl "https://backend.sheetwa.com/v1/template-drafts?page_size=20" \
-H "Authorization: Bearer $SHEETWA_API_KEY"/v1/template-drafts#Save a template draft
Saves a WhatsApp template draft in SheetWA for a person to review; nothing goes to Meta. Pass draft_id to change an existing draft. Body placeholders are positional: {{1}}, {{2}}. Header media ids come from GET /v1/media.
Permission: templates:change
Body parameters (11)
template_namerequiredstring
Template name as registered with Meta: lowercase snake case.language_coderequiredstring
Template language code, e.g.en_US,en,hi.categoryrequired"MARKETING" | "UTILITY" | "AUTHENTICATION"
MARKETING for promotions, UTILITY for transactional updates, AUTHENTICATION for codes.bodyrequiredstring
Message body. Positional placeholders{{1}},{{2}}… in order; no placeholder at the very start or end.header_textstring
Short text header. Give this or header_format, not both.header_format"IMAGE" | "VIDEO" | "DOCUMENT"
Media header type; pair with header_media_asset_id.header_media_asset_idstring
Amedia_asset_idfrom GET /v1/media, used as the header sample.footer_textstring
No extra notes.quick_reply_buttonsstring[]
Up to 3 button labels, 25 characters each.url_buttonobject
One link button: label and https URL.draft_idstring
Adraft_idfrom GET /v1/template-drafts, to change that draft.
curl -X POST "https://backend.sheetwa.com/v1/template-drafts" \
-H "Authorization: Bearer $SHEETWA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"template_name": "order_update",
"language_code": "en",
"category": "UTILITY",
"body": "Hi {{1}}, your order {{2}} has shipped."
}'/v1/template-library#Search ready-made templates
Ready-made WhatsApp template ideas from Meta's utility library and SheetWA's community library, by words, category and industry. Use one as the start for POST /v1/template-drafts. Read-only; importing is done in the dashboard.
Permission: templates:view
Query parameters (6)
querystring
Words matched against title, body, use case and industry.source"meta" | "community" | "both"
No extra notes.Default"both"category"MARKETING" | "UTILITY" | "AUTHENTICATION"
No extra notes.industrystring
e.g.retail,education.cursorstring
next_cursorfrom the previous page; omit for the first page. Keep the other filters the same; the page size stays as on the first page.page_sizeinteger
Rows per page, 1-100. Default 20.Default20
curl "https://backend.sheetwa.com/v1/template-library?page_size=20" \
-H "Authorization: Bearer $SHEETWA_API_KEY"/v1/media#List uploaded media
Files in the workspace's WhatsApp media library: images, videos, documents, audio. Pass a media_asset_id to POST /v1/template-drafts as a header or to POST /v1/broadcasts as the file. Uploading is done in the dashboard.
Permission: any key
Query parameters (4)
media_type"image" | "video" | "document" | "audio"
No extra notes.querystring
Start of the file name.cursorstring
next_cursorfrom the previous page; omit for the first page. Keep the other filters the same; the page size stays as on the first page.page_sizeinteger
Rows per page, 1-100. Default 20.Default20
curl "https://backend.sheetwa.com/v1/media?page_size=20" \
-H "Authorization: Bearer $SHEETWA_API_KEY"