Product docs · no login
Setup API
The machine door for configuring a CXVoice account. Built for Claude Code, Cursor and other AI agents — and for your own software. Same validation and plan limits as the portal. No cookie.
For Claude Code, Cursor, and your own software
API ready for AI agentic integration
Account setup via AI. A merchant mints an API key and copies the account id in portal Developer. Hand both to an agent. It configures locations, surveys, nodes, branding, sends and public reviews — no portal session.
- Locations
- Surveys
- QR nodes
- Branding
- Sends
- Review channels
Overview
A merchant mints an API key and copies the account id in portal Developer. Both go on every authenticated call. A UAT key (cbk_uat_…) presented to production is refused, and the reverse.
- Public docs
https://api.cxvoice.io/docs- OpenAPI
https://api.cxvoice.io/docs/openapi.json- API host
- Use the Integration API host configured in your Developer portal. Do not guess it from this page.
- Bodies
- JSON, snake_case
Headers
Authorization: Bearer <key>
X-Account-Id: <merchantId>
X-Merchant-Id is an alias of X-Account-Id. If both are sent they must be equal. Creating POSTs (not sends) also take an Idempotency-Key header: 8–120 printable ASCII characters, no spaces (anything else is 400 invalid_idempotency_key, nothing written).
A key reaches what it was minted for. A whole-business key, the default, reaches every location. A key limited to some locations works like a Branch manager: it reaches only those, and nothing at all once they close (403 location_out_of_scope elsewhere). A franchise head office's organisation key may name its own account or any member's in X-Account-Id; GET /account lists them under organization.accounts. Any other id is 403 account_mismatch.
OpenAPI
No credential. Coding agents should fetch this before calling anything else. Point requests at the Integration API host shown in portal Developer — not at this docs site.
Resources
All paths are under /v1/integrations on the Integration API host. Writes reuse the portal's validation, plan limits and publish guards.
| Resource | Methods |
|---|---|
/openapi.json | GET — no auth. Fetch this first. |
/account | GET — who am I, limits, usage |
/profile | GET, PATCH — name, industry, timezone, vocabulary |
/branding | GET, PATCH — accent only. Logo stays a portal upload. |
/locations | GET, POST, PATCH · POST …/archive (QR codes off, scopes released; reassign_to) · POST …/restore · POST /locations/bulk (up to 500, JSON or CSV) · GET …/qr-pack |
/locations/{id}/branding | GET, PATCH — a location's display name and accent |
/location-groups | GET, POST, PATCH, DELETE — regions and franchisees; a deleted group releases its locations |
/review-destinations | GET, POST, PATCH, DELETE — location defaults and per-node overrides · POST /review-destinations/bulk |
/surveys · /questions | list, create, patch, publish, archive, restore, delete, reorder |
/node-groups | GET, POST, PATCH, DELETE — shelves; nodes are released, not deleted |
/nodes | GET, POST, PATCH, DELETE · slug probe · regenerate · POST /nodes/bulk (up to 1,000 across locations, one batch) |
/notifications · /locations/{id}/notifications | GET, PATCH — account-wide and per-location alerts, escalation · DELETE a location's own routing |
/sends | POST — one invitation per call |
/review-channels | GET, PATCH, DELETE · POST /connect returns an auth_url a human finishes |
/public-reviews | GET (filters) · POST/DELETE …/reply (4,096-byte cap, conflict guard) · POST …/inquiry |
AI setup playbook
Ask the merchant these questions, then call the Setup API in order. Do not invent endpoints — if a path is not in the OpenAPI catalog, it is not on this door.
- What kind of business? restaurant / salon / hotel / support desk / interviews / consultancy / transport / other.
- How many locations?
GET /locationsfirst; reuse an existing row. - Collection style: tables/QR vs named agents vs counters.
- How many nodes? Honour the remaining count on
GET /account. - Languages: English, Sinhala, Tamil. Every string in every language you enable.
- Entry style: five faces or yes/no.
- Happy customers: Google review invite vs just thank you.
Then: locations → survey + questions → publish (when they have a location and a review destination) → nodes: one POST /nodes per card, or one POST /nodes/bulk for a numbered run or the same run at many locations (created whole or not at all). Send an Idempotency-Key either way. Many branches at once: POST /locations/bulk first.
Example
Fetch the catalog from this docs site, then confirm the key and the account id belong together on the Integration API host from Developer. A mismatch is 403 account_mismatch and writes nothing.
curl https://api.cxvoice.io/docs/openapi.json
# Then call the Integration API host shown in portal Developer
curl "$INTEGRATION_API_HOST/v1/integrations/account" \
-H "Authorization: Bearer cbk_live_…" \
-H "X-Account-Id: "
What this door does not do
- Cookie auth. A session cookie on this prefix is ignored.
- Logo binary upload. Accent is writable; the image stays a portal upload.
- Staff invite or email list. Seat limits are on
GET /account. - Inbox, responses, customer PII, CSV export, or billing mutations.