Skip to main content
POST
Send a template message

Authorizations

Authorization
string
header
required

Send your API key as Authorization: Bearer kai_live_....

Make, edit and revoke keys in Kai, under Settings → API. Kai stores only a hash of the key, so the full key is shown one time. You can change the name and the permissions of a key later without a new key.

Headers

Idempotency-Key
string

A unique string per send, at most 200 characters.

Body

application/json
to
object
required

Exactly one of phone or contact_id.

template
object
required
opt_in_confirmed
boolean
required

Must be true. Your assertion that this person opted in to your messages.

channel_id
string<uuid>

Optional when the workspace has one WhatsApp channel.

contact
object

Profile fields for a contact that this send creates.

assignee
string | null

A member id or a member email. The conversation is assigned to them after the send.

messaging_account_id
string | null

The WhatsApp Messaging account the send goes through. Leave it out to use the account chosen in the channel's settings. Send null to let Meta choose. Send an id to use exactly that account: Kai checks the template against that account's templates, and does not fall back to another account when Meta refuses it.

Example:

"1346736087657259"

Response

The message was sent.

data
object