Skip to Content
Alienmail Docs
Leads

Remove leads

DELETE
/campaigns/{id}/leads

Removes up to 500 leads from a campaign by email. Their waiting emails are cancelled. The emails the campaign already sent them stay in its statistics, and the people stay in your workspace's leads.

Emails that are not leads of the campaign are counted in notInCampaign, so the call is safe to repeat. An archived campaign returns 409.

Requires the LEAD_CAMPAIGN_ENROLL permission.

Authorization

apiKey
headerAuthorizationBearer <token>

An API key of your workspace, from Workspace settings, Integrations. Each key has a role, and the role decides which endpoints it may call.

Path Parameters

id*integer

The campaign id: the number in the campaign URL in Alienmail, or id from the campaign list. An id that is not a campaign of your workspace returns 404.

Request Body

application/json
  1. body
emails*array<string>

1 to 500 email addresses to remove from the campaign.

Items1 <= items <= 500

Response Body

What happened to the emails in the request.

application/json
  1. response
received*integer

Emails in the request.

removed*integer

Leads removed from the campaign.

notInCampaign*integer

Emails that were not leads of the campaign.

invalid*array<>

Entries that are not email addresses.

Example Request
curl -X DELETE 'https://app.alienmail.io/api/v1/campaigns/42/leads' \  -H 'Content-Type: application/json' \  -d '{  "emails": [    "ada@example.com",    "grace@example.com"  ]}'
Example Response
{  "received": 2,  "removed": 1,  "notInCampaign": 1,  "invalid": []}