Errors and rate limits
What a failed Ladoo API request returns, the error codes you'll see most and what to do about each, and the request limits with their RateLimit headers.
By the Ladoo team · Updated
What an error looks like
Every error from the Ladoo API has the same JSON shape and an HTTP status that says what kind of problem it is:
{
"error": {
"code": "insufficient_scope",
"message": "API key lacks the 'people:write' scope",
"details": { "required": "people:write" },
"request_id": "6b1f0c2e-9d4a-4f3b-8e7c-5a2d1b0c9e8f"
}
}
codeis stable. Write your code against it.messageis for people. It can change at any time, so never match on it.detailsis there for some errors, with more about what went wrong.request_ididentifies the request. Include it when you write to support, so we can find it.
Status codes
| Status | What it means | What to do |
|---|---|---|
400 | The request isn't valid: a missing field, a bad value or format. | Fix the request. Don't retry it as it is. |
401 | No key, or one that's wrong, revoked or expired. | Check the key. Don't retry. |
402 | Your plan doesn't include this, or its limit is reached. | Change the plan, or remove something first. |
403 | The key can't do this here. | Use a key with the right scope. |
404 | No such thing in this workspace, or no such route. | Check the id and the workspace the key belongs to. |
409 | It clashes with how things are now, like a duplicate. | Read the current state, then decide. |
413 | The request body is too large: over 1 MB, or over a file upload's limit. | Send less at once. |
422 | The request is valid JSON but can't be done, like a reused key. | Fix the request. |
429 | Too many requests. | Wait for Retry-After seconds, then retry. |
5xx | Something went wrong on our side, or at a provider we use. | Retry with backoff, with the same Idempotency-Key. |
Common error codes
| Code | Status | When |
|---|---|---|
validation_failed | 400 | The body or query didn't match the endpoint. details.issues lists each path and message. |
invalid_cursor | 400 | The cursor for the next page is malformed. Start again from the first page. |
unknown_api_version | 400 | The Ladoo-Version header names a version that doesn't exist. |
unauthorized | 401 | The key is missing, malformed or revoked, or the person who made it has left. |
key_expired | 401 | The key is past its expiry date. |
client_workspace_limit | 402 | The agency's plan has no room for another client workspace. |
insufficient_scope | 403 | The key doesn't have the scope. details.required names it. |
ip_not_allowed | 403 | The key is limited to some IP addresses, and this isn't one of them. |
workspace_suspended | 403 | The workspace, or the agency above it, is suspended. |
workspace_archived | 403 | The workspace, or the agency above it, is archived. |
not_found | 404 | The thing or the route doesn't exist in this workspace. |
conflict | 409 | Something with the same unique value already exists. |
idempotency_key_in_use | 409 | The first request with this Idempotency-Key is still running. Wait, then retry. |
endpoint_limit | 409 | The workspace already has 100 webhook endpoints. |
not_an_agency | 409 | Client workspace routes were called from a workspace that isn't an agency. |
phone_taken | 409 | Someone in People already has this number. details includes their id. |
idempotency_key_reused | 422 | This Idempotency-Key was already used for a different request. |
body_too_large | 413 | The body is over the limit. |
rate_limited | 429 | Over a rate limit. Retry-After says how many seconds to wait. |
internal_error | 500 | An unexpected error on our side. It's been logged. |
New codes can be added at any time without a new API version, so treat a code you don't know by its status.
Retry safely
- Retry
429and5xxresponses, and network errors where you got no response at all. Don't retry other4xxresponses: the same request will fail the same way. - Wait longer between each try, like 1, 2, then 4 seconds, plus a little randomness, so many clients don't retry in step.
- For a
POST, send anIdempotency-Keyand reuse it on every retry of that request. If the first try went through, the retry gets the same response back instead of creating something twice. See Safe retries with Idempotency-Key.
Rate limits
Each workspace can make 600 requests a minute, and each IP address 1,200, whichever comes first. A few endpoints that cost more have lower limits of their own, per workspace:
| Endpoints | Limit |
|---|---|
Voice previews (POST /v1/voices/{id}/speech) | 10 a minute |
| Build with AI (agent and workflow assist, agent setup, script to workflow) | 10 a minute |
Testing a Custom Code step (POST /v1/agents/{id}/workflow/code/test) | 30 a minute |
| File uploads (knowledge base files and script files) | 20 a minute |
Knowledge base search (POST /v1/knowledge-bases/{id}/search) | 60 a minute |
Every /v1 response tells you where you stand on the tightest limit that applies:
| Header | Meaning |
|---|---|
RateLimit-Limit | Requests allowed in the current window |
RateLimit-Remaining | Requests left in it |
RateLimit-Reset | Seconds until the window resets |
Over the limit, you get 429 rate_limited with a Retry-After header in seconds. Wait that long before trying again.
To stay under the limits, page through lists with limit up to 200 rather than fetching items one by one, and use webhooks to hear about changes instead of polling.
Related guides: API versions and safe retries, API reference and Agent templates: build once, start every client from it.
Still stuck?
Ask our support agent (it runs on Ladoo), or email the team.