Skip to main content
POST
/
api
/
v1
/
batch
Create a New Call Batch (Campaign)
curl --request POST \
  --url https://sa.dialgen.ai/api/v1/batch \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "agentId": "agent_clx123abc...",
  "userId": "user_clx456def...",
  "contacts": [
    {
      "id": "contact_clx789xyz...",
      "phoneNumber": "+15551234567",
      "name": "Jane Doe",
      "email": "jane@example.com",
      "company": "Acme Corp",
      "metadata": {
        "lead_score": 80
      }
    },
    {
      "phoneNumber": "+15557654321",
      "name": "John Smith",
      "email": "john@example.com",
      "company": null,
      "metadata": {
        "account_id": "A123"
      }
    }
  ],
  "options": {
    "priority": 5,
    "scheduledStartTime": "2025-11-16T09:00:00.000Z",
    "timezone": "UTC",
    "maxCallsPerSecond": 10,
    "retryStrategy": {
      "maxAttempts": 3,
      "noAnswerDelay": 3600000,
      "busyDelay": 300000
    },
    "webhooks": {
      "onCallComplete": "https://api.your-crm.com/webhook/dialgen/call-complete"
    },
    "tags": [
      "Q4_campaign",
      "high_priority"
    ]
  }
}
'
{
  "success": true,
  "batchId": "batch_1678886400_agent_clx123...",
  "status": "ingesting",
  "message": "Batch accepted and is being processed. Monitor the status link for updates.",
  "links": {
    "status": "https://sa.dialgen.ai/api/v1/batch/batch_1678886400_agent_clx123.../status",
    "dashboard": "https://sa.dialgen.ai/batch/monitor/batch_1678886400_agent_clx123..."
  }
}

Authorizations

Authorization
string
header
required

Bearer token authentication. Obtain your API key from the Dialgen API Keys dashboard at https://sa.dialgen.ai/api-keys

Body

application/json
agentId
string
required

The agent ID to use for the entire batch

userId
string
required

The user ID owning the agent

contacts
object[]
required
Required array length: 1 - 100000 elements
options
object

Response

Batch accepted and is being processed

success
boolean
batchId
string
status
enum<string>
Available options:
ingesting,
scheduled,
pending,
processing,
completed
message
string