Skip to content

Campaigns

Campaigns let you orchestrate batches of outbound calls. Create a campaign, upload contacts, and dispatch — Rymi handles the Plivo dialing, DNC filtering, and status tracking.

Create Campaign

http
POST /campaigns
FieldTypeRequiredDescription
agent_idstringAgent persona to use for calls
namestringHuman-readable campaign name
call_from_numberstringPurchased Rymi number to dial from

Response 201

json
{ "status": "created", "campaign_id": "cmp_550e8400-..." }

List Campaigns

http
GET /campaigns

Get Campaign

http
GET /campaigns/:id

Update Campaign

http
PUT /campaigns/:id

Delete Campaign

http
DELETE /campaigns/:id

Campaign Contacts

Upload Contacts

Bulk upload contacts to a campaign. Each contact can include custom variables that the agent can reference during the call.

http
POST /campaigns/:id/contacts
bash
curl -X POST https://api.rymi.ai/v1/campaigns/cmp_123/contacts \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "contacts": [
      { "phone_number": "15559990001", "variables": { "name": "Alice", "plan": "Gold" } },
      { "phone_number": "15559990002", "variables": { "name": "Bob", "plan": "Silver" } }
    ]
  }'

Response 201

json
{ "status": "success", "inserted_count": 2 }

List Contacts

http
GET /campaigns/:id/contacts

Campaign Lifecycle

Start Campaign

Dispatches calls to all pending contacts. Contacts on the DNC list are automatically skipped and marked as skipped_dnc.

http
POST /campaigns/:id/start

Response 200

json
{
  "message": "Campaign Dispatched Successfully",
  "contacts_dialed": 48,
  "contacts_skipped_dnc": 2
}

Pause Campaign

http
POST /campaigns/:id/pause

Response 200

json
{ "status": "paused", "id": "cmp_123" }

Resume Campaign

http
POST /campaigns/:id/resume

Response 200

json
{ "status": "running", "id": "cmp_123" }

Campaign Status Flow

draft → running → completed

           paused

Contact Status Flow

pending → dialed → completed
                 → failed
       → skipped_dnc

Built for developers who build voice.