Diska
Campaigns

Create a campaign

Creates the campaign as a draft (draft).
POST https://api.diska.ai/v1/campaigns

Scope: campaigns:write

The agent must be outbound and published, and phone_number_id an active DISKA line of the organization (see List phone numbers). Windows must sit within contact hours (08:00–20:00). Then add recipients and start it. Send Idempotency-Key to retry the request without creating two.

Request body

application/json

FieldTypeRequiredDescription
namestringYesCampaign name. Up to 120 characters.
agent_idstringYesPublished outbound agent that places the calls.
phone_number_idstringYesDISKA line to call from (from GET /v1/phone-numbers).
scheduleobjectNoWhen the campaign may dial.
schedule.start_atstring | nullNoStart (ISO 8601 with time zone), or null to begin when started.
schedule.timezonestringNoTime zone of the windows. Default: Africa/Luanda.
schedule.windowsarrayNoWindows per weekday. With no windows, it dials within contact hours.
schedule.windows[].daystringYesWeekday, in English. One of: monday, tuesday, wednesday, thursday, friday, saturday, sunday.
schedule.windows[].startstringYesStart, HH:MM.
schedule.windows[].endstringYesEnd, HH:MM.
schedule.max_duration_daysintegerNoDays the campaign may last; at the end, what is left is cancelled. Between 1 and 90. Default: 7.
limitsobjectNoConcurrency, attempts and budget.
limits.max_concurrencyintegerNoSimultaneous calls of the campaign. Between 1 and 50. Default: 2.
limits.reserved_capacityintegerNoOrganization concurrent calls kept free for other calls. Between 0 and 50. Default: 1.
limits.max_attemptsintegerNoAttempts per recipient; only unanswered or busy calls are retried. Between 1 and 3. Default: 1.
limits.retry_delay_minutesintegerNoMinutes between attempts. Between 15 and 1440. Default: 60.
limits.budget_minutesinteger | nullNoMaximum minutes; the campaign pauses before exceeding them. Between 1 and 100000.
{
  "name": "Lembretes de Novembro",
  "agent_id": "3f1c2a7e-5b9d-4c1e-8f3a-2d6b7e9c1a40",
  "phone_number_id": "5c2e8a14-7d3b-4f9e-a1c6-0b8d2f4e6a93",
  "schedule": {
    "timezone": "Africa/Luanda",
    "windows": [
      {
        "day": "monday",
        "start": "09:00",
        "end": "12:00"
      },
      {
        "day": "monday",
        "start": "14:00",
        "end": "18:00"
      }
    ]
  },
  "limits": {
    "max_concurrency": 2,
    "max_attempts": 2,
    "retry_delay_minutes": 60
  }
}

Examples

curl -X POST "https://api.diska.ai/v1/campaigns" \
  -H "Authorization: Bearer $DISKA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Lembretes de Novembro","agent_id":"3f1c2a7e-5b9d-4c1e-8f3a-2d6b7e9c1a40","phone_number_id":"5c2e8a14-7d3b-4f9e-a1c6-0b8d2f4e6a93","schedule":{"timezone":"Africa/Luanda","windows":[{"day":"monday","start":"09:00","end":"12:00"},{"day":"monday","start":"14:00","end":"18:00"}]},"limits":{"max_concurrency":2,"max_attempts":2,"retry_delay_minutes":60}}'

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.

POSThttps://api.diska.ai/v1/campaigns
Starts with dsk_. It stays in this browser tab only.
Enter an API key (dsk_…).

Response 201

FieldTypeDescription
idstringCampaign ID.
namestringName.
statusstringdraft, scheduled, running, paused, completed or cancelled.
agent_idstring | nullAgent.
agent_namestring | nullAgent name.
phone_number_idstring | nullLine used.
phone_numberstring | nullLine number.
scheduleobjectSchedule.
schedule.start_atstring | nullStart (ISO 8601 with time zone), or null to begin when started.
schedule.timezonestringTime zone of the windows. Default: Africa/Luanda.
schedule.windowsarrayWindows per weekday. With no windows, it dials within contact hours.
schedule.windows[].daystringWeekday, in English. One of: monday, tuesday, wednesday, thursday, friday, saturday, sunday.
schedule.windows[].startstringStart, HH:MM.
schedule.windows[].endstringEnd, HH:MM.
schedule.max_duration_daysintegerDays the campaign may last; at the end, what is left is cancelled. Between 1 and 90. Default: 7.
limitsobjectLimits.
limits.max_concurrencyintegerSimultaneous calls of the campaign. Between 1 and 50. Default: 2.
limits.reserved_capacityintegerOrganization concurrent calls kept free for other calls. Between 0 and 50. Default: 1.
limits.max_attemptsintegerAttempts per recipient; only unanswered or busy calls are retried. Between 1 and 3. Default: 1.
limits.retry_delay_minutesintegerMinutes between attempts. Between 15 and 1440. Default: 60.
limits.budget_minutesinteger | nullMaximum minutes; the campaign pauses before exceeding them. Between 1 and 100000.
pause_reasonstring | nullWhy it is paused: manual, budget_exhausted, quota_exhausted or emergency_stop.
waiting_reasonstring | nullWhy 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.
next_window_atstring | nullWhen the next window opens.
deadline_atstring | nullEnd of the maximum duration.
created_atstring | nullCreation date (ISO 8601).
started_atstring | nullWhen it was started.
completed_atstring | nullWhen it finished.
cancelled_atstring | nullWhen it was cancelled.
statsobjectIndicators.
stats.totalintegerRecipients. Default: 0.
stats.pendingintegerLeft to call. Default: 0.
stats.in_flightintegerDialling or in a call. Default: 0.
stats.completedintegerCall placed (answered, not answered or busy). Default: 0.
stats.failedintegerCould not be called. Default: 0.
stats.cancelledintegerCancelled. Default: 0.
stats.excludedintegerOn the do-not-call list. Default: 0.
stats.calls_startedintegerAttempts sent (each retry counts). Default: 0.
stats.answeredintegerAnswered. Default: 0.
stats.no_answerintegerNot answered. Default: 0.
stats.unavailableintegerBusy or unavailable. Default: 0.
stats.answer_ratenumber | nullAnswered ÷ (answered + not answered + unavailable).
stats.total_duration_secondsintegerTotal duration of answered calls. Default: 0.
stats.progressnumberRecipients in a final state ÷ total. Default: 0.
stats.cost_kznumber | nullCost in kwanzas, only when a rate is configured.
stats.with_post_callintegerCalls with a post-call result. Default: 0.
{
  "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": [
      {
        "day": "monday",
        "start": "2026-10-25T18:40:00Z",
        "end": "2026-11-01T18:40:00Z"
      }
    ],
    "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
  }
}

Errors

CodeWhen
403Campaigns or API calls are not switched on for the organization.
404The agent or the number does not exist in the organization.
409The agent is not outbound or not published, or the number is not an active DISKA line.
422Windows outside contact hours, an unknown time zone or limits out of range.

Errors common to every endpoint (401, 403, 422, 429 and 5xx) are in Errors.

Copyright © 2026