Skip to main content

Organization User Management

Enterprise organizations can manage two types of users from a single interface: Service Accounts for programmatic API access, and Managed Users who log in to the platform with email and password.

User Types​

TypeAuthenticationUse Case
Service AccountAPI tokensPipelines, automated processes, downstream client integrations
Managed UserEmail + password (OAuth)Team members, collaborators, or clients who need platform access

Both types are managed from the Organization Users page and share the same lifecycle (create, suspend, reactivate).

Prerequisites​

  • An Enterprise plan with the Client role enabled for your organization.
  • For managed users: the organization's identity provider (Authentik) must have a recovery email flow configured.

The Organization Users section is available under Organization in the left sidebar. This section only appears for organizations on the Enterprise plan.

  1. Click your organization name in the sidebar.
  2. Select API Users from the Organization group.

Organization Users page showing both service accounts and managed users

The table displays all organization users with their type (Service Account or Managed User), status (Active, Suspended or Locked), and creation date.

Creating a User​

Click New user in the top-right corner. A two-step wizard guides you through the process.

Step 1: Choose Type​

Select the type of user you want to create:

  • Service Account — For pipelines and automated processes. Authenticates with API tokens.
  • Managed User — For people who log in with email and password via the platform.

New user wizard — Step 1: Choose Type

Click Next after selecting a type.

Step 2: Fill in Details​

The form fields depend on the user type you selected.

Service Account Fields​

FieldDescriptionExample
EmailA unique identifier for the service account. Does not need to be a real mailbox.pipeline-bot@yourcompany.com
DescriptionOptional note describing the purpose.Nightly ingestion pipeline

Managed User Fields​

FieldDescriptionExample
EmailThe user's real email address. They will receive a password reset link here.jane.doe@yourcompany.com
First NameThe user's first name.Jane
Last NameThe user's last name.Doe

New user wizard — Step 2: Managed User form

Click Create User to finalize.

What happens on creation:

  • Service Account: Created in the local database. You can immediately issue API tokens.
  • Managed User: Created in both the local database and the identity provider (Authentik). A password reset email is sent automatically so the user can set their credentials and log in.
tip

For managed users, the password reset email is sent immediately after creation. If the user doesn't receive it, you can resend it from the user detail panel.

Managing Service Accounts​

Service accounts authenticate via API tokens. Click View on a service account to open the detail panel.

Service account detail panel with token management

Issuing an API Token​

  1. Click View on the service account.
  2. Under API Tokens, click Issue token.
  3. Configure the token:
FieldOptionsRecommendation
NameA descriptive label.Use the client name or integration name (e.g., Acme Production Token).
ScopeRead-only (api-key) or Read + write (api-secret).Use Read-only for clients who only need to search and read documents.
ExpiryNever, 30 days, 90 days, or 1 year.Set an expiry that matches your contract renewal cycle.
  1. Click Issue token.
Copy the token immediately

The token value is displayed only once. Copy it and store it securely before closing the dialog. If you lose the token, you will need to issue a new one.

Using the Token​

The API token authenticates as the service account user. Use it as a Bearer token in API requests:

curl -H "Authorization: Bearer oat_YOUR_TOKEN" https://api.alien.club/datasets

For MCP server access, configure the token in your AI tool's MCP settings:

{
"mcpServers": {
"your-documents": {
"type": "http",
"url": "https://mcp.yourcluster.alien.club/mcp",
"headers": {
"Authorization": "Bearer oat_YOUR_TOKEN"
}
}
}
}

Rotating a Token​

To rotate without interrupting service:

  1. Issue a new token.
  2. Send the new token to the consumer.
  3. Once they've switched, revoke the old one by clicking the trash icon.
Zero-downtime rotation

Issue the new token before revoking the old one. This gives consumers time to update their configuration without authentication failures.

Revoking a Token​

Click the revoke button (trash icon) next to any token. Revocation is immediate — any request using the revoked token receives a 401 Unauthorized response.

Managing Managed Users​

Managed users log in to the platform with email and password via OAuth. Click View on a managed user to open the detail panel.

Managed user detail panel with password management

Password Management​

The detail panel shows a Password Management section with a Send Reset Password Email button. Use this to:

  • Let a newly created user set their initial password (the email is sent automatically on creation, but you can resend it).
  • Help a user who has forgotten their password.
  • Force a password rotation for security purposes.

The reset email is sent through the identity provider (Authentik) and contains a link to set a new password.

How Managed Users Log In​

After setting their password via the reset link, managed users can log in through the standard platform login page. They authenticate via OAuth with the identity provider and land in the organization with the Client role.

Suspending a User​

To cut off a user's access:

  1. Find the user in the table.
  2. Click the deactivate button (trash icon).
  3. Choose the kind of suspension, optionally write a message for the user, and confirm.

There are two kinds of suspension:

KindWhat it doesTypical use
Temporary (default)The account keeps its API keys and its login. Every call it makes is refused with 402 Payment Required and your message, until you reactivate it.An unpaid or exhausted subscription: the client sees why, and resumes with the same keys once settled.
PermanentA Service Account has all its tokens revoked immediately. A Managed User is deactivated in the identity provider and can no longer log in. Every call is refused with 401 and your message.Terminating access for good.

