ArgorantDocs

Remove many people

posthttps://app.argorant.com/api/v1/campaigns/{campaign_id}/leads/remove
POST
/api/v1/campaigns/{campaign_id}/leads/remove

One or more lead statuses, from pending, queued, active, sent, replied, bounced, unsubscribed, failed or completed.

true for only the people who replied, false for only the ones who did not.

true for only the bounced addresses, false for only the others.

Email domains of the people.

A tag the people carry.

Ids from GET .../leads.

The people's addresses.

Everyone of this saved list.

Also stop people who already got an email and wait for a follow-up.

true only counts and changes nothing.

Takes many people out of a campaign, chosen by status, replied, bounced, email domain, tag, ids, addresses or a saved list. Send preview: true first to see how many would go. People who already got an email stay unless you send include_contacted: true; their sent emails and replies stay in the numbers. A large removal runs in the background and answers 202 with a job to follow at its status_url.

CostWhat it doesKey scopes
FreeWritesargorant:manage_lists

Authorization

BearerAuth
AuthorizationBearer <token>

Your API key from app.argorant.com/profile, sent as Authorization: Bearer <key>. A connector sign-in token (ag_mcp_...) works the same way.

In: header

Path Parameters

campaign_id*string

The campaign id from create or list.

Formatuuid

Header Parameters

Idempotency-Key?string

Any unique text up to 128 characters. A retry with the same key and the same body within 24 hours returns the first answer (with the header Idempotent-Replayed: true) instead of doing the work twice. The same key with another body answers 409 idempotency_conflict.

Lengthlength <= 128
X-Request-Id?string

Your own id for this request, 8 to 64 letters, digits, dot, dash or underscore. Returned as X-Request-Id; one is made for you when you send none.

Match^[A-Za-z0-9._-]{8,64}$

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

application/json

Shell
curl -X POST "https://app.argorant.com/api/v1/campaigns/7f3a2c1e-9b4d-4e8a-a1c2-5d6e7f8a9b0c/leads/remove" \  -H "Idempotency-Key: 6f1c2e7a-run-42" \  -H "Content-Type: application/json" \  -d '{    "replied": false,    "status": [      "queued",      "pending"    ],    "preview": true  }'
JSON
{  "matched": 412,  "would_remove": 380,  "never_emailed": 380,  "already_emailed_still_in_sequence": 32,  "already_emailed_finished": 0,  "kept_because_already_emailed": 32,  "include_contacted": false,  "preview": true,  "removed": 0,  "summary": "380 people would be taken out of the campaign. 32 who already got an email stay, because they were not asked for (include_contacted=true takes out the ones still waiting for a follow-up). Nothing was changed yet."}