Errors & Status Codes
The BlueRound API uses standard HTTP status codes to signal the outcome
of every request. Whenever a request fails, the response body contains a
structured error object that gives you a machine-readable code, a
human-readable message, and a link to this page for further guidance.
Error Response Format
All error responses follow the same envelope schema:
{
"error": {
"code": "RESOURCE_NOT_FOUND",
"message": "User usr_00000 does not exist.",
"docs": "https://docs.blueround.com/api/errors#RESOURCE_NOT_FOUND",
"details": []
}
}
Field |
Type |
Description |
|---|---|---|
|
|
Machine-readable error identifier. Use this in code, not |
|
|
Human-readable explanation. Subject to change — do not parse. |
|
|
Permalink to the relevant section of this page. |
|
|
Present on |
For validation errors, details provides per-field information:
{
"error": {
"code": "VALIDATION_ERROR",
"message": "The request body contains invalid fields.",
"docs": "https://docs.blueround.com/api/errors#VALIDATION_ERROR",
"details": [
{ "field": "email", "issue": "Must be a valid email address." },
{ "field": "role", "issue": "Must be one of: admin, member, viewer." }
]
}
}
HTTP Status Code Reference
Code |
Meaning |
When it occurs |
|---|---|---|
|
OK |
Request succeeded. Response body contains |
|
Created |
Resource created successfully. |
|
No Content |
Request succeeded with no response body (e.g., token revocation). |
|
Bad Request |
Malformed JSON, invalid query parameter, or failed validation. |
|
Unauthorized |
Missing, expired, or malformed Bearer token. |
|
Forbidden |
Valid token but insufficient scope for this operation. |
|
Not Found |
Resource does not exist or is not visible to this token. |
|
Conflict |
Duplicate resource (e.g., email already registered). |
|
Unprocessable Entity |
Syntactically valid request, but semantically invalid (business rule violation). |
|
Too Many Requests |
Rate limit exceeded. Retry after |
|
Internal Server Error |
Unexpected server-side failure. Retry with exponential back-off. |
|
Service Unavailable |
Temporary outage or maintenance. Check status.blueround.com. |
Error Code Catalogue
VALIDATION_ERROR (400)
One or more request fields failed validation. Inspect the details array
for per-field information and correct the request before retrying.
INVALID_TOKEN (401)
The supplied Bearer token is malformed or does not exist. Obtain a fresh token via OAuth 2.0 Authentication and retry.
TOKEN_EXPIRED (401)
The access token has passed its expires_in limit (3 600 seconds).
Use the refresh token grant to obtain a new access token without
re-authenticating the user.
curl -X POST "https://auth.blueround.com/oauth/token" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "grant_type=refresh_token" \
-d "refresh_token=def50200a9f3..." \
-d "client_id=YOUR_CLIENT_ID" \
-d "client_secret=YOUR_CLIENT_SECRET"
INSUFFICIENT_SCOPE (403)
The token is valid but does not carry the scope required by this endpoint.
Request a new token that includes the missing scope (e.g., users:write).
Endpoint |
Required scope |
|---|---|
|
|
|
|
|
|
|
|
|
|
RESOURCE_NOT_FOUND (404)
The requested resource ID does not exist within your organization or is not accessible to the authenticated token. Verify the ID and that the resource belongs to your account.
DUPLICATE_RESOURCE (409)
A resource with a unique attribute (e.g., email address) already exists. Retrieve the existing resource instead of creating a new one, or use a different unique value.
RATE_LIMIT_EXCEEDED (429)
Your application has exceeded its allowed request rate. Inspect the
Retry-After response header and pause requests for that many seconds
before retrying.
import time
import requests
def get_with_retry(url, headers, max_retries=5):
for attempt in range(max_retries):
resp = requests.get(url, headers=headers)
if resp.status_code == 429:
wait = int(resp.headers.get("Retry-After", 5))
print(f"Rate limited. Retrying in {wait}s…")
time.sleep(wait)
continue
resp.raise_for_status()
return resp.json()
raise RuntimeError("Max retries exceeded.")
INTERNAL_ERROR (500)
An unexpected error occurred on the BlueRound servers. These are rare and typically transient. Retry using exponential back-off:
Attempt |
Wait before retry |
Notes |
|---|---|---|
1st retry |
1 second |
After the initial failure. |
2nd retry |
2 seconds |
— |
3rd retry |
4 seconds |
— |
4th retry |
8 seconds |
— |
Give up |
— |
Log the |
Important
Always log the X-Request-ID response header when a 500 error
occurs. Include it in your support ticket so the BlueRound team can
locate the server-side trace instantly.
Debugging Tips
Symptom |
Likely cause and fix |
|---|---|
|
Token missing from header, or |
|
Access token expired. Implement automatic refresh — see TOKEN_EXPIRED (401). |
|
Token scope is too narrow. Re-request with the required scope listed in INSUFFICIENT_SCOPE (403). |
|
Check you are using the correct environment (production vs. staging). Staging data resets nightly. |
Intermittent |
Retry with back-off. If persistent, check status.blueround.com for an active incident. |
See also
About the BlueRound API — Rate limit headers and base URLs.
OAuth 2.0 Authentication — Token acquisition, refresh, and revocation.
Users — Status codes specific to the Users endpoints.