Access your agent’s data programmatically with the Totebot Public API
The Public API lets you access your agent’s conversations, analytics, customers, and more programmatically. All endpoints are authenticated with an API key and return JSON responses.
API Reference (Swagger)
Browse the full API reference with request/response schemas and try endpoints directly.
Navigate to Dashboard → Settings → API Key for your agent.
2
Generate Key
Click Generate API Key. Your key will be displayed once — copy it immediately and store it securely.
3
Use the Key
Include the key as a Bearer token in the Authorization header of every API request.
Treat your API key like a password. It provides full read access to your agent’s data. If compromised, revoke it immediately from Settings and generate a new one.
Send a message to the agent (streaming SSE response)
The chat endpoint accepts a message, optional conversationId to continue an existing conversation, and optional identity object for user tracking. Responses are streamed as Server-Sent Events with types: chunk, completed, tool_call, action_started, action_completed, error.