Create WhatsApp template

Creates a WhatsApp template on one channel profile and submits it to the provider for review. Returns the template with status pending.

Rules are those of the Message templates page; a broken rule answers 422 and creates nothing. header, footer and buttons are not available on a Tyntec channel profile. Read-only fields, such as status, are ignored.

A file in header.url is fetched after the response:

  • Until the file is stored, header.default_media is false and the template is not yet submitted.
  • If the file cannot be fetched or stored, or breaks the limits of its header type, the template becomes rejected and status_reason starts with Default media:. Update it with a new file to submit it.

Requires the messaging.whatsapp_templates.manage scope.

Body Params
string
required
length ≤ 512
^[a-z0-9_]+$

Template name: lowercase letters, digits and underscores. Unique within the WhatsApp Business account of the channel profile.

string
enum
required

Template category defined in WhatsApp Business.

Allowed:
string
required

WhatsApp language code, such as en, en_US or pt_BR.

string
required
length ≤ 1024

Body text. May hold placeholders such as {{1}}.

integer
required

WhatsApp channel profile the template is created on.

header
object | null

Template header. A file or location type requires its Default media.

buttons
array of objects | null

Template buttons, quick replies first. At most 2 url and 1 phone.

buttons
Responses

Language
Credentials
Bearer
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json