Errors
Every error has the same shape. Branch on the code, and show the message to people.
{
"error": {
"code": "conflict",
"message": "Another import is running in this agency.",
"reason": "import_running"
}
}| Status | Code | Meaning |
|---|---|---|
400 | The body isn't JSON at all: empty, or cut off. | |
401 | unauthorized | No key was sent, or the key can't be used. See Authentication. |
403 | forbidden | You're missing a permission the call needs, or the key doesn't have the access. The message says which. |
403 | gated | You have something to finish in Inyoke first. gate names the step: onboarding, sms_agent, agreement, license, billing or recruiter_only. |
404 | not_found | What you named doesn't exist, or isn't yours to see. Both answer alike, so an id never tells you what exists. |
409 | conflict | The call can't be done in the state things are in. reason says why. |
422 | invalid | The request was understood but refused. The message says what to fix. |
429 | rate_limited | Over a limit. Wait the Retry-After seconds, then try again. |
500 | internal | Something went wrong on our side. Try again in a moment, and tell support if it lasts. |
Conflicts
A 409 carries a reason.
| Reason | Meaning | What to do |
|---|---|---|
import_running | Another import is running in this agency, and imports run one at a time. | Retry the same request with the same Idempotency-Key, waiting longer each time: 30 seconds, then a minute, then two. |
list_feeds_other_campaign | The listId you sent feeds another campaign, and the API never moves a list between campaigns. | Send a list that's on this campaign or on none, or leave listId out to make a new list. |
list_inactive | That lead list is switched off, so its leads would never be dialed. | Switch the list on in Inyoke, or use another list. |
idempotency_key_reused | The Idempotency-Key already started a different import. | Send a new key for each file, and the same key only when you retry the same request. |