Skip to content
ChatVendor ChatVendor

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.

  1. 01

    Create a key

    Developer → API keys → New key. Copy it once; only a prefix is shown later.

  2. 02

    Make a request

    curl https://chatvendor.net/api/v1/me -H "Authorization: Bearer cv_live_…"

  3. 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 messages
messages:readRead messages
devices:readRead devices
devices:manageManage devices
webhooks:manageManage webhooks
analytics:readRead analytics
channels:readRead channels & chats
channels:writeSend in chats
leads:readRead leads
leads:writeManage leads
scenarios:manageManage scenario runs
ai:useUse AI

Response 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

  1. 01

    Connect a channel

    Pair an Android phone for SMS, or connect a Telegram / WhatsApp / Instagram account.

  2. 02

    Create a key

    Tick only the scopes you need; start with a test key.

  3. 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

SMS 6 endpointsQueue an SMS through your own Android phone, check its status, list devices. Telegram: chats & messages 24 endpointsChats, messages, files, media, contacts and search of a connected Telegram account (user or bot). Telegram: groups & channels 8 endpointsMembers, join links, forum topics, settings and invite links of groups and channels. Telegram: stickers, folders, Business, raw 15 endpointsSticker sets, saved GIFs, chat folders, Telegram Business and the passthrough to every connector endpoint. WhatsApp 7 endpointsChats, messages, files and templates of a WhatsApp Business number (wa_{id}). Instagram 5 endpointsDirect messages, comment replies, story replies and files of an Instagram account (ig_{id}). Messenger, Viber, website chat 6 endpointsThe same chat endpoints for a Facebook Page (fb_{id}), a Viber bot (vb_{id}) and the website widget (web_{id}). Contacts (CRM card) 7 endpointsTags, variables, points, referrals and tracked links of every contact — on Telegram, WhatsApp and Instagram alike. Sales & payments 6 endpointsProducts, orders and payments inside chat-bots: Payme, Click, Telegram Stars or manual. Bookings 5 endpointsServices, free time slots and appointments — what the “Booking” scenario step uses. Segments, campaigns, tasks 9 endpointsAudiences from the contact card, drip campaigns with A/B steps, and reminders for the team. Leads 5 endpointsLeads captured by rules and AI, with status, score, tags and summary. Scenarios 2 endpointsRuns of your multi-step flows: list them, approve or reject a waiting step. AI 3 endpointsChat completions and media analysis with your own provider key. Webhooks 4 endpointsGet told when something happens: events, payload, signature, retries. Errors & rate limits The error shape, every error code with its HTTP status, and how limits work. SDKs & code examples PHP SDK, WordPress plugin and copy-paste examples in PHP, Node.js and Python.

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.