Developer docs

API reference

Request and response fields for the APIs third-party systems call. The Base URL in examples follows the official address above.

Defaults to the deploy-time setting NUXT_PUBLIC_DOCS_API_BASE_URL ; if unset, it uses NUXT_PUBLIC_API_BASE_URL . Changes here only update local documentation examples and do not change server configuration.

HMAC signing

Open APIs no longer accept an API Secret header. Use the Secret returned once at client creation to compute HMAC-SHA256 and send it as X-Signature.

Header

FieldDescription
X-Tenant-IDRequiredTenant ID; must be a valid UUID
X-App-IDRequiredApplication ID delivered after approval
X-API-KeyRequiredAPI Key delivered after approval
X-TimestampRequiredUnix timestamp in seconds; 5-minute clock skew allowed by default
X-NonceRequired16–128 character URL-safe nonce (A-Za-z0-9_-), unique per request
X-SignatureRequiredHMAC-SHA256 of the canonical request, lowercase hex

Canonical request

Join the following fields in order with a newline. Keep the empty line even when the query string is empty:

canonical
HTTP_METHOD_UPPERCASE
ESCAPED_PATH
SORTED_QUERY_STRING
TENANT_ID
APP_ID
API_KEY
UNIX_TIMESTAMP
NONCE
LOWERCASE_HEX_SHA256_BODY

The HMAC key is the 32-byte SHA256(API_SECRET) digest, not the plaintext secret. Timestamps allow a 5-minute skew by default, and each nonce can be used only once. Long-term integrations should migrate to OAuth 2.0 client credentials.

Signing example

Node.js
const crypto = require('crypto')

function sign({ method, path, query, tenantId, appId, apiKey, secret, timestamp, nonce, body }) {
  const bodyHash = crypto.createHash('sha256').update(body || '').digest('hex')
  const canonical = [
    method.toUpperCase(),
    path,
    query,
    tenantId,
    appId,
    apiKey,
    String(timestamp),
    nonce,
    bodyHash,
  ].join('\n')
  const key = crypto.createHash('sha256').update(secret).digest()
  return crypto.createHmac('sha256', key).update(canonical).digest('hex')
}

Integration requests (public, no authentication required)

POST/api/v1/access-requestsNo auth

Submit an API access request

Publicly submit an access request. A pending request for the same email returns 409; success returns 201. The review result is emailed.

Authentication and current user (JWT)

POST/api/v1/auth/register/send-codeNo auth

Send registration email code

Sends a 6-digit email code. The same mailbox is rate-limited to once per 60 seconds, and the code expires in 10 minutes. Call this before register.

POST/api/v1/auth/registerNo auth

Register a new user

Register with an email code. username is 3–50 characters, password is at least 6 characters, email_code must be the 6-digit code just sent, and agree_terms must be true. Success returns 201.

POST/api/v1/auth/loginNo auth

Sign in a user and obtain an access token

username accepts a username or email. If the tenant requires MFA, the response may only include mfa_ticket until the challenge is completed.

GET/api/v1/users/meJWT Bearer

Get the current user

Returns the user object for the current JWT. The shape matches the user field from a successful login.

PUT/api/v1/users/meJWT Bearer

Update current user information

Direct updates to username, email, roles, departments, or positions are rejected. Those identity attributes require a verified workflow. This endpoint always returns 405.

PUT/api/v1/users/me/passwordJWT Bearer

Change the current user's password

Verifies the old password and sets a new one (at least 6 characters). Existing sessions may be revoked after success.

Application and client management

GET/api/v1/applicationsJWT Bearer

List applications

Lists applications in the current tenant. Requires JWT. page starts at 1; page_size defaults to 20.

POST/api/v1/api-clientsJWT Bearer

Create API client (Secret is returned only once)

Creates an open-API client. api_secret is returned in plaintext only in this response, then stored as a hash. allow_ips is the caller IP/CIDR allowlist.

POST/api/v1/api-clients/{id}/regenerate-secretJWT Bearer

Regenerate client secret

Invalidates the old secret and returns a new plaintext secret, also shown only once. Later signatures must use the new secret.

POST/api/v1/api-clients/validateJWT Bearer

Validate client credentials

Validates a client with App ID / API Key / Secret. Use this only for local testing. Production open APIs must use HMAC and must not send the plaintext secret.

Open APIs (HMAC signature authentication)

GET/api/v1/external/users/{id}HMAC signing

Get basic user information

Read basic profile by user ID. Open APIs are disabled by default, require HTTPS in production, and the caller IP must be on the client allowlist.

POST/api/v1/external/users/check-accessHMAC signing

Check whether a user can access an application

Checks whether the user has a valid grant for the application. has_access is false when there is no grant; authorization may be null.

POST/api/v1/external/third-party/find-userHMAC signing

Find a user by third-party account

Find a bound Auth-One user by third-party provider and user ID. Returns 404 when not found.

Health check

GET/healthNo auth

Process liveness check

Checks whether the HTTP process can serve traffic. No authentication required. Dependency readiness is exposed on the protected /readyz endpoint.