Reference
Making a request
Every endpoint is under /api/v1 and authenticates with a workspace API key as a bearer token. Keys are created in Dashboard, Settings, Developers, and shown once.
curl https://orhanai.com/api/v1/chatbots \
-H "Authorization: Bearer gck_live_..."Each operation lists the scope its key must carry. A key without that scope is refused with 403 rather than returning an empty result, so a missing scope is visible immediately rather than at the end of an integration.
- POST requests accept an Idempotency-Key header. A replay within 24 hours returns the original status and body.
- Rate limits apply per key and per workspace. Both answer 429 with a Retry-After header.
- Every write is recorded in the workspace audit log with the key that made it.
Endpoints
Analytics
GET/analytics
Read workspace analytics summary. Scope: analytics:read
Endpoints
AI Agents
GET/chatbots
List workspace AI Agents. Scope: chatbots:read
POST/chatbots
Create a draft AI Agent. Scope: chatbots:write
GET/chatbots/{id}
Get one AI Agent. Scope: chatbots:read
PATCH/chatbots/{id}
Update one AI Agent. Scope: chatbots:write
Endpoints
Conversations
GET/conversations
List conversations. Scope: conversations:read
GET/conversations/{id}
Get one conversation. Scope: conversations:read
Endpoints
Leads
GET/leads
List captured leads. Scope: leads:read
POST/leads
Create a lead. Scope: leads:write
GET/leads/{id}
Get one lead. Scope: leads:read
PATCH/leads/{id}
Update one lead. Scope: leads:write
Endpoints
Messages
GET/conversations/{id}/messages
List conversation messages. Scope: conversations:read
POST/conversations/{id}/messages
Send a text message into a conversation. Scope: messages:write
Tooling
The same thing, as JSON
This page is rendered from the document served at /api/v1/openapi. Point a client generator at that URL rather than transcribing from here.
Troubleshooting
Common issues and the first checks to run when AI Agent creation, training, publishing, billing, invites, or traffic fails.