Skip to main content
Use these endpoints to create credential-based accounts, exchange credentials for a session, and log out. For SSO login redirects (Google/Microsoft) and integration OAuth, see OpenID & OAuth.

Basic request and response

Create a credentials-based account with POST /api/v1/auth/register.
curl -X POST "https://{BASE_URL}/api/v1/auth/register" \
  -H "Authorization: Bearer {API_TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "{username}",
    "password": "{password}",
    "roles": ["AppAdmin"]
  }'
{
  "id": "acct_6c8a1f3b2d4e5f7a",
  "email": "sasha@auroralabs.com",
  "name": "Sasha Patel",
  "given_name": "Sasha",
  "family_name": "Patel",
  "provider": "Credentials",
  "users": [
    {
      "id": "user_4b7c2a1d9e5f3c8b",
      "org_id": "org_2f3a9d1c7b5e4a8f",
      "account_id": "acct_6c8a1f3b2d4e5f7a",
      "name": "Sasha Patel",
      "email": "sasha@auroralabs.com",
      "state": "Active",
      "roles": ["AppAdmin"],
      "created_at": "2026-02-08T14:12:45Z"
    }
  ],
  "roles": ["AppAdmin"]
}

Log in with credentials

curl -X POST "https://{BASE_URL}/api/v1/auth/login" \
  -H "Authorization: Bearer {API_TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "{username}",
    "password": "{password}"
  }'
{
  "id": "acct_6c8a1f3b2d4e5f7a",
  "email": "sasha@auroralabs.com",
  "name": "Sasha Patel",
  "given_name": "Sasha",
  "family_name": "Patel",
  "provider": "Credentials",
  "users": [
    {
      "id": "user_4b7c2a1d9e5f3c8b",
      "org_id": "org_2f3a9d1c7b5e4a8f",
      "account_id": "acct_6c8a1f3b2d4e5f7a",
      "name": "Sasha Patel",
      "email": "sasha@auroralabs.com",
      "state": "Active",
      "roles": ["AppAdmin"],
      "created_at": "2026-02-08T14:12:45Z"
    }
  ],
  "roles": ["AppAdmin"]
}

Log out

curl -X POST "https://{BASE_URL}/api/v1/auth/logout" \
  -H "Authorization: Bearer {API_TOKEN}"
"ok"

Errors and edge cases

  • 401/403: missing or invalid API token.
  • 409: account already exists (register).
  • 429: too many login attempts.