Skip to main content
Use Account endpoints to list accounts, manage account roles, reset passwords, and create or revoke API tokens. You can also list organizations linked to an account and join an organization by ID.

Basic request and response

List the accounts visible to your token with GET /api/v1/account.
curl "https://{BASE_URL}/api/v1/account" \
  -H "Authorization: Bearer {API_TOKEN}"
[
  {
    "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"]
  }
]

Get an account

curl "https://{BASE_URL}/api/v1/account/{accountID}" \
  -H "Authorization: Bearer {API_TOKEN}"
{
  "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"]
}

Update an account

curl -X POST "https://{BASE_URL}/api/v1/account/{accountID}" \
  -H "Authorization: Bearer {API_TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{}'
{
  "id": "acct_6c8a1f3b2d4e5f7a",
  "state": "Active",
  "email": "sasha@auroralabs.com",
  "name": "Sasha Patel",
  "profile_picture": "https://{BASE_URL}/s3/public/{ACCOUNT_ID}/media/account_picture.png",
  "provider": "Credentials",
  "roles": ["AppAdmin"]
}

Update your password

curl -X PUT "https://{BASE_URL}/api/v1/account/me" \
  -H "Authorization: Bearer {API_TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{
    "current_password": "{password}",
    "new_password": "{password}"
  }'
HTTP/1.1 204 No Content

Reset an account password

curl -X POST "https://{BASE_URL}/api/v1/account/{accountID}/reset-password" \
  -H "Authorization: Bearer {API_TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{
    "new_password": "{password}"
  }'
{
  "new_password": "Temp!Passw0rd2026"
}

List API tokens

curl "https://{BASE_URL}/api/v1/account/token" \
  -H "Authorization: Bearer {API_TOKEN}"
[
  {
    "name": "ci-deploy",
    "token": "v1---redacted",
    "hashed_token": "sha256:2b7f...",
    "token_email": "sasha@auroralabs.com",
    "last_used_at": "2026-02-08T13:58:10Z",
    "created_at": "2026-02-01T09:12:00Z",
    "valid_until": "2026-08-01T00:00:00Z"
  }
]

Create an API token

curl -X POST "https://{BASE_URL}/api/v1/account/token" \
  -H "Authorization: Bearer {API_TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "ci-deploy",
    "revoke_existing": false,
    "valid_until": "2026-08-01T00:00:00Z"
  }'
{
  "name": "ci-deploy",
  "token": "v1---redacted",
  "hashed_token": "sha256:2b7f...",
  "token_email": "sasha@auroralabs.com",
  "last_used_at": null,
  "created_at": "2026-02-08T14:22:00Z",
  "valid_until": "2026-08-01T00:00:00Z"
}

Revoke an API token

curl -X DELETE "https://{BASE_URL}/api/v1/account/token?token={tokenHash}" \
  -H "Authorization: Bearer {API_TOKEN}"
"ok"

List organizations for an account

curl "https://{BASE_URL}/api/v1/account/organization" \
  -H "Authorization: Bearer {API_TOKEN}"
[
  {
    "name": "Aurora Labs",
    "context": "Enterprise R&D and analytics.",
    "email_regex": ".*@auroralabs.com"
  }
]

Join an organization

curl -X POST "https://{BASE_URL}/api/v1/account/organization/{orgID}/join" \
  -H "Authorization: Bearer {API_TOKEN}"
{
  "id": "user_4b7c2a1d9e5f3c8b",
  "org_id": "org_2f3a9d1c7b5e4a8f",
  "account_id": "acct_6c8a1f3b2d4e5f7a",
  "name": "Sasha Patel",
  "email": "sasha@auroralabs.com",
  "state": "Active",
  "roles": ["AppMember"],
  "created_at": "2026-02-08T14:25:31Z"
}

Errors and edge cases

  • 401/403: missing or invalid API token.
  • 409: token name already exists.
  • 404: account or organization not found.