The message (up to 500 characters) is returned verbatim to the suspended user on every refused call, on the REST API and through the MCP servers, so write it for them: who to contact, what to do. It is distinct from the internal reason, which is only kept for your audit trail.

The user record is preserved and shows a Suspended (temporary) or Locked (permanent) status in the table.

A permanently suspended user cannot be switched to a temporary suspension: reactivate them first.

Reactivating a User​

To restore a suspended user:

  1. Find the suspended or locked user in the table.
  2. Click the reactivate button (unlock icon).
  3. Confirm the reactivation.

What happens on reactivation:

  • After a temporary suspension: the account's existing API keys work again and a managed user can log in again. Nothing needs to be re-issued.
  • After a permanent suspension: a Service Account is unlocked but has no tokens left, you need to issue new tokens. A Managed User is unlocked locally and reactivated in the identity provider, and can log in again with their existing password.

Managing Users From the API​

Everything above is also available to your own systems through the Platform API, with the same permissions as the UI (an api-secret token of an organization admin, on an Enterprise organization). The operations are documented under Users & Organizations in the Platform API reference:

ActionCall
List all your users and service accounts, with their suspension stateGET /organizations/{organization_id}/users
Create a user or service accountPOST /organizations/{organization_id}/users
Suspend (kind, message, reason in the body, all optional)DELETE /organizations/{organization_id}/users/{user_id}
ReactivatePATCH /organizations/{organization_id}/users/{user_id}
Mint, list and revoke a service account's tokensPOST / GET / DELETE under /organizations/{organization_id}/users/{user_id}/tokens
Send a password reset email to a managed userPOST /organizations/{organization_id}/users/{user_id}/reset-password

Every user carries a stable integer id, which is the key to use in your own records. The listing returns isLocked, suspensionKind (temporary, permanent or null) and lockMessage for each account.

# Suspend a service account until its subscription is renewed
curl -X DELETE https://api.alien.club/organizations/58/users/712 \
-H "Authorization: Bearer $ORG_ADMIN_TOKEN" \
-H "Content-Type: application/json" \
-d '{"kind": "temporary", "message": "Your subscription has expired, contact billing@your-company.example to renew."}'

# Every call the account makes now answers 402 with that message
# {"success": false, "message": "Your subscription has expired, ...", "error": {"status": 402, "name": "PaymentRequired", "data": {"kind": "temporary"}}}

# Reactivate, the same API key works again
curl -X PATCH https://api.alien.club/organizations/58/users/712 \
-H "Authorization: Bearer $ORG_ADMIN_TOKEN"

Reading Consumption per Account​

To bill or meter your own clients, read your organization's consumption as one event per action, whatever the number of technical calls the platform fanned the action out into:

GET /organizations/{organization_id}/consumption/events

Each event carries a stable, strictly increasing id, the user who made the call (the same id as in the user listing), the action (keyword-search, get-entry-content, ...), the datasets touched, resultCount and entryRefs (how many entries came back and their references), and cost, the exact amount the ledger charged in euros, the same cost envelope every metered response carries. Failed calls are listed with success: false and an empty cost, so you can exclude them.

The feed is read with a cursor, which makes incremental polling simple and safe:

  1. Call once without after and store pageInfo.endCursor.
  2. On every poll, call with after=<stored cursor> and first=200, process the events, and store the new endCursor while pageInfo.hasNextPage is true.
  3. Nothing younger than watermark (60 seconds behind the clock) is served, so a cursor never skips an action and no event is delivered twice.

userId, start, end and sourceType narrow the feed. The read needs an api-secret token of an organization admin (the same gate as GET .../balance).

curl "https://api.alien.club/organizations/58/consumption/events?after=$CURSOR&first=200" \
-H "Authorization: Bearer $ORG_ADMIN_TOKEN"

Use Cases​

Reselling AI-Powered Document Access​

Create Service Accounts for each business client. Issue scoped API tokens so clients can query your MCP server programmatically. Track usage per client for billing.

Inviting Collaborators to the Platform​

Create Managed Users for team members or external collaborators who need to browse datasets, run searches, or manage workflows through the platform UI.

Hybrid Access​

Some clients need both: a managed user account for their team to explore data in the UI, and a service account for their automated pipeline. Create one of each.

Important Considerations​

  • One user per identity. Each person or service should have their own user. This ensures proper usage attribution and independent access control.
  • Service accounts cannot log in. They authenticate exclusively via API tokens.
  • Managed users cannot hold API tokens. Token operations are only available for service accounts.
  • Scope tokens appropriately. Use Read-only scope unless write access is genuinely needed.
  • Set token expiry. Tokens without expiry are convenient but pose a security risk if leaked.
  • Monitor last-used dates. Tokens that have not been used recently may indicate a lost token or abandoned integration.
  • Deactivation is not deletion. Deactivated users are preserved for audit purposes with a Locked status.

What's Next​