Skip to main content
POST
/
campaigns
curl -X POST https://api.thinnest.ai/campaigns \
  -H "Authorization: Bearer $THINNESTAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "Follow-up Campaign",
  "agent_id": "ag_c47e7c97_b2f2",
  "type": "voice",
  "contacts": [
    "+1234567890",
    "+0987654321"
  ],
  "message_template": "Hi {{name}}, this is a follow-up from our conversation about {{topic}}.",
  "schedule": "2026-03-10T09:00:00Z",
  "max_concurrent": 5
}'
{
  "id": "camp_a1b2c3d4",
  "name": "Follow-up Campaign",
  "status": "draft",
  "type": "voice",
  "agent_id": "ag_c47e7c97_b2f2",
  "total_contacts": 2,
  "completed": 0,
  "failed": 0,
  "scheduled_at": "2026-03-10T09:00:00Z",
  "created_at": "2026-03-07T14:00:00Z"
}
curl -X POST https://api.thinnest.ai/campaigns \
  -H "Authorization: Bearer $THINNESTAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "Follow-up Campaign",
  "agent_id": "ag_c47e7c97_b2f2",
  "type": "voice",
  "contacts": [
    "+1234567890",
    "+0987654321"
  ],
  "message_template": "Hi {{name}}, this is a follow-up from our conversation about {{topic}}.",
  "schedule": "2026-03-10T09:00:00Z",
  "max_concurrent": 5
}'

Request Body

name
string
required
Campaign display name
agent_id
string
required
Voice-enabled agent to use (ag_*)
type
string
required
Campaign type: voice, sms
contacts
array
required
List of phone numbers in E.164 format (+1234567890)
message_template
string
Message template with placeholders
schedule
string
default:"Immediate"
ISO 8601 datetime to start the campaign
max_concurrent
integer
default:"1"
Maximum concurrent calls/messages
from_number
string
default:"Default"
Outbound caller ID (must be verified)

Response 201

{
  "id": "camp_a1b2c3d4",
  "name": "Follow-up Campaign",
  "status": "draft",
  "type": "voice",
  "agent_id": "ag_c47e7c97_b2f2",
  "total_contacts": 2,
  "completed": 0,
  "failed": 0,
  "scheduled_at": "2026-03-10T09:00:00Z",
  "created_at": "2026-03-07T14:00:00Z"
}

Campaign Lifecycle

draft → launched → running → completed

                paused
Use Launch, Pause, and Resume to control execution.

Errors

CodeDescription
401Missing or invalid authentication
402Insufficient balance for campaign
404Agent not found
422Invalid contacts or configuration

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Request to create a new campaign.

name
string
required
Maximum string length: 200
agent_id
required
description
string | null
channel
string
default:voice
template_id
integer | null
contact_group_ids
integer[]
config
CampaignConfig · object

Campaign configuration options.

scheduled_at
string<date-time> | null
timezone
string
default:Asia/Kolkata
status
string | null

Response

Successful Response