InyokeDocs

Check and remove leads

See where each lead is in a campaign's dialing, and stop dialing leads you no longer want called.

Check leads on a campaign

Look leads up by ids or phones, comma separated, at most 100 together. Or leave both out and page through the whole campaign with limit and cursor.

curl -G "https://www.inyoke.com/api/v1/campaigns/$CAMPAIGN_ID/leads" \
  --data-urlencode "phones=+13055550123,+13055550199" \
  -H "Authorization: Bearer $API_KEY"
{
  "data": [
    {
      "id": "cm2x9k1ld0003",
      "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": "(305) 555-0199", "onCampaign": "not_found" }
  ],
  "nextCursor": null
}

A lookup answers one row per lead found, in the order you asked, and a not_found row for each id or phone that found none. A phone is matched however it's written, against the main and other numbers of leads that have been on this campaign. So a lead that was never on the campaign reads not_enrolled when you look it up by id, and not_found by phone.

onCampaign

Only an active lead is ever dialed.

ValueMeaning
activeIn the dialing pool.
pausedOn the campaign, but its lead list is switched off. It comes back as it was when the list does.
removedTaken off the campaign, by a person, by the API, or by a detached list.
not_enrolledNever on this campaign. enrollment is null.
not_foundNo lead you can see matches that id or phone. It reads the same as a lead that doesn't exist.

enrollment.dialState

ValueMeaning
waitingIn line to be dialed.
scheduledA retry that's resting. It can be dialed again at nextRetryAt.
in_progressA call is being placed, or is on.
finishedWorked to its end on this campaign.
blockedRefused for good by compliance, such as Do Not Call. blockReason says why.
heldParked until someone on the campaign is licensed for the lead's state.

attempts counts the dials on this campaign, and lastResult is the last call's result, such as NO_ANSWER or VOICEMAIL. Every read counts toward your limits, so poll gently.

Remove leads from a campaign

This is the website's Remove, for up to 1,000 leads at once. Each entry is { "id" } or { "phone" }.

curl -X POST "https://www.inyoke.com/api/v1/campaigns/$CAMPAIGN_ID/leads/remove" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"leads": [{"id": "cm2x9k1ld0003"}, {"phone": "(305) 555-0123"}]}'
{
  "results": [
    { "id": "cm2x9k1ld0003", "outcome": "removed", "leadIds": ["cm2x9k1ld0003"] },
    { "phone": "(305) 555-0123", "outcome": "not_found" }
  ]
}

One line comes back for each entry, in the order you sent them. A bad entry is its own line, never a refusal of the whole call. A phone can name several leads, and every lead on the campaign that carries it is removed.

outcomeMeaning
removedThe lead was dialable on this campaign and isn't any more. leadIds lists the leads taken off.
not_on_campaignNothing to stop: already removed, never on the campaign, or on a list that's switched off.
not_foundNo lead you can see matches that id or phone, or the phone isn't a number.

Needs a key with Read and write access, and the Create campaigns permission with See campaigns set to Everyone's.

A removed lead can come back

Removal touches only the campaign: lead lists, the lead itself, its history and its other campaigns stay as they are. A later playlist sync, list re-attach or import can put a removed lead back, so an automation that needs a lead to stay off should check its status, or remove it again.

Removal takes effect the next time the dialer picks leads. A call already ringing or connected finishes normally, and a lead picked an instant earlier can still get one call.

On this page