Guides
Errors
When a request fails, the answer is a problem: application/problem+json (RFC 9457) with a type you can act on, and a status that matches.
What a problem looks like
HTTP/1.1 422 Unprocessable Entity
Content-Type: application/problem+json
{
"type": "https://gbalejo.com/problems/validation",
"title": "Some fields need attention",
"status": 422,
"detail": "The request has fields that are missing or not valid.",
"instance": "/api/v1/visits",
"traceId": "6f1c2e0a-8d4b-4a7e-9c3f-5e2b7d1a9c16",
"errors": [
{
"path": "visitors.0.email",
"message": "Invalid email address",
"code": "invalid_format"
},
{
"path": "schedule.startTime",
"message": "Use HH:MM (24-hour)",
"code": "invalid_format"
}
]
}- type
- What went wrong:
https://gbalejo.com/problems/<type>. Match on it, never on the title or detail, which are words for people and may change. - title
- A short summary for people.
- status
- The HTTP status, the same as the answer’s.
- detail
- What happened this time, for people.
- instance
- The path that was called.
- traceId
- The request’s id, also in the
X-Request-Idheader. Send your ownX-Request-Id(8–64 letters, digits, dots, dashes or underscores) and it is used instead; quote it when you write to us. - errors
- For
422 validationonly: each field that needs attention, with itspathin the body or query ("visitors.0.email"), amessageand acode. - limit, feature
- For
402 plan-limitand402 plan-feature: the limit reached ("monthlyVisits") or the feature missing ("api").
Problems on every route
| Status | Type | When |
|---|---|---|
| 400 | bad-request | The body is not JSON, or an id in the path is not a UUID. |
| 401 | api-key-invalid | No key was sent, or it is mistyped or unknown. |
| 401 | api-key-revoked | The key has been revoked. |
| 401 | api-key-expired | The key has passed its expiry date. |
| 402 | plan-feature | The organisation’s plan does not include the API (feature: "api"). |
| 402 | account-read-only | A payment is overdue: the organisation can read but not change anything until it is paid. |
| 403 | organisation-suspended | Gbàlejò has suspended the organisation. |
| 403 | api-key-scope | The key does not have the route’s scope (or any of its scopes, where it takes several). |
| 404 | not-found | There is no such visit, employee or site, or no such route. |
| 422 | validation | A field is missing or not valid: errors lists each one with its path. |
| 429 | rate-limited | The key has made its requests for this minute (Retry-After says when). |
| 429 | too-many-requests | Your address made 2,400 requests this minute, over all its keys. |
| 500 | internal | Something went wrong on our side: try again later, and quote the traceId if it lasts. |
Each operation’s page lists the problems it can answer with, including its own (a schedule that has passed, an employee who already exists).
What to do
- 4xx (but 409 and 429): the request needs changing. Sending it again unchanged gets the same answer.
- 409 visit-changed: someone changed the visit at the same moment. Read it again, then decide.
- 429: wait for
Retry-After, then send it again (Rate limits). - 402 account-read-only: a payment is overdue. Reading still works; the owner can pay in Settings → Billing.
- 5xx: try again later, waiting longer each time.