Send leads
Post leads to one of your ads, test a feed with a dry run, and send a post again safely.
Send leads
POST /api/vendor/v1/listings/{listingId}/leads
Send 1 to 500 leads to one of your ads. Each row is checked at once, and the answer says which were received.
Scope: leads:write. Status: 202. Try it in the API reference.
Request
| Field | In | Required | Description |
|---|---|---|---|
listingId | path | Yes | Your ad's id, from GET /listings. |
dryRun | query | No | 1 or true checks the post and writes nothing. Leave it out, or send 0 or false, for a real post. |
Idempotency-Key | header | No | Required on a real post, a new one for each post. A dry run needs none. |
scrubbedAt | body | Yes | The day, YYYY-MM-DD in UTC, you checked these rows against the National Do Not Call Registry. |
rows | body | Yes | 1 to 500 objects, each keyed by the same headers a file's columns take. |
Request body
{
"scrubbedAt": "2026-11-03",
"rows": [
{
"phone": "(305) 555-0123",
"state": "FL",
"first_name": "Ana",
"last_name": "Rivera",
"consent_at": "2026-11-01",
"consent_source": "Quote form",
"consent_url": "https://quotes.example.com/final-expense"
}
]
}Example
curl -X POST "https://www.inyoke.com/api/vendor/v1/listings/$LISTING_ID/leads" \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $IDEMPOTENCY_KEY" \
-d '{"scrubbedAt":"2026-11-03","rows":[{"phone":"(305) 555-0123","state":"FL","first_name":"Ana","last_name":"Rivera","consent_at":"2026-11-01","consent_source":"Quote form","consent_url":"https://quotes.example.com/final-expense"}]}'Response
{
"callId": "cm3p8k2ic0007",
"received": 0,
"refused": [
{
"index": 0,
"code": "phone_fictional",
"field": "phone",
"message": "This phone number can't be a real one."
}
]
}- Every row needs
phone,state,consent_at,consent_sourceandconsent_url, plus every field the ad declares.first_name,last_name,email,cityandzipare taken when they're there. - The answer is always
202with{ callId, received, refused }.refusedlists each row that wasn't taken, by its index inrows, with a code, the field and a sentence. - The answer never says whether a number went on sale. It is the same whatever happens to a row afterward.
- The example's number is one no one can hold, so its answer shows how a refused row reads. Your own rows are received.
callIdis null on a dry run, which writes nothing.
refused[].code:
| Code | Meaning |
|---|---|
phone_invalid | No valid US or Canadian phone number. |
phone_fictional | The phone number can't be a real one, such as a 555-0100 to 555-0199 number. |
state_invalid | No valid US state. |
consent_date_invalid | No valid consent date. |
consent_date_future | The consent date is in the future. |
consent_date_too_old | The consent date is older than the ad allows. |
ad_no_age_limit | The ad has no consent age limit, so it can't take leads. |
consent_source_missing | No consent source. |
consent_url_invalid | No valid consent URL. |
consent_url_not_allowed | The consent URL isn't on a website the ad lists. |
person_text | A first name, last name or city holds something a name or a place can't, such as a link or digits. |
zip_invalid | The zip isn't 5 or 9 digits. |
email_invalid | The email isn't a valid address. |
declared_field_missing | A field the ad declares is blank. |
row_not_an_object | The row isn't an object of fields. |
row_unstorable | The row holds a character that can't be stored, such as a null character or a broken one. |
over_allowance | The row is over your upload allowance for now. Send it again later. |
Refusals
| Status | Code | Reason | When |
|---|---|---|---|
422 | invalid | dryRun is something other than 1, true, 0 or false. | |
422 | invalid | A real post has no Idempotency-Key, or one that is blank, too long or not printable. | |
413 | invalid | The body is over 1 MB. | |
400 | invalid | The body isn't JSON. | |
422 | invalid | The body is JSON and doesn't fit the call. The message says what to fix, a key the call doesn't take included. | |
403 | forbidden | not_a_vendor | The key's account isn't a lead vendor's account. |
403 | forbidden | stopped | Your account is paused or suspended. Reads still work, and nothing can be sent until the platform lifts it. |
403 | forbidden | cant_post | Your account can't send anything right now. |
403 | forbidden | agreement_owed | The vendor agreement has changed. Sign the new version on the website, then send again. |
403 | forbidden | attestation_owed | The feed attestation has changed. Sign the new version on the website, then send again. |
404 | not_found | ad_not_found | That ad isn't on your account. Another vendor's ad reads the same as one that doesn't exist. |
422 | invalid | ad_retired | That ad is retired, so it can't take leads. |
422 | invalid | scrub_date | The scrub date is missing, in the future, or more than 31 days old. |
422 | invalid | row_count | A post holds 1 to 500 rows. |
409 | conflict | idempotency_key_reused | This Idempotency-Key was sent before with a different body, or to another ad. Make a new key for a new post. |
Dry runs
Add ?dryRun=1 to a post of leads to check it without sending anything. It answers as a real post would, row by row, and writes nothing: nothing goes in, nothing counts toward your allowance, and it needs no Idempotency-Key.
That is how to test your feed before you send real leads. A post without it is real.
dryRun takes 1 or true for a dry run, and 0 or false, or nothing at all, for a real post. Anything else is refused.
A dry run of the post above:
curl -X POST "https://www.inyoke.com/api/vendor/v1/listings/$LISTING_ID/leads?dryRun=1" \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{"scrubbedAt":"2026-11-03","rows":[{"phone":"(305) 555-0123","state":"FL","first_name":"Ana","last_name":"Rivera","consent_at":"2026-11-01","consent_source":"Quote form","consent_url":"https://quotes.example.com/final-expense"}]}'Sending a post again
A real post needs an Idempotency-Key header: 1 to 200 printable characters, and a new one for each post. A UUID will do.
Send the same key with the same body, byte for byte, to the same ad, and you get the first answer back, with nothing taken twice, even if the ad was retired since. So a post that timed out can be sent again safely.
Send the same key with a different body, or to another ad, and the answer is a 409 with the reason idempotency_key_reused. Make a new key for a new post.
An answer sent again lists at most the first 20 refused rows, and received is always exact. While the ad is live and the scrub date is under 31 days old, a dry run of the same body lists every row the format rules refuse today, but its over_allowance rows reflect the allowance left now, which may still count this post's own rows.
What a post answers
Once a post gets past the checks on your account, the ad and the call itself, it is always answered 202 with { callId, received, refused }.
202 means the rows were received. It never says whether a number went on sale, and nothing else in this API does either. Each row is checked against the do-not-call lists later, before it can go on sale, and the answer is the same whatever becomes of it.
What you're told, and when: format errors at once, in refused. One figure for each ad, for each finished week, rounded to 5%, on the ad's page: how many of the numbers new to you that week went on sale. What sold, on your statement. There is no answer for a single lead.