Templates and media
7 tools

Templates and media tools

Read Meta-approved templates, save drafts, submit new ones for approval, and find files already in your media library.

Badges:Read onlyWrites dataSends to WhatsAppDestructive
waca_templates_list#

List message templates

Read only

Templates registered with Meta for this workspace, with status (APPROVED templates are the only ones that can be sent), body text and the list of placeholders each needs. Use detailed for the raw components and version.

Parameters (5)›
  • 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.
  • 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"
waca_templates_get#

Get one template

Read only

One template by name and language, with its body, placeholders, buttons, status and rejection reason. Check placeholders before any template send.

Parameters (2)›
  • template_namerequired

    string

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

    string

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

List template drafts

Read only

Local drafts not yet submitted to Meta. A draft becomes a real template with waca_templates_submit.

Takes no parameters.

waca_templates_save_draft#

Save a template draft

Writes data

Writes a template draft locally without submitting it to Meta, so a person can review it in the dashboard. Pass draft_id to update an existing draft. Body placeholders are positional {{1}}, {{2}}. Nothing is sent to Meta.

Parameters (11)›
  • template_namerequired

    string

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

    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. Mutually exclusive with header_format.
  • header_format

    "IMAGE" | "VIDEO" | "DOCUMENT"

    Media header type; pair with header_asset_id from waca_media_list.
  • header_asset_id

    string

    Media-library asset used as the header sample.
  • footer_text

    string

    No extra notes.
  • quick_reply_buttons

    string[]

    No extra notes.
  • url_button

    object

    No extra notes.
  • draft_id

    string

    No extra notes.
waca_templates_submit#

Submit a template to Meta for approval

Sends to WhatsApp

Submits a template to Meta. Approval usually takes minutes to hours; the template cannot be sent until its status is APPROVED. Either pass draft_id alone to submit an existing draft, or the full fields. Owner/admin only.

Parameters (11)›
  • template_name

    string

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

    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. Mutually exclusive with header_format.
  • header_format

    "IMAGE" | "VIDEO" | "DOCUMENT"

    Media header type; pair with header_asset_id from waca_media_list.
  • header_asset_id

    string

    Media-library asset used as the header sample.
  • footer_text

    string

    No extra notes.
  • quick_reply_buttons

    string[]

    No extra notes.
  • url_button

    object

    No extra notes.
  • draft_id

    string

    No extra notes.
waca_media_list#

List media library files

Read only

Images, videos, documents and audio already uploaded to the workspace's media library. Use an asset_id as a template media header (waca_templates_save_draft) or as the file of a media broadcast (waca_broadcasts_create). Uploading new files is done by a person in the dashboard.

Parameters (4)›
  • kind

    "image" | "video" | "document" | "audio"

    No extra notes.
  • query

    string

    Start of the file name.
  • page

    integer

    1-based page number.Default 1
  • page_size

    integer

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