InyokeDocs
Leads

Check leads on a campaign

GET
/campaigns/{campaignId}/leads

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.

Authorization

headerAuthorizationBearer <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.

Path Parameters

campaignId*string

A 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.

Query Parameters

ids?array<>

Lead ids to look up, separated by commas. Blanks and repeats are dropped. A lead that was never on the campaign reads not_enrolled, and one outside the key holder's reach reads not_found, the same as one that doesn't exist.

phones?array<>

Phone numbers to look up, separated by commas, written any way. Send a + as %2B. A number is matched against each lead's main and other numbers, among the leads that have been on this campaign, and every lead that carries it is listed.

limit?integer

How many rows a page holds, from 1 to 200.

Range1 <= value <= 200
Default50
cursor?string

The nextCursor of the previous page. Leave it out, or send it empty, for the first page. A cursor whose row has gone since answers 422 with reason stale_cursor: start again without one.

Lengthlength <= 200

Response Body

A lookup answers one row per lead found, in the order asked (ids first, then phones, and a lead named twice once), and a not_found row for each id or phone that found none, with nextCursor null. A page lists the campaign's leads in id order, leaving out leads outside the key holder's reach.

application/json
  1. response
data*array<|>
nextCursor*|

Send this as cursor for the next page. Always null for a lookup.

Example Request
curl -X GET 'https://www.inyoke.com/api/v1/campaigns/cmhd4q2nb0001s8a1x7k3p9vz/leads?ids=cmhe1b7yf0012lq09d4n8r3ua&phones=%2B13055550199'
Example Response
{  "data": [    {      "id": "cmhe1b7yf0012lq09d4n8r3ua",      "name": "Ana Rivera",      "phone": "(305) 555-0123",      "onCampaign": "active",      "enrollment": {        "dialState": "scheduled",        "blockReason": null,        "attempts": 2,        "lastCalledAt": "2026-10-30T13:12:44.000Z",        "lastResult": "NO_ANSWER",        "nextRetryAt": "2026-10-30T17:12:44.000Z"      }    },    {      "phone": "+13055550199",      "onCampaign": "not_found"    }  ],  "nextCursor": null}