Platform API
With the ChatBooster Platform API, your own systems (CRM, e-commerce backend, membership system and so on) can create and update contacts, look up contacts, and send WhatsApp messages to contacts.
The following endpoints are available:
| Endpoint | Method and path | What it does |
|---|---|---|
| Create or update a contact | POST /v2/contact/createOrUpdate | Create a contact by phone number, or update an existing contact's details, tags, lists and custom fields |
| List contacts | POST /v1/contact/list | Filter contacts by tag, list, channel, phone, email, update time or custom field |
| Send a message to a contact | POST /communicateSrvCloudAPI/message/v1/sendToContact | Send text, an image, a video or a file to a contact |
Scope
The Platform API currently supports contacts on WhatsApp channels only.
Before you start
- Your workspace plan must include the Platform API feature.
- Your workspace has at least one WhatsApp channel connected.
Get your API key
- Log in to ChatBooster and go to Settings → Platform API.
- Click the copy icon to copy the API key.
Each workspace has one API key. When you click Regenerate API key, the old key stops working immediately and every call that uses it will fail. This cannot be undone.
Keep your API key safe
The API key grants access to your workspace. Use it from your server only. Do not put it in a web front end, a mobile app or a public code repository.
Making requests
Base URL
https://api.chatbooster.aiRequest headers
| Header | Value |
|---|---|
Authorization | Your API key, as is (no Bearer prefix) |
Content-Type | application/json |
All endpoints use POST, and request and response bodies are JSON.
Response format
Every endpoint returns Code and Message. Use the Code in the response body to tell whether the call succeeded, not the HTTP status code.
| Code | Meaning |
|---|---|
200 | Success |
400 | Invalid request parameters |
401 | The API key is invalid (Authorization invalid), or the workspace plan does not include the Platform API (Invalid Permission In CloudAPI) |
404 | Contact not found |
500 | The request failed; see Message for details |
Troubleshooting
| What you see | What to do |
|---|---|
Authorization invalid | Check that the Authorization header holds your current API key with no Bearer prefix. After a key is regenerated, the old one no longer works |
Invalid Permission In CloudAPI | The workspace's current plan does not include the Platform API. Upgrade the plan |
ChannelType must be whatsapp | ChannelType only accepts "whatsapp" for now |
telephone is invalid | Telephone must include the country code, for example +85261234567 |
tag[...] not exist / list[...] not exist | Create the tag or list in ChatBooster first, then call again |
Questions? Contact [email protected].