PedibeeDocs

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:

400 Bad Request
{ "error": "“jane@northwind” isn’t a valid email address." }
StatusMeaning
400Something in the request is wrong: a missing or invalid field. The message says which.
401No API key, or it's invalid, revoked or expired.
403The key lacks the scope for this call, its creator's role doesn't allow it, or the request came from a browser.
404Nothing with that id in your workspace. Records in other workspaces are reported as not found too.
409It clashes with something that exists: a contact with that email, a company with that domain, a list or field with that name.
429Too many requests. Wait for the number of seconds in the Retry-After header.
502Gmail refused or failed to send an email.
503A service Pedibee depends on is briefly unavailable. Retry later.
500Something went wrong on our side. Retry later.

Rate limits

Per API key:

LimitApplies to
100 requests per 10 secondsEvery call
50,000 requests per dayEvery call
20 emails a minute and 300 a daySending 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.

On this page