Rivier/ Reference/ voice

Write a WhatsApp template

post/phone/templates

Write a WhatsApp template. Placeholders are {{1}}, {{2}}. It cannot be sent until WhatsApp approves it.

Before you call

Credential
Authorization: Bearer $KEY
Scope
voice:write
Mcp
rivier_phone_template_create
Graphql
Mutation.voicePhoneTemplateCreate
Sdk
voice.phoneTemplate.create
Cli
voice phone template create

Request bodyapplication/json, required

  • namestringrequired
    At most 60 characters.
  • languagestring
    Default: en. Pattern: ^[a-z]{2}(_[A-Z]{2})?$.
  • categorystringrequired
    One of: utility, marketing, authentication.
  • bodystringrequired
    At most 1024 characters.

Responses

  • 201application/json
    Success
    • idstringrequired
    • namestringrequired
    • languagestringrequired
    • categorystringrequired
      One of: utility, marketing, authentication.
    • bodystringrequired
    • variableslist of stringrequired
    • statusstringrequired
      One of: draft, pending, approved, rejected, paused.
    • reasonstringrequired
    • createdAtstringrequired
    • updatedAtstringrequired
  • 400application/json
    The request was malformed
    • errorstringrequired
    • messagestring
  • 401application/json
    No valid credential
    • errorstringrequired
    • messagestring
  • 403application/json
    The credential lacks the scope, origin or address
    • errorstringrequired
    • messagestring
  • 429application/json
    Over the key's rate limit; see Retry-After
    • errorstringrequired
    • messagestring

This page as Markdown