Campaigns
List campaigns
Lists the organization's campaigns, newest first, with each one's indicators.
GET https://api.diska.ai/v1/campaigns
Scope: campaigns:read
Parameters
Query string
| Name | Type | Required | Description |
|---|---|---|---|
status | string | null | No | Only campaigns in this state. One of: draft, scheduled, running, paused, completed, cancelled. Up to 20 characters. |
limit | integer | No | How many per page. Between 1 and 100. Default: 50. |
offset | integer | No | How many to skip. Minimum 0. Default: 0. |
Examples
curl "https://api.diska.ai/v1/campaigns" \
-H "Authorization: Bearer $DISKA_API_KEY"
import os
import requests
response = requests.get(
"https://api.diska.ai/v1/campaigns",
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/campaigns', {
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/campaigns');
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/campaignsStarts with dsk_. It stays in this browser tab only.
query
query
query
Enter an API key (dsk_…).
Response 200
| Field | Type | Description |
|---|---|---|
items | array | The campaigns. |
items[].id | string | Campaign ID. |
items[].name | string | Name. |
items[].status | string | draft, scheduled, running, paused, completed or cancelled. |
items[].agent_id | string | null | Agent. |
items[].agent_name | string | null | Agent name. |
items[].phone_number_id | string | null | Line used. |
items[].phone_number | string | null | Line number. |
items[].schedule | object | Schedule. |
items[].schedule.start_at | string | null | Start (ISO 8601 with time zone), or null to begin when started. |
items[].schedule.timezone | string | Time zone of the windows. Default: Africa/Luanda. |
items[].schedule.windows | array | Windows per weekday. With no windows, it dials within contact hours. |
items[].schedule.max_duration_days | integer | Days the campaign may last; at the end, what is left is cancelled. Between 1 and 90. Default: 7. |
items[].limits | object | Limits. |
items[].limits.max_concurrency | integer | Simultaneous calls of the campaign. Between 1 and 50. Default: 2. |
items[].limits.reserved_capacity | integer | Organization concurrent calls kept free for other calls. Between 0 and 50. Default: 1. |
items[].limits.max_attempts | integer | Attempts per recipient; only unanswered or busy calls are retried. Between 1 and 3. Default: 1. |
items[].limits.retry_delay_minutes | integer | Minutes between attempts. Between 15 and 1440. Default: 60. |
items[].limits.budget_minutes | integer | null | Maximum minutes; the campaign pauses before exceeding them. Between 1 and 100000. |
items[].pause_reason | string | null | Why it is paused: manual, budget_exhausted, quota_exhausted or emergency_stop. |
items[].waiting_reason | string | null | Why it is not dialling right now, for example outside_window or no_capacity. One of: outside_window, not_started, no_capacity, capacity_not_configured, line_unavailable, outbound_disabled, agent_unavailable, number_unavailable, halted. |
items[].next_window_at | string | null | When the next window opens. |
items[].deadline_at | string | null | End of the maximum duration. |
items[].created_at | string | null | Creation date (ISO 8601). |
items[].started_at | string | null | When it was started. |
items[].completed_at | string | null | When it finished. |
items[].cancelled_at | string | null | When it was cancelled. |
items[].stats | object | Indicators. |
items[].stats.total | integer | Recipients. Default: 0. |
items[].stats.pending | integer | Left to call. Default: 0. |
items[].stats.in_flight | integer | Dialling or in a call. Default: 0. |
items[].stats.completed | integer | Call placed (answered, not answered or busy). Default: 0. |
items[].stats.failed | integer | Could not be called. Default: 0. |
items[].stats.cancelled | integer | Cancelled. Default: 0. |
items[].stats.excluded | integer | On the do-not-call list. Default: 0. |
items[].stats.calls_started | integer | Attempts sent (each retry counts). Default: 0. |
items[].stats.answered | integer | Answered. Default: 0. |
items[].stats.no_answer | integer | Not answered. Default: 0. |
items[].stats.unavailable | integer | Busy or unavailable. Default: 0. |
items[].stats.answer_rate | number | null | Answered ÷ (answered + not answered + unavailable). |
items[].stats.total_duration_seconds | integer | Total duration of answered calls. Default: 0. |
items[].stats.progress | number | Recipients in a final state ÷ total. Default: 0. |
items[].stats.cost_kz | number | null | Cost in kwanzas, only when a rate is configured. |
items[].stats.with_post_call | integer | Calls with a post-call result. Default: 0. |
total | integer | Total campaigns. |
limit | integer | Page size. |
offset | integer | This page's offset. |
{
"items": [
{
"id": "5c2e8a14-7d3b-4f9e-a1c6-0b8d2f4e6a93",
"name": "Exemplo",
"status": "draft",
"agent_id": "3f1c2a7e-5b9d-4c1e-8f3a-2d6b7e9c1a40",
"agent_name": "Recepção",
"phone_number_id": "5c2e8a14-7d3b-4f9e-a1c6-0b8d2f4e6a93",
"phone_number": "+244900000000",
"schedule": {
"start_at": "2026-10-25T18:40:00Z",
"timezone": "Africa/Luanda",
"windows": [
{}
],
"max_duration_days": 7
},
"limits": {
"max_concurrency": 2,
"reserved_capacity": 1,
"max_attempts": 1,
"retry_delay_minutes": 60,
"budget_minutes": 0
},
"pause_reason": "manual",
"waiting_reason": "outside_window",
"next_window_at": "2026-10-25T18:40:00Z",
"deadline_at": "2026-10-25T18:40:00Z",
"created_at": "2026-10-25T18:40:00Z",
"started_at": "2026-10-25T18:40:00Z",
"completed_at": "2026-10-25T18:40:01Z",
"cancelled_at": "2026-10-25T18:40:00Z",
"stats": {
"total": 1,
"pending": 0,
"in_flight": 0,
"completed": 38,
"failed": 3,
"cancelled": 1,
"excluded": 0,
"calls_started": 0,
"answered": 0,
"no_answer": 0,
"unavailable": 0,
"answer_rate": 0,
"total_duration_seconds": 0,
"progress": 0,
"cost_kz": 0,
"with_post_call": 0
}
}
],
"total": 1,
"limit": 50,
"offset": 0
}
Errors
This endpoint has no errors of its own.
Errors common to every endpoint (401, 403, 422, 429 and 5xx) are in Errors.

