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.

Segmentlar, kampaniyalar, vazifalar

Kontakt kartochkasi bo'yicha auditoriyalar, A/B qadamli drip-kampaniyalar va jamoa uchun eslatmalar.

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

GET /segments Saved audiences (segments) with rules and the cached size

Ruxsat: channels:read

Javob 200

OK

curl https://chatvendor.net/api/v1/segments \
  -H "Authorization: Bearer cv_live_xxxxxxxxxxxx"
POST /segments/preview Count contacts for ad-hoc rules (tags_any, tags_none, vars, active_days, silent_days, purchased, min_points, has_phone, networks, lead_status…)

Ruxsat: channels:read

So'rov tanasi (application/json)

rulesobject

Javob 200

OK

curl -X POST https://chatvendor.net/api/v1/segments/preview \
  -H "Authorization: Bearer cv_live_xxxxxxxxxxxx"
  -H "Content-Type: application/json" \
  -d '{"rules":{"tags_any":"vip","active_days":30}}'
GET /segments/{id}/contacts Members of a segment (channel_id, peer_id, title, phone, tags, points); ?limit=&offset=

Ruxsat: channels:read

Parametrlar

idpath · integermajburiy

Segment id

Javob 200

OK

curl https://chatvendor.net/api/v1/segments/1/contacts \
  -H "Authorization: Bearer cv_live_xxxxxxxxxxxx"
GET /campaigns Drip campaigns (entry rule, steps, enrolled)

Ruxsat: channels:read

Javob 200

OK

curl https://chatvendor.net/api/v1/campaigns \
  -H "Authorization: Bearer cv_live_xxxxxxxxxxxx"
GET /campaigns/{id} A campaign with per-step / per-variant stats (sent, replied, converted) and enrolment counts

Ruxsat: channels:read

Parametrlar

idpath · integermajburiy

Campaign id

Javob 200

OK

curl https://chatvendor.net/api/v1/campaigns/1 \
  -H "Authorization: Bearer cv_live_xxxxxxxxxxxx"
POST /campaigns/{id}/enrol Put a contact into the campaign now (the first step follows its day/hour rule)

Ruxsat: channels:write

Parametrlar

idpath · integermajburiy

Campaign id

So'rov tanasi (application/json)

channel_idstring
peer_idstring

Javob 200

OK

curl -X POST https://chatvendor.net/api/v1/campaigns/1/enrol \
  -H "Authorization: Bearer cv_live_xxxxxxxxxxxx"
  -H "Content-Type: application/json" \
  -d '{"channel_id":"wa_12","peer_id":"998901234567"}'
GET /tasks Open reminders of the team (?done=1 for finished, ?all=1 for both)

Ruxsat: channels:read

Javob 200

OK

curl https://chatvendor.net/api/v1/tasks \
  -H "Authorization: Bearer cv_live_xxxxxxxxxxxx"
POST /tasks Create a reminder; channel_id + peer_id tie it to a chat, user_id assigns it

Ruxsat: channels:write

So'rov tanasi (application/json)

titlestring
due_atstring
notestring
user_idinteger
channel_idstring
peer_idstring

Javob 200

OK

curl -X POST https://chatvendor.net/api/v1/tasks \
  -H "Authorization: Bearer cv_live_xxxxxxxxxxxx"
  -H "Content-Type: application/json" \
  -d '[]'
POST /tasks/{id}/done Mark a reminder done (undo=true reopens)

Ruxsat: channels:write

Parametrlar

idpath · integermajburiy

Task id

Javob 200

OK

curl -X POST https://chatvendor.net/api/v1/tasks/1/done \
  -H "Authorization: Bearer cv_live_xxxxxxxxxxxx"