Skip to main content
POST
/
v1
/
campaigns
/
{id}
/
contacts
Add contacts to a campaign
curl --request POST \
  --url https://api.osvi.ai/v1/campaigns/{id}/contacts \
  --header 'API-Token: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "agent_uuid": "agent_IsZ3Q6Sf_60Eh26XQMGbz-R_og",
  "contacts": [
    {
      "person_name": "Ravi Kumar",
      "phone": "9876543210",
      "plan": "Pro"
    },
    {
      "person_name": "Anita Desai",
      "phone": "+919876500000"
    }
  ],
  "enqueue": true
}
'
{
  "success": true,
  "data": {
    "campaign_upload_id": 19,
    "contacts_received": 2,
    "contacts_accepted": 2,
    "duplicates_removed": 0,
    "enqueued": true,
    "queued_calls": 2,
    "dnd_skipped": [
      {}
    ]
  }
}

Authorizations

API-Token
string
header
required

16-character API token associated with your OSVI account. Find it in your dashboard under Settings → API.

Path Parameters

id
integer
required

The campaign's numeric id.

Body

application/json
agent_uuid
string
required

The agent that will place the calls.

Example:

"agent_IsZ3Q6Sf_60Eh26XQMGbz-R_og"

contacts
object[]
required

Up to 10,000 contacts per request. Split larger imports across multiple requests.

enqueue
boolean
default:false

Release the contacts to the calling queue immediately.

Example:

false

Response

Contacts stored (and enqueued when requested).

success
boolean
Example:

true

data
object