Skip to main content

Error Handling

The Developer API uses standard HTTP status codes and returns structured JSON error responses.


Error Response Format

{
"error": "Human-readable error message"
}

Validation errors include a list of specific field errors:

{
"error": "Validation failed",
"errors": [
"Name can't be blank",
"Email is invalid"
]
}

Status Codes

Success

CodeMeaning
200 OKRequest succeeded
201 CreatedResource created successfully

Client Errors

CodeMeaningCommon Cause
400 Bad RequestMissing required parameterCheck request body
401 UnauthorizedInvalid or missing API keyCheck X-API-Key header
403 ForbiddenInsufficient scope or endpoint not availableCheck key scopes
404 Not FoundResource doesn't existCheck the ID
409 ConflictDuplicate recordResource already exists
422 Unprocessable EntityValidation failedCheck errors array
429 Too Many RequestsRate limit exceededWait and retry

Server Errors

CodeMeaning
500 Internal Server ErrorSomething went wrong on our end

Rate Limiting (429)

When you exceed your rate limit, the response includes headers telling you when to retry:

HTTP/1.1 429 Too Many Requests
Retry-After: 60
X-RateLimit-Limit: 60
X-RateLimit-Remaining: 0
X-RateLimit-Reset: 1711108860

{"error": "Rate limit exceeded. Retry later."}
Handle 429 gracefully

Implement exponential backoff in your integration. Wait the number of seconds in Retry-After before retrying.


Common Mistakes

Wrong header name

# Wrong
curl -H "Authorization: Bearer bpos_abc..."

# Correct
curl -H "X-API-Key: bpos_abc..."

Missing scope

If you get 403 Forbidden with "Insufficient scope", check that your API key has the required scope for that endpoint. For example, reading customers requires customers:read.

Write on read-only endpoint

Some endpoints only allow read access via API keys (e.g., sales). Attempting to create or modify resources on read-only endpoints returns 403 Forbidden.


What's Next?