Before making any write request, call
GET /auth/csrf-token to obtain a CSRF token and include it in the x-csrf-token header alongside your session cookie.Authentication
All admin user endpoints require:- A valid
sessioncookie (obtained viaPOST /auth/login) - ADMIN or SUPER_ADMIN role
x-csrf-tokenheader on all PATCH requests
List Customers
Retrieve a paginated list of user accounts. You can filter by account status, search by name or email, include soft-deleted accounts, and sort by name, email, or creation date.GET /admin/users
integer
default:"1"
Page number (1-based).
integer
default:"20"
Items per page. Minimum 1, maximum 100.
string
Free-text search against name and email fields (trimmed, max 100 characters).
string
Filter by account status. One of
ACTIVE, SUSPENDED, or DELETED.string
default:"false"
Set to
"true" to include soft-deleted accounts in results.string
default:"-created_at"
Sort field. Prefix with
- for descending order. Options: name, -name, email, -email, created_at, -created_at.200 OK
Get User Detail
Fetch the full profile for a specific user account by their public ID.GET /admin/users/{user_public_id}
string
required
The user’s public ID (prefix:
usr_).200 OK
Update User
Update a customer’s contact details. You can update first name, last name, email, and phone number. Changing email or phone triggers reverification for the affected field and creates an audit entry. Supply at least one field.PATCH /admin/users/{user_public_id}
string
required
The user’s public ID (prefix:
usr_).string
Updated first name. 1–100 characters.
string
Updated last name. 1–100 characters.
string
Updated email address. Triggers reverification. Must be unique.
string
Updated phone number in E.164 format (e.g.
+14155552671). Triggers reverification.PATCH /admin/users/{user_public_id}/suspend to immediately prevent a user from logging in. All active sessions are revoked upon suspension.
200 OK (suspend or activate)
Change User Role
Promote a customer to ADMIN, or demote an admin back to CUSTOMER. You cannot change a SUPER_ADMIN’s role via the API — that operation is CLI-only.PATCH /admin/users/{user_public_id}/role
Role changes require the SUPER_ADMIN role. ADMIN-level sessions will receive a
403 Forbidden response. SUPER_ADMIN accounts cannot be modified through this endpoint; use the CLI for that operation.string
required
The user’s public ID (prefix:
usr_).string
required
The new role for the user. Must be
"CUSTOMER" or "ADMIN".200 OK
Endpoint Summary
GET /admin/users
List all customer accounts with filtering, search, and pagination.
GET /admin/users/:id
Retrieve a single user’s full profile by public ID.
PATCH /admin/users/:id
Update a user’s contact details. Triggers reverification for email or phone changes.
PATCH /admin/users/:id/role
Promote or demote a user’s role. Requires SUPER_ADMIN.
PATCH /admin/users/:id/suspend
Suspend an account and revoke all active sessions immediately.
PATCH /admin/users/:id/activate
Restore a suspended account and re-enable login.