InyokeDocs

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

FieldInRequiredDescription
listingIdpathYesYour ad's id, from GET /listings.
dryRunqueryNo1 or true checks the post and writes nothing. Leave it out, or send 0 or false, for a real post.
Idempotency-KeyheaderNoRequired on a real post, a new one for each post. A dry run needs none.
scrubbedAtbodyYesThe day, YYYY-MM-DD in UTC, you checked these rows against the National Do Not Call Registry.
rowsbodyYes1 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_source and consent_url, plus every field the ad declares. first_name, last_name, email, city and zip are taken when they're there.
  • The answer is always 202 with { callId, received, refused }. refused lists each row that wasn't taken, by its index in rows, 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.
  • callId is null on a dry run, which writes nothing.

refused[].code:

CodeMeaning
phone_invalidNo valid US or Canadian phone number.
phone_fictionalThe phone number can't be a real one, such as a 555-0100 to 555-0199 number.
state_invalidNo valid US state.
consent_date_invalidNo valid consent date.
consent_date_futureThe consent date is in the future.
consent_date_too_oldThe consent date is older than the ad allows.
ad_no_age_limitThe ad has no consent age limit, so it can't take leads.
consent_source_missingNo consent source.
consent_url_invalidNo valid consent URL.
consent_url_not_allowedThe consent URL isn't on a website the ad lists.
person_textA first name, last name or city holds something a name or a place can't, such as a link or digits.
zip_invalidThe zip isn't 5 or 9 digits.
email_invalidThe email isn't a valid address.
declared_field_missingA field the ad declares is blank.
row_not_an_objectThe row isn't an object of fields.
row_unstorableThe row holds a character that can't be stored, such as a null character or a broken one.
over_allowanceThe row is over your upload allowance for now. Send it again later.

Refusals

StatusCodeReasonWhen
422invaliddryRun is something other than 1, true, 0 or false.
422invalidA real post has no Idempotency-Key, or one that is blank, too long or not printable.
413invalidThe body is over 1 MB.
400invalidThe body isn't JSON.
422invalidThe body is JSON and doesn't fit the call. The message says what to fix, a key the call doesn't take included.
403forbiddennot_a_vendorThe key's account isn't a lead vendor's account.
403forbiddenstoppedYour account is paused or suspended. Reads still work, and nothing can be sent until the platform lifts it.
403forbiddencant_postYour account can't send anything right now.
403forbiddenagreement_owedThe vendor agreement has changed. Sign the new version on the website, then send again.
403forbiddenattestation_owedThe feed attestation has changed. Sign the new version on the website, then send again.
404not_foundad_not_foundThat ad isn't on your account. Another vendor's ad reads the same as one that doesn't exist.
422invalidad_retiredThat ad is retired, so it can't take leads.
422invalidscrub_dateThe scrub date is missing, in the future, or more than 31 days old.
422invalidrow_countA post holds 1 to 500 rows.
409conflictidempotency_key_reusedThis 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.

On this page