curl --request POST \
--url https://api.nuvia.ai/v1/campaigns/{campaignId}/enrollments/cancel \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"enrollment_id": "6650f1a2b3c4d5e6f7a8b9c6"
}
'Cancel a contact's enrollment in the campaign
Identify the enrollment by enrollment_id or by the contact (contact_id), exactly one of the two; both or neither return 400. An ACTIVE or WAITING_CONNECTION enrollment becomes COMPLETED with completion_reason: CANCELLED_BY_API, the sends still scheduled are removed from the queue, and the response has cancelled: true with the previous_status. A send that’s already in progress at the time of the cancellation can still go out. Cancelling doesn’t complete the campaign, even if no pending enrollment is left. An enrollment that already ended (for any reason) returns 200 with cancelled: false and reason: already_completed, without changing anything. An enrollment or contact outside this campaign of the company returns 404 (CAMPAIGN_ENROLLMENT_NOT_FOUND). Requires the campaign-enrollments:update scope on the API key.
curl --request POST \
--url https://api.nuvia.ai/v1/campaigns/{campaignId}/enrollments/cancel \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"enrollment_id": "6650f1a2b3c4d5e6f7a8b9c6"
}
'Headers
Body
Response
{ cancelled: true, enrollment_id, previous_status } or { cancelled: false, reason: "already_completed" }