curl --request PATCH "https://prod-api.ringg.ai/ca/api/v0/campaign/terminate" \
--header "X-API-KEY: $RINGG_API_KEY" \
--header "Content-Type: application/json" \
--data '{ "campaign_id": "00000000-0000-4000-8000-000000000103" }'
{ "message": "Calls terminated successfully!" }
Terminate Calls by Campaign ID
Stop a campaign by cancelling all of its queued and retry calls with PATCH /campaign/terminate; its status changes to terminated and no new calls go out.
PATCH
/
campaign
/
terminate
curl --request PATCH "https://prod-api.ringg.ai/ca/api/v0/campaign/terminate" \
--header "X-API-KEY: $RINGG_API_KEY" \
--header "Content-Type: application/json" \
--data '{ "campaign_id": "00000000-0000-4000-8000-000000000103" }'
{ "message": "Calls terminated successfully!" }
string
required
Your Ringg AI API key.
string
required
The campaign’s ID:
id from Get all campaigns, which is also the list_id or bulk_list_id returned when the list was uploaded. Example: 00000000-0000-4000-8000-000000000103curl --request PATCH "https://prod-api.ringg.ai/ca/api/v0/campaign/terminate" \
--header "X-API-KEY: $RINGG_API_KEY" \
--header "Content-Type: application/json" \
--data '{ "campaign_id": "00000000-0000-4000-8000-000000000103" }'
{ "message": "Calls terminated successfully!" }
What happens
- Calls with status
registered(queued) orretryare cancelled (cancelled, sub-statusUSER_TERMINATED); calls in other campaigns are not affected. - A call already in progress is not hung up. It ends normally and is not retried afterwards.
- Completed calls are not affected.
- The campaign’s status becomes
terminated. - To call the remaining contacts later, create a new campaign.
Errors
200is returned even when no call matched the ID; check the calls in call history.401:X-API-KEYis missing or invalid.422: no field, more than one way of choosing calls at once, or a field of the wrong type.
Was this page helpful?