Asosiy qismga o'tish
ChatVendor ChatVendor

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

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

Ruxsat: channels:read

Parametrlar

idpath · integermajburiy

Channel id (from GET /channels)

qquery · string
unreadquery · integer

Javob 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)

Ruxsat: channels:read

Parametrlar

idpath · integermajburiy

Channel id (from GET /channels)

peerpath · stringmajburiy

Telegram 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

Ruxsat: channels:write

Parametrlar

idpath · integermajburiy

Channel id (from GET /channels)

peerpath · stringmajburiy

Telegram peer: numeric id (channels/groups negative, e.g. -1001234567890), @username or phone

So'rov tanasi (application/json)

textstring
reply_tointeger
templatestring
languagestring
componentsobject[]
buttonsobject[]
buttons[].idstring
buttons[].titlestring

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/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)

Ruxsat: channels:write

Parametrlar

idpath · integermajburiy

Channel id (from GET /channels)

peerpath · stringmajburiy

Telegram 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

Ruxsat: channels:write

Parametrlar

idpath · integermajburiy

Channel id (from GET /channels)

peerpath · stringmajburiy

Telegram 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

Ruxsat: channels:read

Parametrlar

idpath · integermajburiy

Channel id (from GET /channels)

peerpath · stringmajburiy

Telegram peer: numeric id (channels/groups negative, e.g. -1001234567890), @username or phone

messagepath · integermajburiy

Message 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

Ruxsat: channels:read

Parametrlar

idpath · integermajburiy

Channel 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"