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.

Endpointlar /api/v1/channels/{id}/… ostida, {id} — GET /channels'dan olinadigan kanal id (WhatsApp uchun wa_…, Instagram uchun ig_…). Scope'lar: channels:read, channels:write, leads:read, leads:write, scenarios:manage, ai:use. API imkoniyatli tarif talab qilinadi. Quyidan bo'limni tanlang.

Telegram: chatlar va xabarlar

Ulangan Telegram akkauntning (user yoki bot) chatlari, xabarlari, fayllari, mediasi, kontaktlari va qidiruvi.

{id} — GET /channels dagi kanal id. {peer} — Telegram peer: raqamli id (guruh/kanallar manfiy, masalan -1001234567890), @username yoki telefon +9989…

Bot akkauntlar xuddi shu endpointlar bilan ishlaydi; ularda dialoglar ro'yxati yo'q — chatlar mijozlar yozgani sari paydo bo'ladi. Xabar mediasida ref bor — uni POST /dialogs/{peer}/media ga bersangiz, o'sha stiker/rasm qayta yuklamasdan yuboriladi.

Base URL: https://chatvendor.net/api/v1 · har javob {"success": true, "data": …}

GET /me Workspace, plan and number of channels

Javob 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

Ruxsat: channels:read

Javob 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

Ruxsat: channels:read

Parametrlar

idpath · integermajburiy

Channel id (from GET /channels)

Javob 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

Ruxsat: channels:read

Parametrlar

idpath · integermajburiy

Channel id (from GET /channels)

typequery · string: user | bot | group | supergroup | channel
qquery · string
per_pagequery · integer
livequery · integer

1 = refresh from Telegram first

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/1/dialogs \
  -H "Authorization: Bearer cv_live_xxxxxxxxxxxx"
GET /channels/{id}/dialogs/{peer}/messages Messages of a chat

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

limitquery · integer
beforequery · integer
afterquery · integer
livequery · integer

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/1/dialogs/@username/messages \
  -H "Authorization: Bearer cv_live_xxxxxxxxxxxx"
POST /channels/{id}/dialogs/{peer}/messages Send a text message

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)

textstringmajburiy
reply_tointeger
parse_modestring: md | html | none
silentboolean
schedulestring (date-time)

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

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/1/dialogs/@username/file \
  -H "Authorization: Bearer cv_live_xxxxxxxxxxxx"
  -F "file=@photo.jpg" -F "caption=…"
POST /channels/{id}/dialogs/{peer}/forward Forward messages

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)

idsinteger[]majburiy
to_peerstringmajburiy
drop_authorboolean

Javob 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

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)

idsinteger[]majburiy
revokeboolean

Javob 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

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

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/1/dialogs/@username/messages/123/media \
  -H "Authorization: Bearer cv_live_xxxxxxxxxxxx"
GET /channels/{id}/peers/{peer} User / group info

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 · 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

Ruxsat: channels:read

Parametrlar

idpath · integermajburiy

Channel id (from GET /channels)

qquery · stringmajburiy

Javob 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

Ruxsat: channels:write

Parametrlar

idpath · integermajburiy

Channel id (from GET /channels)

So'rov tanasi (application/json)

phonestringmajburiy
first_namestringmajburiy
last_namestring

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

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

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)

refstringmajburiy
captionstring
reply_tointeger
topicinteger
spoilerboolean
schedulestring (date-time)

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

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

messagepath · integermajburiy

Message id

So'rov tanasi (application/json)

datastring
textstring
indexinteger

Javob 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}/replies Comments under a post / replies in a topic

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

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

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
topicinteger

Javob 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}'
POST /channels/{id}/translate Translate text or messages with Telegram's translator

Ruxsat: channels:read

Parametrlar

idpath · integermajburiy

Channel id (from GET /channels)

So'rov tanasi (application/json)

tostringmajburiy

ISO 639-1

textstring
peerstring
idsinteger[]

Javob 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

Ruxsat: channels:read

Parametrlar

idpath · integermajburiy

Channel id (from GET /channels)

textquery · stringmajburiy

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