Getting started with the API
The DISKA API is a REST API for your server. It reads agents, calls and transcripts, creates and publishes agents, feeds knowledge bases and tells your system when a call ends. It works from any environment that can make HTTPS requests.
llms.txt (index) and llms-full.txt (full content).Base URL
| Environment | Base URL |
|---|---|
| Production | https://api.diska.ai/v1 |
There is a single base URL for every organization, always over HTTPS. The /api/v1 prefix is the backoffice's internal API and does not accept API keys.
What you can do
| Group | What it does | Endpoints |
|---|---|---|
| Identity | Confirms the organization and the key. | GET /v1/me |
| Agents | Lists, reads, creates, edits and publishes agents. | GET /v1/agents, GET /v1/agents/{agent_id}, POST /v1/agents, PATCH /v1/agents/{agent_id}, POST /v1/agents/{agent_id}/publish |
| Calls | Call history with filters, each call's detail (transcript, executed actions and post-call result) and its recording. | GET /v1/calls, GET /v1/calls/{call_id}, GET /v1/calls/{call_id}/recording |
| Outbound calls | The agent calls a person when your system asks. | /v1/outbound-calls |
| Campaigns | Outbound calls in bulk, with windows and limits. | /v1/campaigns |
| Chat | Text chat with an agent, with the reply in the same request. | /v1/chats |
| Analytics | Volume, outcomes, sentiment and performance per agent. | GET /v1/analytics/overview |
| Phone numbers | The organization's phone numbers. | GET /v1/phone-numbers |
| Knowledge | Creates knowledge bases and adds text, web pages and PDFs. | GET /v1/knowledge-bases, POST /v1/knowledge-bases and the document endpoints |
| Webhooks | Registers the endpoints that receive each completed call's data. | /v1/webhook-endpoints |
Each endpoint's parameters, bodies, responses and errors are in Endpoints. What the API does not do yet is in What the DISKA API does not do yet.
Make your first request
1. Create an API key
- In the backoffice, open Definições → Chaves API (Settings → API keys; Owners and Administrators only).
- Click Criar nova chave API (Create new API key) and name it, for example "API test".
- Under Âmbitos (Scopes), choose Agentes — leitura (agents, read) and Chamadas e transcrições (calls and transcripts) to follow this guide. With no scope, the key has full access.
- Click Gerar (Generate) and copy the key (
dsk_…). It is shown only this once.
Keep the key in an environment variable on your server:
export DISKA_API_KEY="dsk_…"
More in Authentication.
2. Check the key
GET /v1/me needs no scope and returns the organization and the key:
curl https://api.diska.ai/v1/me \
-H "Authorization: Bearer $DISKA_API_KEY"
{
"organization": { "id": "…", "name": "My Company", "slug": "my-company" },
"key": { "id": "…", "name": "API test", "key_preview": "dsk_a1b2…F5A4", "scopes": ["agents:read", "calls:read"], "expires_at": null, "created_at": "…", "last_used_at": "…" }
}
A 401 means the key is missing, wrong, revoked or expired. See authentication errors.
3. List your agents
GET /v1/agents only reads data and has no required parameters:
curl https://api.diska.ai/v1/agents \
-H "Authorization: Bearer $DISKA_API_KEY"
import os
import requests
response = requests.get(
"https://api.diska.ai/v1/agents",
headers={"Authorization": f"Bearer {os.environ['DISKA_API_KEY']}"},
timeout=30,
)
response.raise_for_status()
for agent in response.json()["items"]:
print(agent["id"], agent["name"], agent["status"])
// Node.js 18 or later, in a .mjs file
const response = await fetch('https://api.diska.ai/v1/agents', {
headers: { Authorization: `Bearer ${process.env.DISKA_API_KEY}` }
})
if (!response.ok) throw new Error(`${response.status} ${await response.text()}`)
const { items } = await response.json()
for (const agent of items) console.log(agent.id, agent.name, agent.status)
<?php
$ch = curl_init('https://api.diska.ai/v1/agents');
curl_setopt_array($ch, [
CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . getenv('DISKA_API_KEY')],
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 30,
]);
$body = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
curl_close($ch);
if ($status !== 200) {
throw new RuntimeException("HTTP $status: $body");
}
foreach (json_decode($body, true)['items'] as $agent) {
echo $agent['id'], ' ', $agent['name'], ' ', $agent['status'], PHP_EOL;
}
200 response:
{
"items": [
{
"id": "3f1c2a7e-…",
"name": "Reception",
"slug": "reception",
"description": null,
"status": "active",
"agent_type": "inbound",
"editing_mode": "prompt",
"version": 3,
"phone_number": null,
"public_channel_enabled": false,
"created_at": "2026-10-22T19:14:00Z",
"updated_at": "2026-10-25T18:40:00Z"
}
]
}
Archived agents only appear with ?status=archived. The fields are described in The agent object.
4. Read an agent's calls
With an agent's id, ask for its latest calls:
curl "https://api.diska.ai/v1/calls?agent_id=3f1c2a7e-…&limit=10" \
-H "Authorization: Bearer $DISKA_API_KEY"
Each call has its channel, status, duration, summary and caller. The detail, with the transcript, is at GET /v1/calls/{call_id}. To export large histories, use cursor pagination.
Next steps
FAQ
Can I start calls or campaigns through the API? Yes: outbound calls and campaigns, with published outbound agents, within contact hours. Because they have a cost, Diska switches them on for the organization when asked.
Can I talk to an agent through the API? By text, yes: the chat returns the agent's reply in the same request (switched on by Diska when asked). By voice, use the widget, the public link, a phone number or WhatsApp. See Realtime.
Is there a test environment? There is no sandbox: the API always works on the key's organization data. To test, use a test agent and a key with read scopes only.
Is there an official SDK? Not yet. Generate a client from the OpenAPI specification or call HTTP directly, as in the examples above. To explore the API without writing code, use the Postman collection or Try it in the API reference.
How do I know if the API has problems? Check status.diska.ai: it shows the status of the API, the backoffice and telephony, with ongoing incidents. You can subscribe to updates on the page itself.
Will the API change? Within /v1 there are only compatible changes. See Versioning and changelog.
How many requests can I make? 120 per minute, per key. Above that, the API answers 429 with Retry-After. See Rate limits.
Can I use the key in a browser or a mobile app? No. The key gives access to the organization's data: use it only on your server.

