Agents
Get an agent
Returns one of the organization's agents with the configuration you can edit (configuration): prompt, greeting, language, personality, objections, notes and knowledge bases.
GET https://api.diska.ai/v1/agents/{agent_id}
Scope: agents:read
It is the draft — what the next publish freezes. has_unpublished_changes says whether it differs from the published version.
Parameters
Path
| Name | Type | Required | Description |
|---|---|---|---|
agent_id | string | Yes | The agent's ID. |
Examples
curl "https://api.diska.ai/v1/agents/<agent_id>" \
-H "Authorization: Bearer $DISKA_API_KEY"
import os
import requests
response = requests.get(
"https://api.diska.ai/v1/agents/<agent_id>",
headers={"Authorization": f"Bearer {os.environ['DISKA_API_KEY']}"},
timeout=30,
)
response.raise_for_status()
print(response.json())
// Node.js 18 or later, in a .mjs file
const response = await fetch('https://api.diska.ai/v1/agents/<agent_id>', {
headers: { Authorization: `Bearer ${process.env.DISKA_API_KEY}` }
})
if (!response.ok) throw new Error(`${response.status} ${await response.text()}`)
console.log(await response.json())
<?php
$ch = curl_init('https://api.diska.ai/v1/agents/<agent_id>');
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 >= 400) {
throw new RuntimeException("HTTP $status: $body");
}
print_r(json_decode($body, true));
Try it
Send the request from this page, with your key. The key stays on this page: it is not stored and is only sent to api.diska.ai. Use a test key with the fewest scopes you need.
GET
https://api.diska.ai/v1/agents/{agent_id}Starts with dsk_. It stays in this browser tab only.
path
Enter an API key (dsk_…).
Response 200
| Field | Type | Description |
|---|---|---|
id | string | Agent ID. |
name | string | Agent name. |
slug | string | Readable agent identifier. |
description | string | null | Description, or null. |
status | string | draft, active, inactive or archived. A published agent is active. |
agent_type | string | inbound, outbound, voice_widget or chat. |
editing_mode | string | prompt or flow (Flow Builder). It does not change after creation. Default: prompt. |
version | integer | Agent version number. Default: 1. |
phone_number | string | null | Number assigned to the agent, or null. |
public_channel_enabled | boolean | true when the agent's public link is on. Default: false. |
created_at | string | Creation date (ISO 8601). |
updated_at | string | Last change date (ISO 8601). |
configuration | object | The editable configuration (the draft). |
configuration.prompt | string | null | The agent's instructions (prompt-mode agents only; null for Flow Builder agents). |
configuration.greeting | object | How the conversation opens. |
configuration.greeting.mode | string | agent_first (the agent speaks first) or human_first (it waits for the person). Default: agent_first. |
configuration.greeting.message | string | null | The greeting, or null. |
configuration.language | string | null | Conversation language, for example pt-PT. |
configuration.personality | string | null | Personality and tone. |
configuration.objections | string | null | How to handle objections. |
configuration.knowledge_notes | string | null | Knowledge notes written on the agent. |
configuration.knowledge_base_ids | array | Assigned knowledge bases. |
has_unpublished_changes | boolean | true when the draft differs from the published version. Default: false. |
{
"id": "5c2e8a14-7d3b-4f9e-a1c6-0b8d2f4e6a93",
"name": "Exemplo",
"slug": "recepcao",
"description": "CRM — produção",
"status": "draft",
"agent_type": "inbound",
"editing_mode": "prompt",
"version": 3,
"phone_number": "+244900000000",
"public_channel_enabled": false,
"created_at": "2026-10-25T18:40:00Z",
"updated_at": "2026-10-25T18:40:00Z",
"configuration": {
"prompt": "…",
"greeting": {
"mode": "agent_first",
"message": "…"
},
"language": "…",
"personality": "…",
"objections": "…",
"knowledge_notes": "…",
"knowledge_base_ids": [
"…"
]
},
"has_unpublished_changes": false
}
Errors
| Code | When |
|---|---|
404 | Agente não encontrado. — the agent does not exist in this organization. |
Errors common to every endpoint (401, 403, 422, 429 and 5xx) are in Errors.

