Messenjer API
Panel ulangan Telegram, WhatsApp yoki Instagram akkaunt bilan qila oladigan hamma narsa — REST orqali: bitta kalit, bitta javob formati, bo'limma-bo'lim.
WhatsApp Business raqamining chatlari, xabarlari, fayllari va shablonlari (wa_{id}).
WhatsApp raqamlar GET /channels da wa_12 ko'rinishida; {peer} — mijozning xalqaro formatdagi telefoni. Erkin matn faqat mijozning oxirgi xabaridan 24 soat ichida mumkin — undan tashqarida tasdiqlangan shablon yuboring.
Base URL: https://chatvendor.net/api/v1 · har javob {"success": true, "data": …}
GET
/channels/wa_{id}/dialogs
WhatsApp: chats of a number
channels:read
Ruxsat: channels:read
Parametrlar
idpath · integermajburiyChannel id (from GET /channels)
qquery · stringunreadquery · integerJavob 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/wa_1/dialogs \
-H "Authorization: Bearer cv_live_xxxxxxxxxxxx"
GET
/channels/wa_{id}/dialogs/{peer}/messages
WhatsApp: messages of a chat (peer = phone in international format)
channels:read
Ruxsat: channels:read
Parametrlar
idpath · integermajburiyChannel id (from GET /channels)
peerpath · stringmajburiyTelegram peer: numeric id (channels/groups negative, e.g. -1001234567890), @username or phone
Javob 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/wa_1/dialogs/@username/messages \
-H "Authorization: Bearer cv_live_xxxxxxxxxxxx"
POST
/channels/wa_{id}/dialogs/{peer}/messages
WhatsApp: send text, an approved template, or reply buttons
channels:write
Ruxsat: channels:write
Parametrlar
idpath · integermajburiyChannel id (from GET /channels)
peerpath · stringmajburiyTelegram peer: numeric id (channels/groups negative, e.g. -1001234567890), @username or phone
So'rov tanasi (application/json)
textstringreply_tointegertemplatestringlanguagestringcomponentsobject[]buttonsobject[]buttons[].idstringbuttons[].titlestringJavob 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/wa_1/dialogs/@username/messages \
-H "Authorization: Bearer cv_live_xxxxxxxxxxxx"
-H "Content-Type: application/json" \
-d '[]'
POST
/channels/wa_{id}/dialogs/{peer}/file
WhatsApp: send a file (multipart: file, caption, as=auto|document|voice)
channels:write
Ruxsat: channels:write
Parametrlar
idpath · integermajburiyChannel id (from GET /channels)
peerpath · stringmajburiyTelegram peer: numeric id (channels/groups negative, e.g. -1001234567890), @username or phone
multipart/form-data — maydonlar yuqoridagi tavsifda.
Javob 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/wa_1/dialogs/@username/file \
-H "Authorization: Bearer cv_live_xxxxxxxxxxxx"
-F "file=@photo.jpg" -F "caption=…"
POST
/channels/wa_{id}/dialogs/{peer}/read
WhatsApp: mark the chat as read
channels:write
Ruxsat: channels:write
Parametrlar
idpath · integermajburiyChannel id (from GET /channels)
peerpath · stringmajburiyTelegram peer: numeric id (channels/groups negative, e.g. -1001234567890), @username or phone
Javob 200
OK
curl -X POST https://chatvendor.net/api/v1/channels/wa_1/dialogs/@username/read \
-H "Authorization: Bearer cv_live_xxxxxxxxxxxx"
GET
/channels/wa_{id}/dialogs/{peer}/messages/{message}/media
WhatsApp: download media
channels:read
Ruxsat: channels:read
Parametrlar
idpath · integermajburiyChannel id (from GET /channels)
peerpath · stringmajburiyTelegram peer: numeric id (channels/groups negative, e.g. -1001234567890), @username or phone
messagepath · integermajburiyMessage id
Javob 200
The file
curl https://chatvendor.net/api/v1/channels/wa_1/dialogs/@username/messages/123/media \
-H "Authorization: Bearer cv_live_xxxxxxxxxxxx"
GET
/channels/wa_{id}/templates
WhatsApp: message templates of the number
channels:read
Ruxsat: channels:read
Parametrlar
idpath · integermajburiyChannel id (from GET /channels)
Javob 200 · Template[]
name stringstatus stringcategory stringlanguage stringbody string
curl https://chatvendor.net/api/v1/channels/wa_1/templates \
-H "Authorization: Bearer cv_live_xxxxxxxxxxxx"