Add a lead to a list
Adds one lead to an existing lead list and, when the list feeds a campaign, puts it on that campaign with the same duplicate rules and screening as a row of an uploaded file. Safe to retry once the first post has answered: a repeat finds the same lead, files nothing new, and its enrollment reads already_on. Needs the leads:write scope and the Import leads permission.
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.
listId*stringA list id from GET /lists.
application/json- body
One lead. Only phone is required. A key the lead doesn't take is refused by name, never dropped. Every value is text of at most 500 characters.
phone*stringThe lead's phone number, written any way. One that can't be dialed answers 422.
1 <= length <= 500name?stringThe full name. Or send firstName and lastName.
length <= 500firstName?stringlength <= 500lastName?stringlength <= 500email?stringlength <= 500notes?stringlength <= 500source?stringlength <= 500state?stringThe lead's state. An agency with the People module doesn't take state, zip, city or address yet: send them in fields under one of its own field keys.
length <= 500zip?stringlength <= 500city?stringlength <= 500address?stringlength <= 500fields?Anything else about the lead, under the agency's own field keys as the Fields page lists them. A key the agency doesn't have is refused by name, because the API makes no fields. Send numbers as text ("42").
properties <= 100The agency already had this lead (matched), or has already called this number (already_called).
application/json- response
result*stringcreated: a new lead was made and filed into the list (201). matched: the agency already had this lead, and it was filed into the list (200). already_called: the agency has already called this number, so it was dropped as a duplicate, nothing was filed or enrolled, and lead is null (200).
"created""matched""already_called"lead*|The lead, or null when result is already_called.
list*campaign*|The campaign the list feeds, or null when it feeds none.
enrollment*|How putting the lead on the campaign went, or null when there is no campaign or nothing was filed.
curl -X POST 'https://www.inyoke.com/api/v1/lists/cmhd4s1pw0006s8a1t9e3h7ud/leads' \ -H 'Content-Type: application/json' \ -d '{ "firstName": "Ana", "lastName": "Rivera", "phone": "(305) 555-0123", "email": "ana.rivera@example.com", "state": "FL", "source": "Web form"}'{ "result": "matched", "lead": { "id": "cmhe1b7yf0012lq09d4n8r3ua", "name": "Ana Rivera", "phone": "(305) 555-0123" }, "list": { "id": "cmhd4s1pw0006s8a1t9e3h7ud" }, "campaign": { "id": "cmhd4q2nb0001s8a1x7k3p9vz", "label": "Final expense Florida" }, "enrollment": { "state": "already_on", "onCampaign": "active", "dialState": "scheduled" }}List lead lists GET
The agency's lead lists, newest first, each with the campaign it feeds, so you can find the list id a single lead is posted into. A list that feeds a campaign the key's holder can't reach, or an archived campaign, is left out. Needs the leads:read scope.
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.