Information
- OpenAPI version:
3.1.0
Chat with a live NuacemOne text agent from your website, app or server.
POST /public/v1/text/sessions with your key in X-VoiceCX-Key: a publishable key (vcx_pk_…, only from the websites listed for it) or a secret key (vcx_sk_…, servers only). The answer carries a session token for that one chat.POST /public/v1/text/sessions/{sessionId}/messages with Authorization: Bearer <token>. The reply streams as server-sent events: delta, message, then done (or error). status ({kind}: tool, search, consult, workflow or handoff) says what the agent is working on, without details.POST /public/v1/text/sessions/{sessionId}/feedback with a 1-5 rating (and a comment), once per chat.DELETE /public/v1/text/sessions/{sessionId} ends the chat.A pre-chat form’s answers go in profile when the chat starts (name names the contact; nothing in it identifies the user).
Files: POST /public/v1/text/sessions/{sessionId}/files?name=<file name> with the file’s bytes as the body (PDF, .docx, .xlsx, .csv or .txt). Each file is checked, scanned for malware and read; programs, scripts and macro files are refused. An accepted file returns a fileId: send it in fileIds with the next message. A blocked file returns status: "blocked" and a message to show the user. The number of files per chat and the size of each are set for your organisation (by default 5 files of up to 10 MB).
Rich messages: when the session says richMessages: true, a message event may carry a block (type: quick_replies, buttons, card, carousel, list, table, summary or slot_picker) and blockText, the text to show above it; text stays the full reply for windows that show no blocks. A block may carry after, the end of blockText that the reply wrote after it (a closing question): show it under the block. Cards and carousels carry moreDetails, the label for a card’s longer fields. Block text is plain text, never HTML. Send a tap on a block as postback: {blockId, value} instead of text (a block’s more value asks for the next page of items). While a reply streams, a preparing event ({kind: "rich"}) may arrive instead of further deltas: a block is likely, so show a placeholder until message.
Reply delivery: the session’s replyDelivery is stream (replies arrive as deltas) or complete (no deltas until the reply is finished; then one delta and the message).
Signed-in users: send userId with userHash = HMAC-SHA256(userId, your workspace identity secret), hex, computed on your server.
Voice agents: POST /public/v1/voice/sessions with the same key returns a LiveKit URL and room token for one web call. Connect with a LiveKit client SDK and enable the microphone; leaving the room ends the call. Calls end at the organisation’s maximum call length or after a stretch of silence.