Diska
API

DISKA API

Diska's public REST API, authenticated with organization API keys.

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

ResourceOperationsScope
IdentitySee the organization and key behind the token— (any valid key)
AgentsList and read agentsagents:read
AgentsCreate an agent (blank or from a template), edit its prompt, greeting, language and knowledge bases, and publish itagents:write
CallsList calls and read the detail (transcript, executed actions, post-call result)calls:read
RecordingsDownload a call's recordingrecordings:read
Outbound callsThe agent calls a person when your system askscalls:write
CampaignsCreate campaigns, add recipients, start, pause, resume, cancel and read resultscampaigns:read, campaigns:write
ChatChat by text with an agent: send the message and get the reply in the same requestchats:write
AnalyticsSummary of volume, outcomes, sentiment and per-agent performanceanalytics:read
NumbersThe organization's phone number inventoryphone-numbers:read
KnowledgeList knowledge basesknowledge:read
KnowledgeCreate bases and add documents (text, web page, PDF)knowledge:write
WebhooksRegister, update, test and remove webhook endpointswebhooks: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.

Use the key only on your server, stored in an environment variable or a secrets vault. Never put it in code that runs in a browser, in a mobile app or in a repository.

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").

ScopeName in the backofficeGrants access to
agents:readAgentes — leituraGET /v1/agents, GET /v1/agents/{agent_id}
agents:writeAgentes — criar, editar e publicarPOST /v1/agents, PATCH /v1/agents/{agent_id}, POST /v1/agents/{agent_id}/publish
calls:readChamadas e transcriçõesGET /v1/calls, GET /v1/calls/{call_id}, GET /v1/outbound-calls/{outbound_call_id}
calls:writeChamadas — ligar a clientesPOST /v1/outbound-calls, POST /v1/outbound-calls/{outbound_call_id}/hangup
recordings:readGravações — descarregarGET /v1/calls/{call_id}/recording
campaigns:readCampanhas — leituraGET /v1/campaigns, GET /v1/campaigns/{campaign_id}, GET /v1/campaigns/{campaign_id}/recipients
campaigns:writeCampanhas — gestãoCreate campaigns, add recipients, start, pause, resume and cancel
chats:writeChat com agentesEvery /v1/chats endpoint
analytics:readAnálisesGET /v1/analytics/overview
phone-numbers:readNúmerosGET /v1/phone-numbers
knowledge:readConhecimento — leituraGET /v1/knowledge-bases
knowledge:writeConhecimento — escritaPOST /v1/knowledge-bases and the three document endpoints
webhooks:manageWebhooks — gestãoEvery /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-Id header. You can send your own X-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:

  1. First request: GET /v1/calls?cursor=start&limit=200.
  2. The response includes next_cursor; request the next page with cursor=<next_cursor>, keeping the same filters.
  3. When next_cursor is null, 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

CodeWhen
400Request refused: invalid cursor, search combined with cursor, invalid webhook URL or event, endpoint limit reached, invalid knowledge document (PDF too large, page without text…).
401Key missing, invalid, revoked or expired.
403Organization suspended, or the key lacks the required scope.
404The resource does not exist or belongs to another organization.
409Conflict — for example, publishing an archived agent.
422Validation failed: parameters or body in an invalid format, or an agent that cannot be published (empty prompt, invalid flow).
429Rate limit exceeded — honour Retry-After.
500Unexpected Diska error.
502 / 503Temporary 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:

  1. In Postman, click Import and choose the downloaded file.
  2. In the collection, open Variables and set apiKey to your key (dsk_…). baseUrl already points to https://api.diska.ai.
  3. 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.

Copyright © 2026