InyokeDocs

Errors

Every error has the same shape. Branch on the code and the reason, and show the message to people.

Every error has this shape. Branch on the code and the reason. The message is for people.

{
  "error": {
    "code": "forbidden",
    "message": "The vendor agreement has changed. Read the new version, then sign it.",
    "reason": "agreement_owed"
  }
}
StatusCodeMeaning
401unauthorizedNo key was sent, or the key can't be used here. The answer is the same for every reason a key can't be used, on purpose.
403forbiddenThe key is good and the call isn't allowed: the key lacks the call's scope, or your account can't do this right now. reason says which.
404not_foundWhat you named isn't on your account. Something that doesn't exist and something of someone else's answer alike.
422invalidThe request was understood and refused. The message says what to fix. A body that isn't JSON at all answers 400, and one over 1 MB answers 413.
409conflictThe call can't be done in the state things are in. reason says why.
429rate_limitedOver a limit. Wait the Retry-After seconds, then try again.
500internalSomething went wrong on the platform's side. Try again in a moment, and tell support if it lasts.

Reasons

A refusal your software can act on carries a reason. This is each one, and the status it comes with.

ReasonStatusMeaning
not_a_vendor403The key's account isn't a lead vendor's account.
stopped403Your account is paused or suspended. Reads still work, and nothing can be sent until the platform lifts it.
cant_post403Your account can't send anything right now.
agreement_owed403The vendor agreement has changed. Sign the new version on the website, then send again.
attestation_owed403The feed attestation has changed. Sign the new version on the website, then send again.
ad_not_found404That ad isn't on your account. Another vendor's ad reads the same as one that doesn't exist.
ad_retired422That ad is retired, so it can't take leads.
scrub_date422The scrub date is missing, in the future, or more than 31 days old.
row_count422A post holds 1 to 500 rows.
upload_budget429You've asked for 20 upload addresses today. Retry-After says when the day turns over, at midnight UTC.
upload_budget_unavailable500Your upload addresses for today couldn't be counted just now, so none was made. Try again in a moment.
file_open409Another of your files is still being read. Wait for it to finish, then start this one.
file_too_big422The file is over 50 MB.
storage_off422File uploads aren't available right now.
upload_not_valid422That uploadId isn't one this account was given.
upload_not_found422Nothing has been put at that upload's address yet, or it has expired.
upload_size_changed422The file put at the address isn't the size you asked for.
upload_already_started422That uploadId has already started a file on another of your ads.
idempotency_key_reused409This Idempotency-Key was sent before with a different body, or to another ad. Make a new key for a new post.
cant_read403Your account can't read this right now, usually because something is waiting to be signed. GET /me says why.
file_not_found404That file isn't on your account. Another vendor's file, a day's feed and an id nobody has all read the same.

Any call can be refused for these

StatusCodeWhen
401unauthorizedNo key was sent. The message is Missing API key.
401unauthorizedThe key can't be used here, for any reason at all. The message is Invalid or revoked API key.
403forbiddenThe key doesn't have the call's scope. The message names it.
429rate_limitedOver the minute's or the day's requests. Retry-After says how many seconds to wait.

On this page