Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.borga.is/llms.txt

Use this file to discover all available pages before exploring further.

Borga uses conventional HTTP status codes to signal whether a request succeeded or failed. When a request fails, the response body is a JSON object with an error field containing details about what went wrong.

Error response format

Every error response has the following shape:
{
  "error": {
    "type": "invalid_request_error",
    "message": "The 'amount' field must be a positive integer.",
    "code": "invalid_amount",
    "param": "amount"
  }
}
FieldTypeDescription
error.typestringCategory of the error. See error types below.
error.messagestringHuman-readable description of what went wrong.
error.codestringOptional machine-readable error code for programmatic handling.
error.paramstringOptional. The request parameter that caused the error, if applicable.
During development, log the full error object on every failed request. The message and param fields often reveal exactly what to fix without needing to consult the docs.

HTTP status codes

StatusMeaning
200 OKRequest succeeded.
201 CreatedResource was created successfully.
400 Bad RequestThe request has invalid parameters. Check error.param to identify the field.
401 UnauthorizedThe Authorization header is missing, malformed, or contains an invalid API key.
403 ForbiddenThe API key is valid but does not have permission to perform this action.
404 Not FoundThe requested resource does not exist.
409 ConflictAn Idempotency-Key was reused with different request parameters.
422 Unprocessable EntityThe request body failed validation. Check error.param for the offending field.
429 Too Many RequestsThe rate limit has been exceeded. Back off and retry.
500 Internal Server ErrorSomething went wrong on Borga’s side.
5xx errors are safe to retry. Use exponential backoff — for example, wait 1 s, then 2 s, then 4 s — to avoid amplifying load on a degraded service.

Error types

TypeDescription
authentication_errorThe API key is missing, invalid, or has been revoked.
invalid_request_errorThe request is malformed or contains invalid parameter values.
not_found_errorThe referenced resource does not exist or is not accessible with this key.
permission_errorThe API key does not have the required permissions for this operation.
rate_limit_errorToo many requests have been made in a short period.
api_errorAn unexpected error occurred on Borga’s side. Retry with exponential backoff.