Errors and rate limits
How errors are reported, what each status code means, and how to stay within your plan's request limits.
By LinkForg Team · Last updated
Error format#
{
"message": "Not enough credits",
"code": "INSUFFICIENT_CREDITS"
}Some errors add a details object. Validation errors also include an issues list with the field path and message.
Status codes#
| Status | Code | Meaning |
|---|---|---|
| 400 | BAD_REQUEST | The request is malformed or a field is invalid. |
| 401 | UNAUTHORIZED | The API key is missing, invalid or revoked. |
| 402 | INSUFFICIENT_CREDITS | Not enough credits for this request. |
| 402 | PLAN_REQUIRED | Your plan doesn't include this feature. |
| 403 | FORBIDDEN | You don't have access to this project. |
| 404 | NOT_FOUND | The resource does not exist. |
| 412 | KEY_MISSING | The feature needs a provider key in Integrations. |
| 429 | RATE_LIMITED | Too many requests. Slow down and retry. |
| 502 | PROVIDER_ERROR | An upstream data provider failed. Safe to retry later. |
| 500 | INTERNAL | Something failed on our side. Safe to retry. |
Rate limits#
| Plan | Requests per minute, per key |
|---|---|
| Free | 30 |
| Starter | 60 |
| Professional | 120 |
| Agency Max | 600 |
Response headers
RateLimit-Policystring- The limit and window that apply to your key.
RateLimitstring- Requests remaining and seconds until the window resets.
Retrying safely#
Retry 429 and 5xx responses with exponential backoff. Submitting the same URL to a project twice is safe: the second time it is reported as a duplicate and not charged.
async function request(url, options, attempt = 0) {
const res = await fetch(url, options);
if ((res.status === 429 || res.status >= 500) && attempt < 4) {
await new Promise((resolve) => setTimeout(resolve, 2 ** attempt * 1000));
return request(url, options, attempt + 1);
}
return res;
}Related in API reference
- AuthenticationEvery API request is authenticated with an API key. Learn where to create one and how to send it.
- URLs and index checksSubmit URLs to a project, list them with their status, and check index status on demand.
- Projects, links and auditsList your projects, add backlinks to monitor, and read monitored links and audit results.
- WebhooksGet notified when something changes, instead of polling the API.
Was this page helpful?