Errors
The error envelope, what each status means, and the codes worth branching on.
The envelope
Every error answers JSON in one shape:
{
"ok": false,
"error": {
"code": "sender_not_connected",
"message": "This sender isn't connected. Reconnect it first.",
"problems": [{ "code": "…", "parameter": "…", "message": "…" }]
}
}codeis stable and machine-readable: branch on it.messageis a sentence for people. Show it, log it, but don't parse it: the wording can change.problemsappears on some4xxanswers that list several fixable problems at once (for example an import whose input has several errors: see Importing leads).
Treat a code you don't recognise by its HTTP status.
Status codes
| Status | Meaning | Retry? |
|---|---|---|
400 | The request is malformed: invalid_request (the message names the field), batch_too_large | No: fix the request |
401 | No usable key: api_key_required, api_key_invalid, api_key_revoked, api_key_inactive (its creator lost access to the workspace) | No: use a valid key |
403 | The key lacks a scope (forbidden, the message names it), or the route is for people in the app only (api_key_not_allowed) | No: create a key with the scope |
404 | It doesn't exist in this key's workspace (sender_not_found, lead_not_found, conversation_not_found, …) | No |
409 | A conflict with the current state (idempotency_conflict, lead_owned_by_other_sender, action_not_cancelable, …) | No, not as is |
422 | Well-formed but refused (sender_not_connected, browser_required, blacklisted, …) | No, not as is |
429 | Too many requests or a budget used up (rate_limited, lookup_budget_exhausted, …) | Yes, after Retry-After seconds |
5xx | Something went wrong on our side, or a dependency is briefly unavailable (503) | Yes, with backoff, reusing the same idempotency key |
A resource in another workspace answers 404, never 403: a key can't learn what exists
outside its own workspace.
Direct action codes
When you queue an action (POST /v1/actions):
| Code | Status | What to do |
|---|---|---|
sender_not_found | 404 | The senderId isn't in this workspace |
lead_not_found | 404 | The leadId target isn't in this workspace |
conversation_not_found | 404 | Not a thread of this workspace, or a private mailbox |
sender_not_connected | 422 | The sender you named isn't connected: reconnect it, or omit senderId |
target_invalid | 422 | Not a LinkedIn person profile, or not the thread's participant |
action_not_supported | 422 | This type isn't available yet (inmail) |
browser_required | 422 | This kind needs the sender's browser, and it has none |
blacklisted | 422 | The person or their company is on the workspace blacklist |
expires_at_invalid | 422 | expiresAt is in the past, more than 30 days away, or not after notBefore |
no_sender_available | 422 | No connected, healthy sender can take this kind of action |
lead_owned_by_other_sender | 409 | Another sender owns this person or thread: omit senderId |
lead_in_active_campaign | 409 | A campaign is working this person: stop or remove them there first |
idempotency_conflict | 409 | This idempotencyKey was used with a different body |
action_not_cancelable | 409 | The action already left queued |
forbidden | 403 | A reply into a thread without the inboxReply permission |
Why a queued action failed
An action that was accepted can still end failed later. Its failure.code (also in the
action_failed webhook) tells you why:
| Code | Meaning |
|---|---|
expired | It didn't run before expiresAt |
note_too_long | The invitation note is longer than LinkedIn allows for this account (200 characters without Premium) |
not_connected | A message to someone who isn't a 1st-degree connection |
blacklisted | The person was blacklisted after the action was queued |
sender_disconnected | The sender was disconnected while the action waited |
cancel_requested | Status unknown: a bulk cancel stopped it after an earlier attempt that may have reached LinkedIn. It is never retried; check the chat |
note_credits_used_up | The account has no invitation-note credits left. The invite fails at once with failure.retryable: true: send it again without a note, or later. The account's campaign invites then wait until the credits come back (expected on the 1st of next month in the sender's time zone), or go without a note if the workspace chose that: see Out of invite-note credits |
LinkedIn's other limits and account problems don't fail an action: it stays queued and
waiting.reason says why: cooldown for the weekly invitation limit, locked after LinkedIn
throttled the account, sender_stopped when LinkedIn logged the account out, wants a verification
or restricted it (until its owner reconnects it). It ends expired only if it can't run before
expiresAt.
failure.retryable says whether queueing the same action again later can work. Treat any other
code as "failed, see failure.message".
An unknown status isn't a failure: the write may have reached LinkedIn, and Tryzen is checking.
Don't queue it again.
Other codes you may meet
| Code | Status | Where |
|---|---|---|
lookup_budget_exhausted | 429 | Profile lookups: the sender's daily lookup budget is used up (Retry-After) |
lookup_throttled | 429 | Profile lookups: too soon after the last one, or the sender is held (Retry-After) |
lookup_unavailable | 503 | Profile lookups: try again shortly |
no_proxy_in_country | 422 | Connecting: no free proxy in the requested country |
ambient_extra_limit | 429 | Ambient: at most 3 extra sessions a day |
ambient_unavailable | 409 | Ambient: no browser, sender stopped or disconnected, or ambient off |
sender_disconnected | 409 | Inbox reply: the thread's sender is disconnected |
blocked_target | 422 | Webhooks: the URL isn't a public http(s) address |
delivery_in_progress | 409 | Redelivery: the delivery is still being attempted |
search_url_invalid | 422 | Imports: the search URL can't be imported; problems lists why |
post_url_invalid | 422 | Post reactor imports: not a post URL we can read; problems says why |
list_busy | 409 | Imports: another import is filling that list |
company_list | 409 | Imports: people go into a people list, that one is a company list |
people_list | 409 | Imports: companies go into a company list, that one is a people list |
jobs_unavailable | 503 | Imports: the import couldn't start; nothing was read, retry shortly |