Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.getmaito.com/docs/llms.txt

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

Maito REST responses use a JSON envelope.

Success Envelope

A successful response has ok: true and a data value.
{
  "ok": true,
  "data": {}
}
data can be an object, array, string, number, boolean, or null, depending on the endpoint.

Error Envelope

An error response has ok: false and an error object.
{
  "ok": false,
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Invalid request."
  }
}
details may be included for validation issues or structured domain context:
{
  "ok": false,
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Invalid request.",
    "details": []
  }
}

Status Codes

StatusMeaning
400The request body, query, or path parameter is malformed.
401The API key is missing, invalid, or expired.
403The key is valid, but the caller cannot access the requested resource or capability.
404The resource was not found.
409The request conflicts with current state.
422The request was readable but failed validation or domain rules.
429The client is sending requests too quickly.
500Server error or server misconfiguration.

Common Error Codes

CodeMeaning
UNAUTHORIZEDAuthentication is required or invalid.
VALIDATION_ERRORRequest input failed validation.
NOT_FOUNDThe requested resource does not exist or is not visible to the caller.
CONFLICTThe operation conflicts with current resource state.
SERVER_MISCONFIGUREDThe server is missing required configuration.
Exact domain error codes can vary by endpoint. Clients should branch on HTTP status first, then use error.code for product-specific handling.

Retry Guidance

StatusRetry?
400No. Fix the request.
401No. Create or provide a valid API key.
403No. Check permissions or account access.
404Usually no. Verify the resource ID or path.
409Retry only after changing the request or resource state.
422No. Fix the request data.
429Yes, after waiting.
500Yes, with exponential backoff.