Create a user with optional password + created_at
POST /admin/seed/users
Operator-tooling endpoint for the demo-seed loader.
NOT for general operator use — gated on system.admin;
not surfaced in the admin UI.
Creates a single user. Idempotency key is the supplied
username (UNIQUE in the user table) — a re-run with
the same username returns 200 with the existing row
instead of 409, so apply scripts can re-run safely
without first checking for prior state.
Apply scripts build a local username→ref map from the
returned ref and use it when seeding posts /
collections / comments that reference users by ref.
Emits one admin.seed.user_created audit per actual
insert (re-runs skip the audit — same pattern as
/admin/seed/comments).
Authorizations
Section titled “Authorizations ”Request Body required
Section titled “Request Body required ”object
Stable identifier across apply-script re-runs.
UNIQUE in the user table — duplicate request
returns 200 with the existing row instead of 409.
Optional plaintext password to hash + persist. When
omitted, the user is created with no password (the
password column is NULL) so they can’t log in —
useful for fictional seed users who exist as actors
on posts/comments but never sign in.
Legacy permission group. Defaults to 2 (regular user) when omitted. Set to 3 only for admin-tier seed users; the seed loader uses 2 for everything else by convention.
When true, the user is approved at create time (matching the regular CreateUser path). Seed users should almost always be approved; pending-approval state is a normal signup-flow concern, not a seed concern.
Optional creation timestamp. Defaults to NOW() when omitted. The seed loader uses this to align user “joined” dates with the 14-month interlaced timeline.
Responses
Section titled “ Responses ”Idempotent re-run — the supplied username already
exists; the existing row’s ref is returned
unchanged.
object
Server-assigned user.ref PK.
True on idempotent re-run (response status 200), false on fresh insert (response status 201).
User created.
object
Server-assigned user.ref PK.
True on idempotent re-run (response status 200), false on fresh insert (response status 201).
Malformed request
object
Human-readable error summary
Example
the request could not be completedAuthentication required, missing, or invalid
object
Human-readable error summary
Example
the request could not be completedExample
{ "error": "authentication required: sign in and retry with a valid session or API token"}Authenticated but missing required capabilities
object
Human-readable error summary
Example
the request could not be completed