Messenger API
Everything the panel can do with a connected Telegram, WhatsApp or Instagram account, over REST — one key, one response shape, chapter by chapter.
SDKs & code examples
PHP SDK, WordPress plugin and copy-paste examples in PHP, Node.js and Python.
Libraries
A PHP SDK (Composer) and a WordPress plugin are available, with install steps and worked examples under Integrations. Neither is required — everything is plain HTTP.
composer require chatvendor/sdk
$cv = new ChatVendor\Client('cv_live_xxxxxxxxxxxx');
$cv->sms()->send('+998901234567', 'Your code is 483921', idempotencyKey: 'order-1234');
$cv->chat(1)->send('@username', 'Salom!'); // Telegram channel 1
$cv->chat('wa_12')->sendTemplate('998901234567', 'hello_world', 'en_US');
Send an SMS
PHP
$response = $client->post('https://chatvendor.net/api/v1/messages', [
'headers' => ['Authorization' => 'Bearer ' . $apiKey, 'Idempotency-Key' => 'order-' . $orderId],
'json' => ['to' => '+998901234567', 'message' => 'Your order is ready'],
]);
Node.js
const res = await fetch('https://chatvendor.net/api/v1/messages', {
method: 'POST',
headers: { Authorization: `Bearer ${process.env.CV_API_KEY}`, 'Content-Type': 'application/json', 'Idempotency-Key': `order-${orderId}` },
body: JSON.stringify({ to: '+998901234567', message: 'Your order is ready' }),
});
Python
requests.post(
"https://chatvendor.net/api/v1/messages",
headers={"Authorization": f"Bearer {api_key}", "Idempotency-Key": f"order-{order_id}"},
json={"to": "+998901234567", "message": "Your order is ready"},
)
Send a Telegram message and read the reply
# Node.js
const h = { Authorization: `Bearer ${process.env.CV_API_KEY}`, 'Content-Type': 'application/json' };
await fetch('https://chatvendor.net/api/v1/channels/1/dialogs/@username/messages', { method: 'POST', headers: h, body: JSON.stringify({ text: 'Salom!' }) });
const { data } = await (await fetch('https://chatvendor.net/api/v1/channels/1/dialogs/@username/messages?limit=5', { headers: h })).json();
For incoming messages subscribe a webhook to chat.message instead of polling.