API documentation
One key, one base URL, one response shape for SMS and messenger endpoints.
Base URL: https://chatvendor.net/api/v1. Send your key as a Bearer token. Every response is {"success": true, "data": …} or {"success": false, "error": {"code", "message"}}.
Keys are created in the dashboard under Developer → API keys, with scopes that limit what the key may do and an environment: live or test.
- 01
Create a key
Developer → API keys → New key. Copy it once; only a prefix is shown later.
- 02
Make a request
curl https://chatvendor.net/api/v1/me -H "Authorization: Bearer cv_live_…"
- 03
Listen for events
Register a webhook URL and verify the X-ChatVendor-Signature header.
Getting started
Keys, scopes, the response shape and your first request.
Authentication
Create a key under Developer → API keys and send it as a bearer token. Keys are server-to-server credentials — never put one in browser JavaScript or a mobile app.
Authorization: Bearer cv_live_xxxxxxxxxxxx
A cv_test_ key runs the full flow but never touches a SIM or a messenger, so you can integrate without spending credit. Keys issued before ChatVendor 2.0 start with sms_ and keep working.
Scopes
Every key carries scopes; an endpoint lists the scope it needs. Messenger endpoints also need a plan with API access.
messages:sendSend messagesmessages:readRead messagesdevices:readRead devicesdevices:manageManage deviceswebhooks:manageManage webhooksanalytics:readRead analyticschannels:readRead channels & chatschannels:writeSend in chatsleads:readRead leadsleads:writeManage leadsscenarios:manageManage scenario runsai:useUse AIResponse shape
Base URL https://chatvendor.net/api/v1. Every answer is JSON with a success flag; lists carry a meta object with paging. Failures always use the error shape — branch on code, never on the message text.
{
"success": true,
"data": { "id": "msg_01j…", "status": "queued" }
}
{
"success": false,
"error": { "code": "INVALID_API_KEY", "message": "…" }
}
Your first request
- 01
Connect a channel
Pair an Android phone for SMS, or connect a Telegram / WhatsApp / Instagram account.
- 02
Create a key
Tick only the scopes you need; start with a test key.
- 03
Call the API
List your channels, then send a message — the two requests below.
curl https://chatvendor.net/api/v1/channels -H "Authorization: Bearer cv_live_xxxxxxxxxxxx"
curl -X POST https://chatvendor.net/api/v1/channels/1/dialogs/@username/messages \
-H "Authorization: Bearer cv_live_xxxxxxxxxxxx" -H "Content-Type: application/json" \
-d '{"text": "Salom! Bu API orqali yuborildi."}'
curl -X POST https://chatvendor.net/api/v1/messages \
-H "Authorization: Bearer cv_live_xxxxxxxxxxxx" -H "Content-Type: application/json" -H "Idempotency-Key: order-1234" \
-d '{"to": "+998901234567", "message": "Your code is 483921"}'
Reference by area
Questions
Is there an SDK?
Yes — a PHP package via Composer and a WordPress plugin; other languages can generate a client from the OpenAPI document.
Where are the limits documented?
In the rate-limit section below and in the response headers X-RateLimit-Limit and X-RateLimit-Remaining.