Introduction
Welcome to the Communiktor API documentation. The API lets you drive your WhatsApp instances from your own code: link an instance, send messages, manage contacts, list groups, and receive events through webhooks.
Base URL: https://api.communiktor.com
Quick start
- In your Communiktor dashboard, create an instance and link it to your WhatsApp account (QR code or pairing code).
- Create an API key in API Keys.
- Send your first message:
curl -X POST https://api.communiktor.com/messages/text \
-H "Content-Type: application/json" \
-H "X-API-KEY: YOUR_API_KEY" \
-d '{
"instance": "YOUR_INSTANCE_ID",
"receiver": "14155552671",
"text": "Hello from Communiktor"
}'
Authentication
- Every request must include an
X-API-KEYheader. - An API key belongs to a team: it can be used with every instance of that team.
- The instance must have an active subscription.
X-API-KEY: YOUR_API_KEY
Keep your API key secret: use it from your servers only, never in a browser or a mobile app.
The instance identifier
Every request names the instance it applies to, in the instance field (or the instance query parameter for GET requests). Use the Instance ID shown on the instance page of your dashboard (for example BUV3WTC).
Common request settings
Content-Type: application/jsonforPOSTrequests.- Most endpoints use
POST. Read-only resources (QR code, groups) useGETwith query parameters. - The request body is limited to 1 MB. Media are sent as URLs, not uploaded.
Response format
All API responses use the same envelope:
success: boolean —trueon success,falseon failurecode: number — the HTTP status codemessage: string — human-readable messagedata: object ornull— the result, when there is one
{
"success": true,
"code": 200,
"message": "The message has been scheduled successfully",
"data": {
"message": "0193a6a2-5c1e-7c43-9a59-3f0f5a6f2b1d"
}
}
Phone numbers and receivers
- Use the international format, digits only, without the leading
+or00. Example:14155552671(not+1 415-555-2671). - To send to a group, set
receiverto the group ID (for example123456789@g.us, see Groups) andgrouptotrue.
Errors
Errors use standard HTTP status codes and keep the envelope, with success: false and a descriptive message.
| Status | Meaning |
|---|---|
| 400 | The request was refused, for example the instance is not connected or the receiver is not on WhatsApp. message gives the reason. |
| 401 | Missing or invalid API key, instance not found in your team, or no active subscription. |
| 404 | The resource does not exist, for example a message that cannot be cancelled. |
| 408 | The instance did not answer in time. Retry after a few seconds. |
| 422 | A field is missing or invalid. |
| 500 | Unexpected error on our side. Retry later; contact us if it persists. |
Notes and best practices
- A
200response to a send request means the message was accepted: the delivery itself happens right after. Follow its outcome with themessage.sent,message.sent.failed,message.receivedandmessage.readwebhooks. - Use stable, publicly accessible URLs for media (image, video, audio, document) with the correct
Content-Type. Private network addresses are refused. - Omit optional fields when not used.
- Handle non-2xx responses, and retry
408and5xxresponses with exponential backoff.