Users
REST endpoints for users. Bearer-auth required.
GET /api/users
List users
Returns current user for regular users, all users for admins.
Query parameters
limit(optional): Max items per page (1–100, default 100).after(optional): Keyset cursor — return the page after this row (next page).before(optional): Keyset cursor — return the page before this row (prev page).ids(optional): Comma-separated IDs. Narrows results to these IDs within the caller's accessible scope (does not bypass access checks).role(optional): Filter by role (admin only — non-admins see themselves).email(optional): Case-insensitive substring match on email. Admins only.name(optional): Case-insensitive substring match on name. Admins only.
Response
JSON
{
"data": [
{
"id": "<...>",
"name": "<...>",
"email": "<...>",
"handle": "<...>",
"role": "<...>",
"emailVerified": "<...>",
"createdAt": "<...>"
}
],
"pageInfo": {
"total": "number",
"hasNextPage": "boolean",
"hasPreviousPage": "boolean",
"startCursor": "string",
"endCursor": "string"
}
}GET /api/users/{id}
Get user
Path parameters
id(required): The user's prefixed ID.
Response
JSON
{
"id": "string",
"name": "string",
"email": "string",
"handle": "string",
"role": "admin | user | service",
"emailVerified": "boolean",
"createdAt": "string"
}PATCH /api/users/{id}
Update user
Path parameters
id(required): The user's prefixed ID.
Request body
JSON
{
"name?": "string",
"handle?": "string",
"role?": "admin | user | service"
}Response
JSON
{
"id": "string",
"name": "string",
"email": "string",
"handle": "string",
"role": "admin | user | service",
"emailVerified": "boolean",
"createdAt": "string"
}DELETE /api/users/{id}
Delete user
Path parameters
id(required): The user's prefixed ID.
Response
JSON
{
"success": "boolean"
}GET /api/users/me
Get current user
Returns the authenticated user's profile. Resolves the bearer token / cookie session to the underlying user. Used by clients (mobile, CLI whoami) to render the signed-in identity without knowing the user's prefixed ID up front.
Response
JSON
{
"id": "string",
"name": "string",
"email": "string",
"handle": "string",
"role": "admin | user | service",
"emailVerified": "boolean",
"createdAt": "string"
}