Skip to main content
The Chat API service (chat-api.com) may no longer be maintained. Check its status before you integrate.

Prerequisites

Setup

1

Get your Chat API credentials

In Chat API, open your instance dashboard and copy the instance ID and token.
2

Configure in Courier

Open the in Courier, enter your instance ID and token, then save.

Profile requirements

Chat API addresses the recipient by phone number or chat ID, so the profile you send to needs a chat_api object. Store either one once with , which merges into the profile and creates it if it does not exist:
The number in the recipient’s WhatsApp account.
Then send to user_id and Courier resolves the address. For a one-off with no stored profile, pass it inline instead: "to": { "chat_api": { "phone_number": "12345678" } }.

Send by user id

The call in every language, and the rest of the profile object.

Send to a recipient

Courier reads chat_api off the saved profile, so preferences apply and the value can change without touching this code.

Template

In the notification’s integration settings, set a quoted message ID and mentioned phone numbers.

Overrides

covers the two levels and which one wins. A provider override changes the request body or swaps credentials at send time. body takes any field Chat API’s /sendMessage endpoint supports. config swaps the instance ID, token, or API URL. This example swaps the credentials:

Provider details

Courier recommends routing to the channel. Naming this key in routing.channels instead is supported, and sends through just this provider.

Send to a specific provider

When that is worth doing, and what you give up: failover, channel priority, and providers you add later.