Admin: Seed Account
Bootstrap the first admin account.
Creates or updates a user account by email. Protected by a static shared secret (LAUNCH_ADMIN_SEED_KEY) rather than a session — intended for bootstrapping the first admin account and automated test environment setup.
Disable in production after initial bootstrap
This endpoint can create and promote admin accounts using only a static key. Once the first admin account is live, set LAUNCH_ADMIN_SEED_KEY to an empty string in your production environment to permanently disable this endpoint.
/api/admin/seed-test-accountAuthentication
Pass the value of LAUNCH_ADMIN_SEED_KEY in the X-Seed-Keyrequest header. Does not require a session.
Request Body
| Field | Required | Description |
|---|---|---|
| Yes | Email address for the account | |
| password | Yes | Password (min 12 chars, stored bcrypt) |
| name | No | Display name |
| role | No | user (default) or admin |
Usage
# Bootstrap the first admin
curl -X POST https://cifp.vril.dev/api/admin/seed-test-account \
-H "X-Seed-Key: $LAUNCH_ADMIN_SEED_KEY" \
-H "Content-Type: application/json" \
-d '{
"email": "admin@vril.dev",
"password": "StrongPassword123!",
"name": "Platform Admin",
"role": "admin"
}'
# Response (create):
# { "created": true, "email": "admin@vril.dev" }
# Response (update if already exists):
# { "updated": true, "email": "admin@vril.dev" }Upsert Behaviour
If an account with the given email already exists, its password and role are updated in place. All other account data (tenant, proxies, etc.) is preserved.
Disabling in Production
# In your production environment's secret manager (Vercel env, etc.)
# Set LAUNCH_ADMIN_SEED_KEY to empty — this causes the endpoint to return 403 for all requests
LAUNCH_ADMIN_SEED_KEY=