APICampaigns

Remove contacts or accounts from a campaign

Stops the campaign for the given contacts, or for every contact linked to the given accounts. Future-dated enrollments are cancelled; active ones are ended and their pending sends are skipped. Contacts that are not active in the campaign are ignored, so the call is safe to retry. Works on paused campaigns; not available for scheduled (newsletter) campaigns.

POST
/v1/campaigns/{id}/enrollments/remove

Stops the campaign for the given contacts, or for every contact linked to the given accounts. Future-dated enrollments are cancelled; active ones are ended and their pending sends are skipped. Contacts that are not active in the campaign are ignored, so the call is safe to retry. Works on paused campaigns; not available for scheduled (newsletter) campaigns.

X-Api-Key<token>

In: header

Path Parameters

id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/campaigns/497f6eca-6276-4993-bfeb-53cbbbba6f08/enrollments/remove" \  -H "Content-Type: application/json" \  -d '{}'
{
  "removed": 0,
  "contactIds": [
    "42c382fb-14d8-48d9-b3ff-0b7917436af9"
  ]
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}
{
  "error": "string"
}