https://api.sempera.org/v1. Every request is JSON over HTTPS with an API key in the Authorization header.
Before you start
- You need a workspace and an API key. New registrations are temporarily unavailable; existing customers can log in to the Sempera App at
https://app.sempera.org. The workspace owner creates API keys there under Settings, API keys, or withPOST /v1/api-keys(Authentication and credentials). If you do not have a workspace yet, write to hello@sempera.org to ask for access. - There is one API hostname and no separate test host. Everything below runs against
https://api.sempera.org. Experiment in a workspace you can afford to change, and useIdempotency-Keyon writes you may retry (Errors and limits). - A key is a secret. Keep it on your server, never in a browser or a repository (Security and privacy).
- Examples here are synthetic. They use a demonstration agent,
northwind-barbers. Substitute your own agent’s id.
The developer journey
- Get an API key. The workspace owner creates one in the App (Settings, API keys, New API key) or with
POST /v1/api-keys. The secret starts withsempera_sk_and is shown once. - Create an Agent.
POST /v1/agentswith{"name": "Northwind Barbers"}. The response is the Agent, including its stableid. - Configure instructions and voice.
PATCH /v1/agents/{id}/draftwith{"fields": {...}}. ReadGET /v1/agents/{id}/draftfirst:editable_fieldslists the keys a PATCH may carry, andGET /v1/agents/{id}shows their current values. - Attach tools. Create them once with
POST /v1/tools, then reference their ids in the draft’s attachment fields. - Attach knowledge. Upload documents with
POST /v1/knowledge-sources?agent_id=...(multipart), then attach the collection in the draft. - Preview.
POST /v1/agents/{id}/previewwith{"message": "Hi, can I book a haircut?"}runs one typed turn against the draft. - Run tests.
POST /v1/testswith{"agent_id": "..."}starts the scripted battery; pollGET /v1/tests/{test_id}. - Publish.
POST /v1/agents/{id}/publishcreates a new immutable version. Production only ever uses a published version. - Open a conversation.
POST /v1/sessionswith{"agent_id": "...", "channel": "web_voice"}returns a short-lived realtime token for a browser, or bind a number withPOST /v1/phone-numbers. - Inspect it.
GET /v1/sessions?agent_id=...lists every conversation;GET /v1/sessions/{id}has the transcript, tool timeline and outcome. - Run evals. Define criteria with
POST /v1/evals, judge conversations withPOST /v1/evals/run. - Iterate. Edit the draft, preview, publish again. Versions are never rewritten; roll back with
POST /v1/agents/{id}/rollback.
First request
X-Request-Id; quote it when you write to support.
Create and publish an agent
Connecting a coding agent (MCP)
POST /v1/mcp is a JSON-RPC 2.0 Model Context Protocol endpoint (initialize, tools/list, tools/call), for driving Sempera from a coding agent instead of a browser. It needs agents:read, the same bearer key as every other route. Three tools: list_agents and get_agent wrap the Agents API; mcp_client_setup (arguments {"client": "claude-code" | "claude-desktop" | "cursor" | "vs-code" | "windsurf" | "gemini-cli" | "codex" | "other"}) returns that client’s own URL, header and config snippet, so a coding agent (or you) can connect any of them without leaving the session:
GET /v1/mcp/clients/{client} (same key, same scope), which is what the App’s Settings > API keys page uses.
Writes stay on the REST routes above; nothing here mutates a workspace yet.
What the API does not do yet
Plan for these before you design around the API:- Create a workspace. A workspace is created in the App when a person signs up. No API route creates one, and the first API key is created in the App too (Authentication and credentials).
- Buy or search for a phone number.
POST /v1/phone-numberspoints a number you supply at an agent. - Manage plans, payment methods or invoices. Those live in the Sempera App (Billing boundaries).
- Change recording, retention or deletion settings, or hand you call audio. Those are workspace owner settings in the App, and an API key is never given audio (Call recordings).
- Replace the App’s owner features. Call-data exports, outbound scheduling and tool analytics have no API route (Owner features in the App).
- Install a Sempera SDK. None is published; the OpenAPI document is the contract (Web SDK).
Where the rest is
The full contract ishttps://api.sempera.org/openapi.json. The guide pages are listed in https://api.sempera.org/llms.txt. Three pages answer the questions teams ask before they commit: security and privacy, billing boundaries and supported clients.