# Introduction

Page: https://docs.sonecentral.com/en
Markdown: https://docs.sonecentral.com/en/index.md

> Call your Sonecentral text assistant from your own app or website using familiar OpenAI and Vercel AI SDK formats.

> **Give the docs to your agent.** The full documentation is one Markdown file: https://docs.sonecentral.com/en/llms-full.txt. Paste this URL into your coding agent. For one page, use its .md address, for example https://docs.sonecentral.com/en/hizli-baslangic.md. Page index: https://docs.sonecentral.com/en/llms.txt

## What this API does

The text assistant you configure in Sonecentral replies to customers on WhatsApp, Instagram, Messenger and TikTok. 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:

```txt
https://pb.sonecentral.com/api/v1
```

Choose 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](https://docs.sonecentral.com/en/asistanlar-ve-modeller.md). 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](https://docs.sonecentral.com/en/siparis-randevu-gizlilik.md).
- **Streaming delivers messages.** Business safety checks inspect the complete reply before text is sent. Streaming progresses message by message. See [Streaming](https://docs.sonecentral.com/en/akis.md).
- **Rich messages include plain text.** Product cards, buttons and files arrive as structured data, with a plain text fallback for each. See [Rich messages](https://docs.sonecentral.com/en/zengin-mesajlar.md).
- **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](https://docs.sonecentral.com/en/insan-devri.md).

## Endpoints

| Endpoint | Description |
| --- | --- |
| `GET /models` | Assistants available to the key. [Assistants and models](https://docs.sonecentral.com/en/asistanlar-ve-modeller.md) |
| `GET /models/{id}` | One assistant. |
| `POST /chat/completions` | OpenAI Chat Completions, streamed or non-streamed. [Chat Completions](https://docs.sonecentral.com/en/chat-completions.md) |
| `POST /responses` | OpenAI Responses, streamed or non-streamed. [Responses API](https://docs.sonecentral.com/en/responses.md) |
| `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](https://docs.sonecentral.com/en/vercel-ai-sdk.md) |
| `GET /chat/{id}/stream` | For `useChat({ resume: true })`. Always returns `204`. [Disconnections](https://docs.sonecentral.com/en/vercel-ai-sdk.md#baglanti-koparsa) |
| `GET /conversations/{id}` | Whether the assistant or team owns the conversation. [Conversation state](https://docs.sonecentral.com/en/insan-devri.md#sohbetin-durumu) |
| `GET /conversations/{id}/messages` | Conversation messages, including team replies. [Human handoff](https://docs.sonecentral.com/en/insan-devri.md) |
| `GET /files/{id}` | Signed download URL for a file shared by the assistant. No API key required. [Downloading files](https://docs.sonecentral.com/en/zengin-mesajlar.md#dosya-indirme) |
| `GET /key` | Summary of the current key. [Authentication](https://docs.sonecentral.com/en/kimlik-dogrulama.md#anahtari-denetlemek) |

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](https://docs.sonecentral.com/en/limitler.md).

## Next step

Create your key and send your first request in the [Quickstart](https://docs.sonecentral.com/en/hizli-baslangic.md).
