Templates
6 tools

Templates tools

Read Meta-approved templates, save drafts and submit new ones for approval.

Badges:Read onlyWrites dataSends to WhatsAppDestructive
list_templates#

List message templates

Read only

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_template.

Parameters (6)›
  • status

    "APPROVED" | "PENDING" | "REJECTED" | "PAUSED" | "DISABLED"

    No extra notes.
  • category

    "MARKETING" | "UTILITY" | "AUTHENTICATION"

    No extra notes.
  • query

    string

    Substring of the template name or body.
  • cursor

    string

    next_cursor from the previous page; omit for the first page. Keep the other filters the same; the page size stays as on the first page.
  • page_size

    integer

    Rows per page, 1-100. Default 20.Default 20
  • response_format

    "concise" | "detailed"

    concise returns the fields a person reads; detailed adds ids and raw fields for follow-up calls.Default "concise"
get_template#

Get one template

Read only

One WhatsApp template: body, placeholders, buttons, status and rejection reason. Check placeholders before send_template_message, reply_to_chat_with_template or a template create_broadcast.

Parameters (2)›
  • template_namerequired

    string

    Template name as registered with Meta: lowercase snake case.
  • language_coderequired

    string

    Template language code, e.g. en_US, en, hi.
search_template_library#

Search the template library

Read only

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 save_template_draft. Read-only; importing is done in the dashboard.

Parameters (7)›
  • query

    string

    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.
  • industry

    string

    e.g. retail, education.
  • cursor

    string

    next_cursor from the previous page; omit for the first page. Keep the other filters the same; the page size stays as on the first page.
  • page_size

    integer

    Rows per page, 1-100. Default 20.Default 20
  • response_format

    "concise" | "detailed"

    concise returns the fields a person reads; detailed adds ids and raw fields for follow-up calls.Default "concise"
list_template_drafts#

List template drafts

Read only

WhatsApp template drafts saved in SheetWA and not yet sent to Meta. Submit one with submit_template.

Parameters (3)›
  • cursor

    string

    next_cursor from the previous page; omit for the first page. Keep the other filters the same; the page size stays as on the first page.
  • page_size

    integer

    Rows per page, 1-100. Default 20.Default 20
  • response_format

    "concise" | "detailed"

    concise returns the fields a person reads; detailed adds ids and raw fields for follow-up calls.Default "concise"
save_template_draft#

Save a template draft

Writes data

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 list_media.

Parameters (11)›
  • template_namerequired

    string

    Template name as registered with Meta: lowercase snake case.
  • language_coderequired

    string

    Template language code, e.g. en_US, en, hi.
  • categoryrequired

    "MARKETING" | "UTILITY" | "AUTHENTICATION"

    MARKETING for promotions, UTILITY for transactional updates, AUTHENTICATION for codes.
  • bodyrequired

    string

    Message body. Positional placeholders {{1}}, {{2}}… in order; no placeholder at the very start or end.
  • header_text

    string

    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_id

    string

    A media_asset_id from list_media, used as the header sample.
  • footer_text

    string

    No extra notes.
  • quick_reply_buttons

    string[]

    Up to 3 button labels, 25 characters each.
  • url_button

    object

    One link button: label and https URL.
  • draft_id

    string

    A draft_id from list_template_drafts, to change that draft.
submit_template#

Submit a template to Meta for approval

Sends to WhatsApp

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_template shows APPROVED. Owner or admin keys only.

Parameters (11)›
  • template_name

    string

    Template name as registered with Meta: lowercase snake case.
  • language_code

    string

    Template language code, e.g. en_US, en, hi.
  • category

    "MARKETING" | "UTILITY" | "AUTHENTICATION"

    MARKETING for promotions, UTILITY for transactional updates, AUTHENTICATION for codes.
  • body

    string

    Message body. Positional placeholders {{1}}, {{2}}… in order; no placeholder at the very start or end.
  • header_text

    string

    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_id

    string

    A media_asset_id from list_media, used as the header sample.
  • footer_text

    string

    No extra notes.
  • quick_reply_buttons

    string[]

    Up to 3 button labels, 25 characters each.
  • url_button

    object

    One link button: label and https URL.
  • draft_id

    string

    A draft_id from list_template_drafts; give it alone to submit that draft.