Skip to content
ChatVendor ChatVendor

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.

Contacts (CRM card)

Tags, variables, points, referrals and tracked links of every contact — on Telegram, WhatsApp and Instagram alike.

The contact card is shared by every network: {id} may be a Telegram account, wa_{id} or ig_{id}. Tags, variables and points are the same ones rules, scenarios and templates use ({{contact.x}}, {{points}}, {{rank}}).

Base URL: https://chatvendor.net/api/v1 · every response is {"success": true, "data": …}

GET /channels/{id}/contacts Contact cards (tags, variables, points, referrals); id = Telegram account, wa_{id} or ig_{id}. Query: tag, q, var, limit, offset

Scope: channels:read

Parameters

idpath · integerrequired

Channel id (from GET /channels)

Response 200 · Contact[]

peer_id integertitle stringusername stringtype stringtags string[]vars objectpoints integerreferrals_count integerreferrer_peer_id integerref_code stringref_link stringnotes stringconverted_at string (date-time)last_message_at string (date-time)

curl https://chatvendor.net/api/v1/channels/1/contacts \
  -H "Authorization: Bearer cv_live_xxxxxxxxxxxx"
GET /channels/{id}/contacts/{peer} One contact card

Scope: channels:read

Parameters

idpath · integerrequired

Channel id (from GET /channels)

peerpath · stringrequired

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

Response 200 · Contact

peer_id integertitle stringusername stringtype stringtags string[]vars objectpoints integerreferrals_count integerreferrer_peer_id integerref_code stringref_link stringnotes stringconverted_at string (date-time)last_message_at string (date-time)

curl https://chatvendor.net/api/v1/channels/1/contacts/@username \
  -H "Authorization: Bearer cv_live_xxxxxxxxxxxx"
PATCH /channels/{id}/contacts/{peer} Change tags / variables / notes of a contact

Scope: channels:write

Parameters

idpath · integerrequired

Channel id (from GET /channels)

peerpath · stringrequired

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

Body (application/json)

tagsstring[]
add_tagsstring[]
remove_tagsstring[]
varsobject
notesstring

Response 200 · Contact

peer_id integertitle stringusername stringtype stringtags string[]vars objectpoints integerreferrals_count integerreferrer_peer_id integerref_code stringref_link stringnotes stringconverted_at string (date-time)last_message_at string (date-time)

curl -X PATCH https://chatvendor.net/api/v1/channels/1/contacts/@username \
  -H "Authorization: Bearer cv_live_xxxxxxxxxxxx"
  -H "Content-Type: application/json" \
  -d '[]'
POST /channels/{id}/contacts/{peer}/points Add / deduct points (ref deduplicates)

Scope: channels:write

Parameters

idpath · integerrequired

Channel id (from GET /channels)

peerpath · stringrequired

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

Body (application/json)

deltainteger
reasonstring
refstring

Response 200

OK

curl -X POST https://chatvendor.net/api/v1/channels/1/contacts/@username/points \
  -H "Authorization: Bearer cv_live_xxxxxxxxxxxx"
  -H "Content-Type: application/json" \
  -d '{"delta":1,"reason":"…","ref":"…"}'
GET /channels/{id}/leaderboard Points leaderboard

Scope: channels:read

Parameters

idpath · integerrequired

Channel id (from GET /channels)

Response 200

OK

curl https://chatvendor.net/api/v1/channels/1/leaderboard \
  -H "Authorization: Bearer cv_live_xxxxxxxxxxxx"
POST /channels/{id}/links Create / update a tracked link

Scope: channels:write

Parameters

idpath · integerrequired

Channel id (from GET /channels)

Body (application/json)

namestring
urlstring
tagstring
peer_idinteger

Response 200

OK

curl -X POST https://chatvendor.net/api/v1/channels/1/links \
  -H "Authorization: Bearer cv_live_xxxxxxxxxxxx"
  -H "Content-Type: application/json" \
  -d '[]'