Skip to main content

Base URL

All API requests should be made to:
For production deployments, replace localhost:8080 with your deployed API URL configured via the BETTER_AUTH_URL environment variable.

API Versioning

Autumn supports multiple API versioning strategies to ensure backward compatibility and smooth migrations.

Version Resolution Order

The API version is determined in the following priority order:
  1. x-api-version Header - Explicitly specify the version in your request
  2. Organization Creation Date - Automatically calculated from when your organization was created
  3. Default Version - Falls back to v0.2 if no organization is found

Supported Version Formats

You can specify API versions using any of these formats:
  • CalVer (Calendar Versioning): YYYY-MM-DD format
    • Example: 2025-04-17
  • Legacy Float: X.X format
    • Example: 1.1
  • SemVer (Semantic Versioning): X.Y.Z format
    • Example: 1.1.0

Example Request

Request Format

All API requests must:
  • Use HTTPS in production
  • Include proper authentication headers (see Authentication)
  • Send JSON payloads with Content-Type: application/json for POST/PUT/PATCH requests
  • Include API version header when needed

Common Headers

Response Format

All API responses are returned in JSON format with appropriate HTTP status codes.

Success Response

Error Response

See Error Codes for detailed information about error handling.

Rate Limiting

API requests are subject to rate limiting to ensure service quality. Rate limit details are included in response headers.

Idempotency

Autumn supports idempotent requests using the idempotency-key header. This ensures that retrying a request with the same key won’t create duplicate resources.

Pagination

List endpoints support pagination using query parameters:
  • limit - Number of results per page (default varies by endpoint)
  • offset - Number of results to skip

Field Expansion

Some endpoints support expanding related objects using the expand query parameter to reduce the number of API calls needed. Example: