curl -X POST "https://app.talkover.ai/api/v1/campaigns/campaign-uuid/clear" \
-H "Authorization: Bearer talq_your_environment_token_here" \
-H "Content-Type: application/json" \
-d '{
"delete_calls": true,
"delete_statuses": ["pending", "queued", "processing", "awaiting_report", "completed", "failed", "canceled", "paused", "terminated"]
}'
{
"success": true,
"data": {
"files_cleared": 1,
"files_failed": 0,
"completed_calls": 15204,
"terminated_calls": 3138,
"leftover_calls_deleted": 0,
"sftp_export_queued": false
},
"message": "Campaign cleared. 1 files cleared, 15204 completed, 3138 terminated."
}
Calls & Campaigns
Clear campaign
End every contact list of a campaign without deleting the campaign
POST
/
api
/
v1
/
campaigns
/
{campaign_id}
/
clear
curl -X POST "https://app.talkover.ai/api/v1/campaigns/campaign-uuid/clear" \
-H "Authorization: Bearer talq_your_environment_token_here" \
-H "Content-Type: application/json" \
-d '{
"delete_calls": true,
"delete_statuses": ["pending", "queued", "processing", "awaiting_report", "completed", "failed", "canceled", "paused", "terminated"]
}'
{
"success": true,
"data": {
"files_cleared": 1,
"files_failed": 0,
"completed_calls": 15204,
"terminated_calls": 3138,
"leftover_calls_deleted": 0,
"sftp_export_queued": false
},
"message": "Campaign cleared. 1 files cleared, 15204 completed, 3138 terminated."
}
Clear campaign
Ends every active contact list of the campaign and, optionally, removes its calls — the same as Clear campaign in the dashboard. The campaign itself, its settings and its call history stay.Endpoint
POST /api/v1/campaigns/{campaign_id}/clear
Path parameters
string
required
Campaign UUID.
Request headers
string
required
Bearer token. Format:
Bearer talq_your_environment_token_hereRequest body
boolean
default:"true"
When the campaign has SFTP export configured, export the results before removing the calls.
boolean
default:"false"
Remove the calls whose status is in
delete_statuses. Without it, unfinished calls are only stopped.string[]
default:"[]"
Statuses to remove when
delete_calls is true: pending, queued, processing, awaiting_report, completed, failed, canceled, paused, terminated.An empty
delete_statuses removes nothing. To remove the calls of every status, send every status in the list.What clearing does
- Every unfinished call (pending, paused, processing) is stopped, so nothing in the old lists is dialed again. Finished calls are kept.
- With
delete_calls, calls in the chosen statuses leave the campaign. They are hidden, not destroyed: recordings, transcripts and billing stay. - Removed numbers can be imported again right away. This also drops their cooldown: a number that completed a call can be called again by the next list.
- The response comes back when the lists are ended. Only the SFTP export, when configured, runs afterwards.
Examples
curl -X POST "https://app.talkover.ai/api/v1/campaigns/campaign-uuid/clear" \
-H "Authorization: Bearer talq_your_environment_token_here" \
-H "Content-Type: application/json" \
-d '{
"delete_calls": true,
"delete_statuses": ["pending", "queued", "processing", "awaiting_report", "completed", "failed", "canceled", "paused", "terminated"]
}'
Response
{
"success": true,
"data": {
"files_cleared": 1,
"files_failed": 0,
"completed_calls": 15204,
"terminated_calls": 3138,
"leftover_calls_deleted": 0,
"sftp_export_queued": false
},
"message": "Campaign cleared. 1 files cleared, 15204 completed, 3138 terminated."
}
Error responses
500 — Partially cleared
At least one list could not be ended (files_failed > 0) and is still active. Do not upload the next list yet: send the clear again — it only touches the lists that are still active.
{
"success": false,
"data": { "files_cleared": 2, "files_failed": 1, "completed_calls": 9120, "terminated_calls": 410, "leftover_calls_deleted": 0, "sftp_export_queued": false },
"message": "Campaign partially cleared: 1 list(s) failed. Retry the clear before uploading."
}
404 — Campaign not found
The campaign does not exist or belongs to another environment.Daily cycle
To replace a campaign’s mailing every day by script:- Clear:
POST /campaigns/{campaign_id}/clear. On500, retry until it returns200. - Upload:
POST /campaigns/{campaign_id}/fileswith the new CSV. On422, fix the file — nothing was imported. - Follow:
GET /campaigns/{campaign_id}/files/{file_data_id}/progressevery few seconds untilcompletedorfailed.
Was this page helpful?