Remove leads from a campaign
Stops dialing these leads on this campaign, exactly as Remove does on the website, and answers one line per entry in the order sent. Lead lists and the leads themselves are untouched, and a later playlist sync, list re-attach or import can put a removed lead back. Needs the leads:write scope, and the Create campaigns permission with See campaigns set to Everyone's.
AuthorizationBearer <sk_live_...>Your API key in an Authorization header: Authorization: Bearer sk_live_.... When a request carries a Bearer key and an x-api-key header, the Bearer key is used.
campaignId*stringA campaign id from GET /campaigns. A campaign the key's holder can't reach, or an archived one, answers 404, the same as one that doesn't exist.
application/json- body
leads*array<|>The leads to take off the campaign, each named by id or by phone.
1 <= items <= 1000One line per entry, whatever each says. An entry that names nothing is its own not_found line, never a refusal of the whole call.
application/json- response
results*array<>One line per entry you sent, in the order you sent them.
curl -X POST 'https://www.inyoke.com/api/v1/campaigns/cmhd4q2nb0001s8a1x7k3p9vz/leads/remove' \ -H 'Content-Type: application/json' \ -d '{ "leads": [ { "id": "cmhe1b7yf0012lq09d4n8r3ua" }, { "phone": "(305) 555-0199" }, { "phone": "+15125550147" } ]}'{ "results": [ { "id": "cmhe1b7yf0012lq09d4n8r3ua", "outcome": "removed", "leadIds": [ "cmhe1b7yf0012lq09d4n8r3ua" ] }, { "phone": "(305) 555-0199", "outcome": "not_found" }, { "phone": "+15125550147", "outcome": "not_on_campaign", "leadIds": [ "cmhe1c2mq0014lq09v7x1d9sf" ] } ]}Check leads on a campaign GET
Says whether each lead is on the campaign and where it is in the dialing. Look leads up with ids or phones (up to 100 together, answered in one page), or page through the whole campaign with limit and cursor, but not both. Needs the leads:read scope, and every read counts toward your rate limits, so poll gently.
Ask for a place to upload a file POST
The first of three calls that put a CSV on a campaign: it answers with an uploadId to keep and a url to PUT the file to within the hour. Nothing is created until you start the import with that uploadId. Needs the leads:write scope and the Import leads permission.