DISKA API
The DISKA API is the platform's public REST interface, built for server-to-server integrations: sync calls and transcripts into your CRM, create and publish agents, feed knowledge bases, and receive webhooks when a call ends instead of polling.
Base URL
https://api.diska.ai/v1
The DISKA API lives under /v1. The /api/v1 prefix belongs to the backoffice's internal API and does not accept API keys.
What you can do
| Resource | Operations | Scope |
|---|---|---|
| Identity | See the organization and key behind the token | — (any valid key) |
| Agents | List and read agents | agents:read |
| Agents | Create an agent (blank or from a template), edit its prompt, greeting, language and knowledge bases, and publish it | agents:write |
| Calls | List calls and read the detail (transcript, executed actions, post-call result) | calls:read |
| Recordings | Download a call's recording | recordings:read |
| Outbound calls | The agent calls a person when your system asks | calls:write |
| Campaigns | Create campaigns, add recipients, start, pause, resume, cancel and read results | campaigns:read, campaigns:write |
| Chat | Chat by text with an agent: send the message and get the reply in the same request | chats:write |
| Analytics | Summary of volume, outcomes, sentiment and per-agent performance | analytics:read |
| Numbers | The organization's phone number inventory | phone-numbers:read |
| Knowledge | List knowledge bases | knowledge:read |
| Knowledge | Create bases and add documents (text, web page, PDF) | knowledge:write |
| Webhooks | Register, update, test and remove webhook endpoints | webhooks:manage |
The full reference (parameters, bodies, responses and errors for every endpoint) is in Endpoints.
What the DISKA API does not do yet
- Talk by voice through the API: to have people talk to an agent, use the widget, the public link, a phone number or WhatsApp. See Realtime.
- Chat by text with Flow Builder agents: the API chat uses prompt-mode agents.
- List agent templates, edit an agent's voice, engine, actions or flows, or manage API keys — do that in the backoffice.
- List, change or delete knowledge documents.
Authentication
Create a key under Definições → Chaves API (Settings → API keys; owners and admins only) and send it with every request:
Authorization: Bearer dsk_…
The X-API-Key: dsk_… header is also accepted. The full key is shown only once, when it is created. Details in Authentication.
Scopes
When you create a key you can choose its Âmbitos (scopes). With no scope selected, the key has full access to every endpoint. With scopes, only those endpoints respond; the others return 403 with A chave não tem o âmbito '<scope>'. ("the key does not have the scope").
| Scope | Name in the backoffice | Grants access to |
|---|---|---|
agents:read | Agentes — leitura | GET /v1/agents, GET /v1/agents/{agent_id} |
agents:write | Agentes — criar, editar e publicar | POST /v1/agents, PATCH /v1/agents/{agent_id}, POST /v1/agents/{agent_id}/publish |
calls:read | Chamadas e transcrições | GET /v1/calls, GET /v1/calls/{call_id}, GET /v1/outbound-calls/{outbound_call_id} |
calls:write | Chamadas — ligar a clientes | POST /v1/outbound-calls, POST /v1/outbound-calls/{outbound_call_id}/hangup |
recordings:read | Gravações — descarregar | GET /v1/calls/{call_id}/recording |
campaigns:read | Campanhas — leitura | GET /v1/campaigns, GET /v1/campaigns/{campaign_id}, GET /v1/campaigns/{campaign_id}/recipients |
campaigns:write | Campanhas — gestão | Create campaigns, add recipients, start, pause, resume and cancel |
chats:write | Chat com agentes | Every /v1/chats endpoint |
analytics:read | Análises | GET /v1/analytics/overview |
phone-numbers:read | Números | GET /v1/phone-numbers |
knowledge:read | Conhecimento — leitura | GET /v1/knowledge-bases |
knowledge:write | Conhecimento — escrita | POST /v1/knowledge-bases and the three document endpoints |
webhooks:manage | Webhooks — gestão | Every /v1/webhook-endpoints endpoint |
GET /v1/me needs no scope. A key's scopes cannot be changed after it is created: to change access, create a new key and revoke the old one.
Outbound calls, campaigns and chat must also be switched on for the organization: they have a cost, so Diska turns them on when asked. Until then they answer 403, even to a key with full access.
First request
curl https://api.diska.ai/v1/me \
-H "Authorization: Bearer dsk_…"
{
"organization": { "id": "…", "name": "My Company", "slug": "my-company" },
"key": {
"id": "…",
"name": "CRM integration",
"key_preview": "dsk_a1b2…F5A4",
"scopes": [],
"expires_at": null,
"created_at": "…",
"last_used_at": "…"
}
}
scopes: [] means full access.
Conventions
- Requests and responses are JSON (UTF-8), except PDF uploads, which are
multipart/form-data. - Dates are ISO 8601.
- Everything belongs to the key's organization: an identifier from another organization returns
404, as if it did not exist. - Every response carries an
X-Request-Idheader. You can send your ownX-Request-Id(8 to 64 characters: letters, digits,.,_,:or-); if you don't, Diska generates one. Quote it when you contact support.
Pagination
Only GET /v1/calls is paginated; the other lists return every item at once. The call list has two modes:
Offset (default) — limit (1–200, default 50) and offset. The response includes total with the exact count. Calls are ordered from newest to oldest.
Cursor — recommended for exporting large histories, because every page costs the same at any depth:
- First request:
GET /v1/calls?cursor=start&limit=200. - The response includes
next_cursor; request the next page withcursor=<next_cursor>, keeping the same filters. - When
next_cursorisnull, you have reached the end.
In cursor mode, total and offset are null and the search parameter is not accepted (400). A malformed cursor returns 400 with Cursor inválido. ("invalid cursor").
Rate limits
By default, each key can make 120 requests per minute. The counter belongs to each key — several keys of the same organization do not share the limit — and the 60-second window starts with the first request.
Above the limit, the API returns 429 with the headers Retry-After (seconds until you can retry), X-RateLimit-Limit and X-RateLimit-Remaining: 0:
{
"detail": {
"error": "rate_limited",
"retry_after_seconds": 42,
"limit": 120,
"window_seconds": 60
}
}
Wait for the time given in Retry-After before retrying. Successful responses do not carry rate-limit headers.
Errors
| Code | When |
|---|---|
400 | Request refused: invalid cursor, search combined with cursor, invalid webhook URL or event, endpoint limit reached, invalid knowledge document (PDF too large, page without text…). |
401 | Key missing, invalid, revoked or expired. |
403 | Organization suspended, or the key lacks the required scope. |
404 | The resource does not exist or belongs to another organization. |
409 | Conflict — for example, publishing an archived agent. |
422 | Validation failed: parameters or body in an invalid format, or an agent that cannot be published (empty prompt, invalid flow). |
429 | Rate limit exceeded — honour Retry-After. |
500 | Unexpected Diska error. |
502 / 503 | Temporary platform failure — retry with increasing back-off and check the . |
Most errors have the shape { "detail": "message" }, with the message in Portuguese. Format validation errors (422) carry detail as a list (field, message), and 429 carries the object shown above. A 500 looks like this:
{
"error": { "code": "internal_server_error", "message": "Internal server error." },
"request_id": "…"
}
OpenAPI specification
GET https://api.diska.ai/v1/openapi.json returns the OpenAPI specification of the DISKA API only. It needs no authentication and can be cached for 5 minutes. You can use it to generate a client in your language; the API reference is generated from it.
The specification version (info.version) follows the versioning policy.
Postman
There is a ready-made Postman collection, with every endpoint, example bodies and authentication already set up:
- In Postman, click Import and choose the downloaded file.
- In the collection, open Variables and set
apiKeyto your key (dsk_…).baseUrlalready points tohttps://api.diska.ai. - Also fill in the IDs you will use (
agent_id,call_id,knowledge_base_id,endpoint_id).
POST, PATCH and DELETE requests change the organization's real data.
Service status
status.diska.ai shows the status of the API, the backoffice and telephony (SIP/PBX), with incidents and maintenance. You can subscribe to updates on the page itself or follow the RSS feed.
If you get 502, 503 or unusual response times, check it before opening a support request. If it shows no incident, contact support with the request's X-Request-Id.

