Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.7331.org/llms.txt

Use this file to discover all available pages before exploring further.

Permission Levels

Every user has a permission level that determines what admin actions they can perform. The hierarchy is strict — you can only act on users below your level (except Owners, who can act on each other).
LevelValueDescription
User0Default. Self-service only — manage own profile and sessions. Premium users can create chats.
Admin2Full admin panel. Can ban, delete, manage subscriptions, and assign permissions up to User.
Owner3Unrestricted. Can act on everyone including other Owners. Can assign permissions up to Admin.

What each level can access

User (level 0)

Public endpoints (no login required, just X-API-Key):
  • GET /statistics/users — View user count statistics
  • GET /statistics/bots — View bot count statistics by verification status
  • GET /statistics/chats — View active browser statistics
  • GET /statistics/app — View application-level statistics
  • GET /bots — List public bots
  • GET /bots/{id} — View a bot’s public profile
  • GET /users/{id} — View a user’s public profile
Authenticated endpoints (session cookie required):
  • GET /users/me — View own profile
  • GET /users/me/subscription — View own subscription status
  • GET /users/me/punishments — Own moderation action history
  • GET /users/me/sessions — List own sessions
  • POST /users/me/sessions/{token_suffix}/destroy — Revoke a session by its 6-character token suffix
  • GET /users/search — Search users (returns public profiles)
  • GET /bots/search — Search bots (returns public profiles)
Note: Session TTL varies by permission level — admin and above get 1-day sessions, while regular users get 30-day sessions.

Admin (level 2)

Everything a User can access, plus:
  • GET /bots/search — Search bots (full details)
  • GET /users/search — Search users (full details, only sees users below their level)
  • GET /users/{id} — Full user detail (no redaction, includes subscription history)
  • GET /bots/{id} — Full bot detail (owner, rate limits, type) Admin CLI (admin_tools.py) — all admin operations are CLI-only, not REST endpoints: user moderation (ban, unban, warn, timeout), permission management (promote, demote), bot management (create, set type), subscription management (grant, revoke), notifications (targeted/broadcast), and announcements (create, delete).

Owner (level 3)

Same as Admin, but:
  • Can act on all users including other Owners and Admins
  • Can assign permissions up to Admin (Admins can only assign up to User)

Subscription Tiers

Subscription tiers control feature access, not admin permissions. They apply to users and influence chat creation limits alongside permission level.
TierValueDurationDescription
Basic0Default. Standard features only.
Trial17 days (forced)One-time trial. Same access as Premium. Cannot be granted twice.
Premium2Set by adminPaid subscription with expiration date.
Lifetime3PermanentNever expires. subscription_expires_at is null.
  • has_premium is true for any active non-Basic tier (Trial, Premium, or Lifetime with valid expiry).
  • Expired Trial/Premium subscriptions are automatically downgraded to Basic by a background task.
  • Trial eligibility is checked via audit log history — once granted, it cannot be granted again.

Chat Creation Slots

Chat slots are determined by both permission level and subscription tier. Admins and Owners receive slots regardless of subscription status:
Role / TierChat Slots
Basic (User)0 — cannot create chats
Trial / Premium (User)1 chat
Admin5 chats (regardless of subscription)
OwnerUnlimited chats

User States

StateValueDescription
Active0Normal — can log in and use all features.
Timeout1Temporarily restricted — cannot execute commands.
Banned2Permanently blocked — cannot log in or interact.

Bot Types

TypeValueDescription
Official1First-party bots managed by the platform.
Verified2Third-party bots that passed review.
Community3Default — unverified community bots.

Bot API Access

Registered bots authenticate with X-API-Key and have their own set of endpoints:
  • GET /bot/me — View own bot profile
  • POST /bot/me/update — Update own info (name, avatar) and/or stats (users, latency) in a single call
  • POST /bot/batch — Batch report command executions
  • GET /bot/users/{user_id} — Look up a user
  • POST /bot/users/{user_id}/update — Update a user’s info (username, avatar) Bots are rate-limited per their rate_limit_per_hour setting (configured by admins).