Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

API Reference

Aero2 exposes a REST API for OIDC operations and administration. All endpoints return JSON unless otherwise noted.

Base URL

https://{app-slug}.yourdomain.com

Each application has its own subdomain. All API requests are scoped to the application determined by the hostname. For example, requests to swift-maple.aero2.dev only see users, clients, and data belonging to that application.

Authentication

Endpoints use one of four authentication levels:

LevelDescriptionHow to authenticate
No AuthPublic endpointsNo authentication needed
SessionRequires active sessionSession cookie (set after login)
BearerRequires access tokenAuthorization: Bearer <token> header
AdminRequires admin/operator roleBearer token from a user with admin or operator role

Error Format

All errors follow this structure:

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

Common HTTP status codes:

CodeMeaning
200Success
201Created
302Redirect
400Bad request (invalid parameters)
401Unauthorized (missing or invalid auth)
403Forbidden (insufficient permissions)
404Not found
500Internal server error

Pagination

Paginated endpoints accept page and limit query parameters and return a pagination object:

{
  "pagination": {
    "page": 1,
    "limit": 50,
    "total": 100,
    "total_pages": 2
  }
}

Content Type

  • Request body: application/x-www-form-urlencoded for OAuth endpoints, application/json for admin API
  • Response: Always application/json

Sections