Errors and limits
Status codes, error messages, rate limits and paging.
Errors
When a call fails, the response has an HTTP error status and a body with one message, written so you can show it to a person:
{ "error": "“jane@northwind” isn’t a valid email address." }| Status | Meaning |
|---|---|
400 | Something in the request is wrong: a missing or invalid field. The message says which. |
401 | No API key, or it's invalid, revoked or expired. |
403 | The key lacks the scope for this call, its creator's role doesn't allow it, or the request came from a browser. |
404 | Nothing with that id in your workspace. Records in other workspaces are reported as not found too. |
409 | It clashes with something that exists: a contact with that email, a company with that domain, a list or field with that name. |
429 | Too many requests. Wait for the number of seconds in the Retry-After header. |
502 | Gmail refused or failed to send an email. |
503 | A service Pedibee depends on is briefly unavailable. Retry later. |
500 | Something went wrong on our side. Retry later. |
Rate limits
Per API key:
| Limit | Applies to |
|---|---|
| 100 requests per 10 seconds | Every call |
| 50,000 requests per day | Every call |
| 20 emails a minute and 300 a day | Sending email, per key and per Gmail across all your keys |
Emails also count towards the Gmail's daily sending limit, which campaigns, sequences and the Email tab share.
When you're over a limit you get 429 with Retry-After (seconds). Wait that long before trying again; retrying sooner only gets more 429s.
async function call(url, init) {
const res = await fetch(url, init);
if (res.status === 429) {
await new Promise((r) => setTimeout(r, Number(res.headers.get('retry-after') ?? 1) * 1000));
return call(url, init);
}
return res;
}Paging
List endpoints return one page at a time:
{ "data": [/* … */], "total": 312, "skip": 0, "limit": 50 }Ask for the next page with skip (how many to skip) and limit (page size, 1–200, default 50):
curl "https://api.pedibee.com/api/v1/contacts?skip=50&limit=50" \
-H "Authorization: Bearer $PEDIBEE_API_KEY"Stop when skip + data.length >= total.