Try the interactive chat
Call your assistant from your own code.
The assistant that replies to your customers on WhatsApp also works in your app, with the same instructions, catalog and team. Using OpenAI and Vercel AI SDK formats.
Give it to your coding agent. All documentation in one Markdown file: paste the URL or copy the text.
Request
POST https://pb.sonecentral.com/api/v1/chat/completions Authorization: Bearer sk-sone-v1-… { "model": "default", "messages": [{ "role": "user", "content": "Do you have linen shirts in size M?" }] }
The Sonecentral response fields
"content": "Yes! We have two colors left in M.\n\n…", "sone": { "status": "answered", "messages": [ { "type": "text", "text": "Yes! In M…" }, { "type": "catalog", "catalog": {…} }, { "type": "actions", "actions": {…} } ] }
What this API does
The text assistant you configure in Sonecentral replies to customers on WhatsApp, Instagram and Messenger. This API brings that same assistant into your app, website or backend.
Your assistant replies, with the instructions and workspace configuration you already use: services, products, stock, catalog items, team, departments, business hours, business information, campaigns, shipping rules, price lists, discount authority, Knowledge Base documents and business data extracted from them, order and appointment requests, and team handoff. Requests run through the same runtime that handles your WhatsApp messages.
The difference is that API visitors are anonymous. The assistant does not access their personal records or confirm appointments itself. Every order and appointment is a request awaiting your team's approval.
Base URL and formats
All requests use this base URL:
https://pb.sonecentral.com/api/v1Choose one of three formats. All use the same assistant and conversation record.
| Endpoint | Format and use case |
|---|---|
POST /chat/completions | OpenAI Chat Completions, for an existing OpenAI SDK or compatible client. |
POST /responses | OpenAI Responses, to continue with previous_response_id. |
POST /chat | Vercel AI SDK, for a React or Next.js chat built with useChat. |
Set model to your assistant's ID. GET /models lists IDs: Assistants and models. If your key allows one assistant, use "default".
Things to know
- Visitors are anonymous. The API does not verify a visitor's identity. The assistant helps with public information such as products, prices, stock and appointment availability, and does not disclose previous orders or existing appointments. See Orders, appointments and privacy.
- Streaming delivers messages. Business safety checks inspect the complete reply before text is sent. Streaming progresses message by message. See Streaming.
- Rich messages include plain text. Product cards, buttons and files arrive as structured data, with a plain text fallback for each. See Rich messages.
- Conversations appear in Messages. Every API conversation appears with source API and visitor name API ziyaretçisi (API visitor). The assistant can hand it to your team; staff reply there and your client reads their replies through the API. See Human handoff and team replies.
Endpoints
| Endpoint | Description |
|---|---|
GET /models | Assistants available to the key. Assistants and models |
GET /models/{id} | One assistant. |
POST /chat/completions | OpenAI Chat Completions, streamed or non-streamed. Chat Completions |
POST /responses | OpenAI Responses, streamed or non-streamed. Responses API |
GET /responses/{id} | A stored response. |
DELETE /responses/{id} | Delete a stored response. |
GET /responses/{id}/input_items | A response's input items. |
POST /responses/{id}/cancel | Always returns 400 not_cancellable for an existing response, or 404 response_not_found; responses complete within the request. |
POST /chat | Vercel AI SDK UI message stream for useChat. Vercel AI SDK |
GET /chat/{id}/stream | For useChat({ resume: true }). Always returns 204. Disconnections |
GET /conversations/{id} | Whether the assistant or team owns the conversation. Conversation state |
GET /conversations/{id}/messages | Conversation messages, including team replies. Human handoff |
GET /files/{id} | Signed download URL for a file shared by the assistant. No API key required. Downloading files |
GET /key | Summary of the current key. Authentication |
All endpoints answer OPTIONS preflight requests, so a browser can call them with a publishable key. Every endpoint except GET /files/{id} requires a key and counts toward its limits.
Next step
Create your key and send your first request in the Quickstart.