Skip to main content
POST
/
api
/
v1
/
campaign
/
create
Create Campaign
curl --request POST \
  --url https://app.dograh.com/api/v1/campaign/create \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "workflow_id": 123,
  "source_type": "<string>",
  "source_id": "<string>",
  "retry_config": {
    "enabled": true,
    "max_retries": 2,
    "retry_delay_seconds": 120,
    "retry_on_busy": true,
    "retry_on_no_answer": true,
    "retry_on_voicemail": true
  },
  "max_concurrency": 50,
  "schedule_config": {
    "slots": [
      {
        "day_of_week": 3,
        "start_time": "<string>",
        "end_time": "<string>"
      }
    ],
    "enabled": true,
    "timezone": "UTC"
  },
  "circuit_breaker": {
    "enabled": true,
    "failure_threshold": 0.5,
    "window_seconds": 120,
    "min_calls_in_window": 5
  }
}
'
{
  "id": 123,
  "name": "<string>",
  "workflow_id": 123,
  "workflow_name": "<string>",
  "state": "<string>",
  "source_type": "<string>",
  "source_id": "<string>",
  "total_rows": 123,
  "processed_rows": 123,
  "failed_rows": 123,
  "created_at": "2023-11-07T05:31:56Z",
  "started_at": "2023-11-07T05:31:56Z",
  "completed_at": "2023-11-07T05:31:56Z",
  "retry_config": {
    "enabled": true,
    "max_retries": 123,
    "retry_delay_seconds": 123,
    "retry_on_busy": true,
    "retry_on_no_answer": true,
    "retry_on_voicemail": true
  },
  "max_concurrency": 123,
  "schedule_config": {
    "enabled": true,
    "timezone": "<string>",
    "slots": [
      {
        "day_of_week": 123,
        "start_time": "<string>",
        "end_time": "<string>"
      }
    ]
  },
  "circuit_breaker": {
    "enabled": false,
    "failure_threshold": 0.5,
    "window_seconds": 120,
    "min_calls_in_window": 5
  }
}
Before creating a campaign, upload your contacts CSV to get a source_url. The time_slots field controls when Dograh is allowed to place calls. If omitted, calls can be placed at any time. The timezone field applies to all time slot windows.
{
  "time_slots": [
    { "day": "monday", "start": "09:00", "end": "17:00" },
    { "day": "tuesday", "start": "09:00", "end": "17:00" }
  ]
}
Once created, the campaign is in draft status. Call Start to begin dialing.

Headers

authorization
string | null
X-API-Key
string | null

Body

application/json
name
string
required
Required string length: 1 - 255
workflow_id
integer
required
source_type
string
required
Pattern: ^(google-sheet|csv)$
source_id
string
required
retry_config
RetryConfigRequest · object
max_concurrency
integer | null
Required range: 1 <= x <= 100
schedule_config
ScheduleConfigRequest · object
circuit_breaker
CircuitBreakerConfigRequest · object

Response

Successful Response

id
integer
required
name
string
required
workflow_id
integer
required
workflow_name
string
required
state
string
required
source_type
string
required
source_id
string
required
total_rows
integer | null
required
processed_rows
integer
required
failed_rows
integer
required
created_at
string<date-time>
required
started_at
string<date-time> | null
required
completed_at
string<date-time> | null
required
retry_config
RetryConfigResponse · object
required
max_concurrency
integer | null
schedule_config
ScheduleConfigResponse · object
circuit_breaker
CircuitBreakerConfigResponse · object