Messenger API
Всё, что панель умеет с подключённым аккаунтом Telegram, WhatsApp или Instagram, — через REST: один ключ, один формат ответа, по разделам.
Эндпоинты расположены под /api/v1/channels/{id}/…, где {id} — id канала из GET /channels (wa_… для WhatsApp, ig_… для Instagram). Скоупы: channels:read, channels:write, leads:read, leads:write, scenarios:manage, ai:use. Требуется тариф с функцией API. Выберите раздел ниже.
Telegram: чаты и сообщения
Чаты, сообщения, файлы, медиа, контакты и поиск подключённого Telegram-аккаунта (user или бот).
{id} — id канала из GET /channels. {peer} — Telegram peer: числовой id (группы/каналы отрицательные, напр. -1001234567890), @username или телефон +9989…
Бот-аккаунты работают с теми же эндпоинтами; списка диалогов у них нет — чаты появляются по мере того, как пишут клиенты. Медиа сообщения содержит ref — передайте его в POST /dialogs/{peer}/media, чтобы отправить тот же стикер/фото без загрузки.
Base URL: https://chatvendor.net/api/v1 · каждый ответ {"success": true, "data": …}
GET
/me
Workspace, plan and number of channels
Ответ 200 · Me
id integerworkspace stringplan stringaccounts integerrate_limit string
curl https://chatvendor.net/api/v1/me \
-H "Authorization: Bearer cv_live_xxxxxxxxxxxx"
GET
/channels
Connected Telegram accounts
channels:read
Право: channels:read
Ответ 200 · Channel[]
id integertype string: telegram_user | telegram_bot | whatsapp | instagramname stringusername stringphone stringstatus stringconnected_at string (date-time)
curl https://chatvendor.net/api/v1/channels \
-H "Authorization: Bearer cv_live_xxxxxxxxxxxx"
GET
/channels/{id}
One channel
channels:read
Право: channels:read
Параметры
idpath · integerобязательноChannel id (from GET /channels)
Ответ 200 · Channel
id integertype string: telegram_user | telegram_bot | whatsapp | instagramname stringusername stringphone stringstatus stringconnected_at string (date-time)
curl https://chatvendor.net/api/v1/channels/1 \
-H "Authorization: Bearer cv_live_xxxxxxxxxxxx"
GET
/channels/{id}/dialogs
Chats of a channel
channels:read
Право: channels:read
Параметры
idpath · integerобязательноChannel id (from GET /channels)
typequery · string: user | bot | group | supergroup | channelqquery · stringper_pagequery · integerlivequery · integer1 = refresh from Telegram first
Ответ 200 · Dialog[]
peer_id integertype stringtitle stringusername stringunread_count integerlast_message_at string (date-time)last_message_text string
curl https://chatvendor.net/api/v1/channels/1/dialogs \
-H "Authorization: Bearer cv_live_xxxxxxxxxxxx"
GET
/channels/{id}/dialogs/{peer}/messages
Messages of a chat
channels:read
Право: channels:read
Параметры
idpath · integerобязательноChannel id (from GET /channels)
peerpath · stringобязательноTelegram peer: numeric id (channels/groups negative, e.g. -1001234567890), @username or phone
limitquery · integerbeforequery · integerafterquery · integerlivequery · integerОтвет 200 · ChatMessage[]
id integerchat_id integersender_id integersender_name stringout booleandate string (date-time)text stringmedia objectreply_to integertopic_id integerbuttons object[][]
curl https://chatvendor.net/api/v1/channels/1/dialogs/@username/messages \
-H "Authorization: Bearer cv_live_xxxxxxxxxxxx"
POST
/channels/{id}/dialogs/{peer}/messages
Send a text message
channels:write
Право: channels:write
Параметры
idpath · integerобязательноChannel id (from GET /channels)
peerpath · stringобязательноTelegram peer: numeric id (channels/groups negative, e.g. -1001234567890), @username or phone
Тело запроса (application/json)
textstringобязательноreply_tointegerparse_modestring: md | html | nonesilentbooleanschedulestring (date-time)Ответ 200 · ChatMessage
id integerchat_id integersender_id integersender_name stringout booleandate string (date-time)text stringmedia objectreply_to integertopic_id integerbuttons object[][]
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":"…"}'
POST
/channels/{id}/dialogs/{peer}/file
Send a file (multipart/form-data: file, caption, as=auto|document|voice)
channels:write
Право: channels:write
Параметры
idpath · integerобязательноChannel id (from GET /channels)
peerpath · stringобязательноTelegram peer: numeric id (channels/groups negative, e.g. -1001234567890), @username or phone
multipart/form-data — поля перечислены в описании выше.
Ответ 200 · ChatMessage
id integerchat_id integersender_id integersender_name stringout booleandate string (date-time)text stringmedia objectreply_to integertopic_id integerbuttons object[][]
curl -X POST https://chatvendor.net/api/v1/channels/1/dialogs/@username/file \
-H "Authorization: Bearer cv_live_xxxxxxxxxxxx"
-F "file=@photo.jpg" -F "caption=…"
POST
/channels/{id}/dialogs/{peer}/forward
Forward messages
channels:write
Право: channels:write
Параметры
idpath · integerобязательноChannel id (from GET /channels)
peerpath · stringобязательноTelegram peer: numeric id (channels/groups negative, e.g. -1001234567890), @username or phone
Тело запроса (application/json)
idsinteger[]обязательноto_peerstringобязательноdrop_authorbooleanОтвет 200
OK
curl -X POST https://chatvendor.net/api/v1/channels/1/dialogs/@username/forward \
-H "Authorization: Bearer cv_live_xxxxxxxxxxxx"
-H "Content-Type: application/json" \
-d '{"ids":1,"to_peer":"…","drop_author":true}'
POST
/channels/{id}/dialogs/{peer}/delete
Delete messages
channels:write
Право: channels:write
Параметры
idpath · integerобязательноChannel id (from GET /channels)
peerpath · stringобязательноTelegram peer: numeric id (channels/groups negative, e.g. -1001234567890), @username or phone
Тело запроса (application/json)
idsinteger[]обязательноrevokebooleanОтвет 200
OK
curl -X POST https://chatvendor.net/api/v1/channels/1/dialogs/@username/delete \
-H "Authorization: Bearer cv_live_xxxxxxxxxxxx"
-H "Content-Type: application/json" \
-d '{"ids":1,"revoke":true}'
POST
/channels/{id}/dialogs/{peer}/read
Mark a chat as read
channels:write
Право: channels:write
Параметры
idpath · integerобязательноChannel id (from GET /channels)
peerpath · stringобязательноTelegram peer: numeric id (channels/groups negative, e.g. -1001234567890), @username or phone
Ответ 200
OK
curl -X POST https://chatvendor.net/api/v1/channels/1/dialogs/@username/read \
-H "Authorization: Bearer cv_live_xxxxxxxxxxxx"
GET
/channels/{id}/dialogs/{peer}/messages/{message}/media
Download media (?thumb=1 for a thumbnail)
channels:read
Право: channels:read
Параметры
idpath · integerобязательноChannel id (from GET /channels)
peerpath · stringобязательноTelegram peer: numeric id (channels/groups negative, e.g. -1001234567890), @username or phone
messagepath · integerобязательноMessage id
Ответ 200
The file
curl https://chatvendor.net/api/v1/channels/1/dialogs/@username/messages/123/media \
-H "Authorization: Bearer cv_live_xxxxxxxxxxxx"
GET
/channels/{id}/peers/{peer}
User / group info
channels:read
Право: channels:read
Параметры
idpath · integerобязательноChannel id (from GET /channels)
peerpath · stringобязательноTelegram peer: numeric id (channels/groups negative, e.g. -1001234567890), @username or phone
Ответ 200 · Peer
id integertype stringtitle stringusername stringphone string
curl https://chatvendor.net/api/v1/channels/1/peers/@username \
-H "Authorization: Bearer cv_live_xxxxxxxxxxxx"
GET
/channels/{id}/resolve
Resolve @username, t.me link or phone to a peer
channels:read
Право: channels:read
Параметры
idpath · integerобязательноChannel id (from GET /channels)
qquery · stringобязательноОтвет 200 · Peer
id integertype stringtitle stringusername stringphone string
curl https://chatvendor.net/api/v1/channels/1/resolve?q=… \
-H "Authorization: Bearer cv_live_xxxxxxxxxxxx"
POST
/channels/{id}/contacts
Add a contact
channels:write
Право: channels:write
Параметры
idpath · integerобязательноChannel id (from GET /channels)
Тело запроса (application/json)
phonestringобязательноfirst_namestringобязательноlast_namestringОтвет 200 · Peer
id integertype stringtitle stringusername stringphone string
curl -X POST https://chatvendor.net/api/v1/channels/1/contacts \
-H "Authorization: Bearer cv_live_xxxxxxxxxxxx"
-H "Content-Type: application/json" \
-d '{"phone":"…","first_name":"…","last_name":"…"}'
POST
/channels/{id}/dialogs/{peer}/album
Send an album (multipart/form-data: files[] 2–10, caption, reply_to, topic)
channels:write
Право: channels:write
Параметры
idpath · integerобязательноChannel id (from GET /channels)
peerpath · stringобязательноTelegram peer: numeric id (channels/groups negative, e.g. -1001234567890), @username or phone
multipart/form-data — поля перечислены в описании выше.
Ответ 200 · ChatMessage[]
id integerchat_id integersender_id integersender_name stringout booleandate string (date-time)text stringmedia objectreply_to integertopic_id integerbuttons object[][]
curl -X POST https://chatvendor.net/api/v1/channels/1/dialogs/@username/album \
-H "Authorization: Bearer cv_live_xxxxxxxxxxxx"
-F "file=@photo.jpg" -F "caption=…"
POST
/channels/{id}/dialogs/{peer}/media
Send existing media by ref (sticker, saved GIF, media from any message)
channels:write
Право: channels:write
Параметры
idpath · integerобязательноChannel id (from GET /channels)
peerpath · stringобязательноTelegram peer: numeric id (channels/groups negative, e.g. -1001234567890), @username or phone
Тело запроса (application/json)
refstringобязательноcaptionstringreply_tointegertopicintegerspoilerbooleanschedulestring (date-time)Ответ 200 · ChatMessage
id integerchat_id integersender_id integersender_name stringout booleandate string (date-time)text stringmedia objectreply_to integertopic_id integerbuttons object[][]
curl -X POST https://chatvendor.net/api/v1/channels/1/dialogs/@username/media \
-H "Authorization: Bearer cv_live_xxxxxxxxxxxx"
-H "Content-Type: application/json" \
-d '{"ref":"…"}'
POST
/channels/{id}/dialogs/{peer}/messages/{message}/click
Press a bot keyboard button (by data, text or index)
channels:write
Право: channels:write
Параметры
idpath · integerобязательноChannel id (from GET /channels)
peerpath · stringобязательноTelegram peer: numeric id (channels/groups negative, e.g. -1001234567890), @username or phone
messagepath · integerобязательноMessage id
Тело запроса (application/json)
datastringtextstringindexintegerОтвет 200 · ButtonAnswer
pressed stringmessage stringalert booleanurl string
curl -X POST https://chatvendor.net/api/v1/channels/1/dialogs/@username/messages/123/click \
-H "Authorization: Bearer cv_live_xxxxxxxxxxxx"
-H "Content-Type: application/json" \
-d '{"data":"…","text":"…","index":1}'
GET
/channels/{id}/dialogs/{peer}/messages/{message}/link
Public t.me link of a channel/group message
channels:read
Право: channels:read
Параметры
idpath · integerобязательноChannel id (from GET /channels)
peerpath · stringобязательноTelegram peer: numeric id (channels/groups negative, e.g. -1001234567890), @username or phone
messagepath · integerобязательноMessage id
Ответ 200 · Link
link stringhtml string
curl https://chatvendor.net/api/v1/channels/1/dialogs/@username/messages/123/link \
-H "Authorization: Bearer cv_live_xxxxxxxxxxxx"
GET
/channels/{id}/dialogs/{peer}/messages/{message}/replies
Comments under a post / replies in a topic
channels:read
Право: channels:read
Параметры
idpath · integerобязательноChannel id (from GET /channels)
peerpath · stringобязательноTelegram peer: numeric id (channels/groups negative, e.g. -1001234567890), @username or phone
messagepath · integerобязательноMessage id
Ответ 200 · MessagePage
messages ChatMessage[]count integer
curl https://chatvendor.net/api/v1/channels/1/dialogs/@username/messages/123/replies \
-H "Authorization: Bearer cv_live_xxxxxxxxxxxx"
GET
/channels/{id}/dialogs/{peer}/mentions
Unread mentions (?reactions=1: unseen reactions to our messages)
channels:read
Право: channels:read
Параметры
idpath · integerобязательноChannel id (from GET /channels)
peerpath · stringобязательноTelegram peer: numeric id (channels/groups negative, e.g. -1001234567890), @username or phone
Ответ 200 · MessagePage
messages ChatMessage[]count integer
curl https://chatvendor.net/api/v1/channels/1/dialogs/@username/mentions \
-H "Authorization: Bearer cv_live_xxxxxxxxxxxx"
PUT
/channels/{id}/dialogs/{peer}/draft
Save the chat draft (empty text clears it)
channels:write
Право: channels:write
Параметры
idpath · integerобязательноChannel id (from GET /channels)
peerpath · stringобязательноTelegram peer: numeric id (channels/groups negative, e.g. -1001234567890), @username or phone
Тело запроса (application/json)
textstringreply_tointegertopicintegerОтвет 200
OK
curl -X PUT https://chatvendor.net/api/v1/channels/1/dialogs/@username/draft \
-H "Authorization: Bearer cv_live_xxxxxxxxxxxx"
-H "Content-Type: application/json" \
-d '{"text":"…","reply_to":1,"topic":1}'
GET
/channels/{id}/search
Full-text search across all chats
channels:read
Право: channels:read
Параметры
idpath · integerобязательноChannel id (from GET /channels)
qquery · stringобязательноkindquery · string: users | groups | channelslimitquery · integerОтвет 200 · MessagePage
messages ChatMessage[]count integer
curl https://chatvendor.net/api/v1/channels/1/search?q=… \
-H "Authorization: Bearer cv_live_xxxxxxxxxxxx"
POST
/channels/{id}/translate
Translate text or messages with Telegram's translator
channels:read
Право: channels:read
Параметры
idpath · integerобязательноChannel id (from GET /channels)
Тело запроса (application/json)
tostringобязательноISO 639-1
textstringpeerstringidsinteger[]Ответ 200 · Translation[]
text string
curl -X POST https://chatvendor.net/api/v1/channels/1/translate \
-H "Authorization: Bearer cv_live_xxxxxxxxxxxx"
-H "Content-Type: application/json" \
-d '{"to":"…"}'
GET
/channels/{id}/preview
Link preview Telegram would attach to this text
channels:read
Право: channels:read
Параметры
idpath · integerобязательноChannel id (from GET /channels)
textquery · stringобязательноОтвет 200 · WebPage
url stringsite_name stringtitle stringdescription stringhas_photo boolean
curl https://chatvendor.net/api/v1/channels/1/preview?text=… \
-H "Authorization: Bearer cv_live_xxxxxxxxxxxx"