Гузаштан ба мундариҷа

API-и паёмрасон

Ҳар чизе, ки панел бо аккаунти пайвастшудаи Instagram, WhatsApp ё Telegram карда метавонад, тавассути REST — як калид, як шакли посух, фасл ба фасл.

Тамосҳо (кортаи CRM)

Тегҳо, тағйирёбандаҳо, холҳо, рефералҳо ва пайвандҳои пайгиришавандаи ҳар тамос. Дар Telegram, WhatsApp ва Instagram якхела.

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 '[]'
GET /instagram/follows Does @username follow your connected Instagram account (true / false)

Scope: channels:read

Parameters

usernamequery · stringrequired
accountquery · string

Response 200

OK

curl https://chatvendor.net/api/v1/instagram/follows?username=… \
  -H "Authorization: Bearer cv_live_xxxxxxxxxxxx"
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 '[]'