Skip to main content
Every error the API handles has a JSON body with an error key (an unexpected 500 may not, see below). It is usually a string; a validation error on a record (a list, a search, an enrichment) carries an array of messages instead, and some validation errors add context keys such as message or example:

Credit and limit errors

Every endpoint that spends enrichment credits checks your balance before doing any work. When that check fails, the API answers with a dedicated status code and a machine-readable code, so your integration can tell “top up and retry” apart from “this request will never succeed as-is”.

402 Payment Required — out of credits

The request was valid, but your workspace does not have enough enrichment credits to pay for it. No credits are spent, and nothing is enqueued or imported.
402 is retryable: top up (or wait for your plan to renew) and send the same request again. You can also receive 402 after the pre-flight check passes, if a concurrent request drains the balance before this one is charged. Treat it the same way.

403 Forbidden — workspace weekly limit reached

Your workspace has a weekly enrichment credit limit and this request would exceed it. The balance itself is irrelevant here, so no top_up_url is returned — buying credits does not lift the limit.
To unblock, a workspace admin has to raise the member’s weekly allowance, or you wait for the limit to reset.
403 has other causes, none of which carry a code: a closed account ("Account closed"), LinkedIn refusing access to the profile, post or list you asked for ("You don't have access to this LinkedIn resource."), or an endpoint your plan does not include, such as post engagers below the Growth plan. Branch on code, not on the status alone: workspace_limit_exceeded is a spending limit, anything else is an access problem that topping up does not fix.
When both conditions apply — the balance is too low and the weekly limit is reached — the API reports the balance first, with 402.

Endpoints that return these codes

Preview endpoints are free and never return either code. Every one of them checks credits up-front, so a rejected request never runs a provider, creates an import, or enqueues an enrichment.

Migrating from the previous behaviour

These conditions used to be reported as:
  • 422 Unprocessable Entity — waterfall enrichment (async, bulk, and synchronous), POST /accounts/company_hiring, and POST /accounts/company_stack
  • 422 Unprocessable Entity with a plan-limit message — POST /accounts/single_enrich ("Not enough company import limits left") and POST /leads/single_enrich ("Not enough profile extraction limits left"). Both are now priced in credits and answer 402/403 instead; they no longer draw on those plan quotas at all.
  • 401 Unauthorized — POST /intents/accounts/hiring and POST /intents/accounts/stack
These now answer 402 (or 403 for a workspace weekly limit). If your integration detects an empty balance by matching on 422/401, or by string-matching the message, switch to the status code and code field. 422 still covers validation errors and 401 still covers authentication (your API key, or an expired LinkedIn session), so the old checks will silently stop firing.

400 Bad Request — malformed request body

A body that is not valid JSON is rejected before anything runs or is spent:
details carries the JSON parser’s message. Depending on the endpoint, the same mistake can come back as {"error": "Invalid JSON"}, and valid JSON that is not an object (an array or a bare string) as {"error": "Request body must be a JSON object"}. Fix the body and resend.

401 Unauthorized — authentication

401 has two causes. Tell them apart by the error text: Retrying with the same key never fixes the first two. The third is fixed by reconnecting LinkedIn, not by changing the key. Some endpoints check the LinkedIn connection before calling LinkedIn and report an expired one as a 422 instead (see below).

403 Forbidden — access

Besides the workspace weekly limit (code: "workspace_limit_exceeded", see above), 403 means the request is not allowed as sent: There are no per-key permission scopes: every key can call every endpoint your plan includes.

404 Not Found

A path that is not an API endpoint answers {"error": "Unknown endpoint: POST /api/v2/..."}; check the method and the path. An ID that does not exist (a search, a list, a persona) answers {"error": "Resource not found"} or a message naming the resource.

409 Conflict — idempotency key in use

Another request with the same Idempotency-Key is still being processed:
Wait and retry with the same key. Reusing a key with a different body answers 422 with code: "idempotency_key_reused". See Retries and idempotency.

422 Unprocessable Entity — validation

The request is well-formed but cannot run as sent: a parameter has the wrong type or value, limit is outside 1–2500, webhook_url is not an http(s) URL, a plan limit is reached ("Can't proceed with the request. Plan limit reached."), or the endpoint needs a LinkedIn or Sales Navigator connection that is missing or expired. On the Scale plan, an extraction past the plan limit is queued with 202 Accepted and status: "queued" instead; it answers 422 only when it is larger than a whole day’s quota. See Credits vs limits. Fix the request (or reconnect LinkedIn from the app) and resend; retrying it unchanged fails the same way.

429 Too Many Requests

You went over a rate limit: {"error": "Rate limit exceeded. Please wait before retrying."}. Past your plan limit the response carries a Retry-After header with the seconds to wait. See Rate limiting. LinkedIn rate limits come back as 429 too, with no Retry-After header. The body names the account LinkedIn throttled:
With a workspace key, that member is left out of the rotation for 12 hours. Every response also names the account that served it in the Pipecorn-Account header, except a lead search that joins the workspace queue.

500 Internal Server Error

Something failed on our side. The request can be retried; if it keeps failing, contact support with the endpoint and the time of the request. An unexpected failure is not always rendered by the API itself, so a 500 body may not be JSON (for example an HTML error page). Branch on the status code and parse the body only if Content-Type is application/json.

502, 503, 504 — LinkedIn failures

Endpoints that call LinkedIn report a failure on LinkedIn’s side with a gateway status: 502 when LinkedIn answered with an error, 503 when it answered that it is unavailable, and 504 when it timed out or could not be reached. The body is:
These are transient: retry with a backoff.