Errors and rate limits
Errors#
The HTTP status code tells you whether a request succeeded: 2xx is success, 4xx and 5xx are
failures. Every error response has the same body:
{
"message": "Invalid API key",
"error_code": "api_key_invalid",
"error_uid": "3f9c2a1"
}
message— what went wrong, in English. The text may change, so do not compare it in your code.error_code— a stable code of the problem. Use it in your code to tell errors apart; a code never changes once published. See Error codes.error_uid— the identifier of this error in Lynked's logs. Quote it when you contact Lynked support.
A 422 Unprocessable Entity also lists the problems per request field in errors:
{
"message": "email: This value is not a valid email address.",
"errors": {
"email": [{ "message": "This value is not a valid email address." }]
},
"error_uid": "3f9c2a1"
}
| Status | Meaning |
|---|---|
401 Unauthorized | The API key is missing, invalid or revoked. |
403 Forbidden | The Public API is disabled for your business. |
404 Not Found | The resource does not exist or does not belong to your business. |
409 Conflict | A request with the same Idempotency-Key is still running, see Idempotency. |
422 Unprocessable Entity | The request is invalid; errors says which fields and why. |
429 Too Many Requests | The rate limit is exceeded, see below. |
500 Internal Server Error | Something failed on Lynked's side. Retry later; if it persists, contact support with the error_uid. |
Error codes#
error_code | Status | Meaning |
|---|---|---|
api_key_missing | 401 | The Authorization: Bearer lk_live_… header is missing. |
api_key_invalid | 401 | The API key is unknown or revoked. |
public_api_disabled | 403 | The Public API is disabled for your business. |
idempotency_key_invalid | 422 | Idempotency-Key is not a UUID. |
idempotency_key_reused | 422 | The Idempotency-Key was already used with a different request. |
idempotency_key_in_progress | 409 | A request with the same Idempotency-Key is still running. |
rate_limit_exceeded | 429 | The rate limit is exceeded. |
New codes are added as the API grows. Treat an unknown code by its HTTP status.
Rate limits#
Your business can make 120 requests per minute. The limit is shared by all your API keys.
Over the limit, requests get 429 Too Many Requests with a Retry-After header: the number of
seconds to wait before trying again.