API Reference
The Auris API is a REST API that provides programmatic access to all IAM functionality: authentication, user management, roles, permissions, organizations, fine-grained authorization, and more. All API responses use JSON.
Base URL
https://api.altovar.net/apiReplace your-auris-domain.com with the domain where your Auris instance is deployed. If you are using the Auris cloud service, your domain is the one shown in the Console under Settings → Custom Domains.
Authentication
Bearer Token
Most endpoints require a valid access token in the Authorization header:
Authorization: Bearer <access_token>Access tokens are short-lived JWTs (default 15 minutes) obtained through the authentication endpoints. They are signed with RS256 (or HS256 depending on configuration) and can be verified locally using the JWKS endpoint.
Access Level by Endpoint Type
Admin and management endpoints check permissions using the x-tenant header in combination with the Bearer token. The token’s roles are resolved and verified against the required permission before the request is processed.
Tenant Header
Auris is a multi-tenant platform. Requests to admin endpoints must include the tenant identifier:
x-tenant: <tenant-id>The tenant ID is the realm name configured in your Auris deployment. For the default installation, it is default. For custom tenant setups, it is the realm name shown in the Console under Settings → General.
If the header is omitted on endpoints that require it, the API returns 400 Bad Request with code MISSING_TENANT.
Request Format
Use Content-Type: application/json for all POST, PUT, and PATCH requests with a request body:
Content-Type: application/jsonExample request:
curl -X POST https://api.altovar.net/api/auth/login \
-H "Content-Type: application/json" \
-d '{"email": "[email protected]", "password": "secret"}'For file uploads (user import), use multipart/form-data.
Response Format
All API responses follow a consistent envelope format.
Success Response
{
"ok": true,
"data": { }
}The data field contains the result. Its shape varies by endpoint and is documented individually for each endpoint.
Error Response
{
"ok": false,
"error": {
"code": "ERROR_CODE",
"message": "Human-readable description of what went wrong."
}
}HTTP Status Codes
Common Error Codes
Pagination
List endpoints return paginated results using cursor-based page numbers.
Response Shape
{
"ok": true,
"data": {
"data": [],
"pagination": {
"page": 1,
"limit": 20,
"total": 143,
"totalPages": 8
}
}
}Query Parameters
Example:
GET /api/users?page=2&limit=50Rate Limiting
Every response includes rate limiting headers:
When a rate limit is exceeded, the API returns 429 Too Many Requests with a Retry-After header indicating how many seconds to wait before retrying.
Rate Limit Tiers
Auth and sensitive endpoints have additional per-account rate limits beyond the IP-based limits. Repeated failures on login trigger progressive lockout.
CORS
Cross-Origin Resource Sharing (CORS) is enforced on all API endpoints. Allowed origins must be registered in the Application settings in the Auris Console under Applications → [App] → Allowed Origins.
Preflight OPTIONS requests are handled automatically. Credentials (cookies) are allowed when the request origin is registered.
To register an origin:
- Go to Console → Applications
- Select your application
- Add the origin to Allowed Origins (e.g.,
https://app.yourdomain.com)
OIDC Discovery
Auris exposes a standard OpenID Connect Discovery document:
GET /.well-known/openid-configurationThis returns a JSON document containing all endpoint URLs, supported grant types, scopes, signing algorithms, and other metadata. Standard OIDC libraries use this to auto-configure themselves.
Example response fields:
{
"issuer": "https://api.altovar.net",
"authorization_endpoint": "https://api.altovar.net/api/oauth/authorize",
"token_endpoint": "https://api.altovar.net/api/auth/token",
"userinfo_endpoint": "https://api.altovar.net/api/auth/validate",
"jwks_uri": "https://api.altovar.net/.well-known/jwks.json",
"response_types_supported": ["code"],
"grant_types_supported": ["authorization_code", "client_credentials", "urn:ietf:params:oauth:grant-type:device_code", "urn:ietf:params:oauth:grant-type:token-exchange"],
"subject_types_supported": ["public"],
"id_token_signing_alg_values_supported": ["RS256", "HS256"],
"scopes_supported": ["openid", "profile", "email"]
}JWKS
Public signing keys used for JWT verification are available at:
GET /.well-known/jwks.jsonResponse:
{
"keys": [
{
"kty": "RSA",
"use": "sig",
"kid": "key-id-1",
"alg": "RS256",
"n": "...",
"e": "AQAB"
}
]
}Keys are cached by clients for up to 1 hour (Cache-Control: public, max-age=3600). Key rotation adds a new key to the set; old keys remain present until their issued tokens expire.
The Auris JS SDK (@auris/js) includes a built-in JWKS-based JWT verifier that automatically fetches and caches signing keys. See the SDK documentation for usage.
SDK Clients
Rather than calling the API directly, consider using an Auris SDK which handles token management, PKCE, refresh, and error handling automatically:
See the SDKs documentation for installation and usage guides.