curl -X POST https://api.60db.ai/agents/campaigns/CAMPAIGN_ID/recipients/preview \
-H "Authorization: Bearer your-api-key" \
-H "Content-Type: application/json" \
-d '{ "recipients": [{ "phone": "+919876543210" }, { "phone": "n/a" }] }'
Agent Campaigns
Preview Campaign Add
See what adding recipients to a campaign would do. Nothing is stored
POST
/
agents
/
campaigns
/
{campaignId}
/
recipients
/
preview
curl -X POST https://api.60db.ai/agents/campaigns/CAMPAIGN_ID/recipients/preview \
-H "Authorization: Bearer your-api-key" \
-H "Content-Type: application/json" \
-d '{ "recipients": [{ "phone": "+919876543210" }, { "phone": "n/a" }] }'
Check a CSV or a JSON list against an existing campaign before you add it. Nothing is stored and no call is placed.
The fields mean the same as in Add campaign recipients, plus:
Request
The same headers (withoutIdempotency-Key), path and body as Add campaign recipients: exactly one of csv_text or recipients.
Response
200 OK{
"success": true,
"data": {
"added": 2,
"already_in_campaign": 1,
"dnc": 1,
"invalid_count": 1,
"invalid": [{ "row": 5, "value": "n/a", "reason": "invalid_number" }],
"duplicates": 0,
"reopens": false
}
}
| Field | Meaning |
|---|---|
reopens | true when the campaign is completed and adding these people would restart it, because at least one number is new |
Errors
The same as Add campaign recipients, exceptIDEMPOTENCY_CONFLICT. The limit is 30 checks a minute.
Example
curl -X POST https://api.60db.ai/agents/campaigns/CAMPAIGN_ID/recipients/preview \
-H "Authorization: Bearer your-api-key" \
-H "Content-Type: application/json" \
-d '{ "recipients": [{ "phone": "+919876543210" }, { "phone": "n/a" }] }'