Skip to content

Users API

Endpoints for user management. All endpoints require a valid user session.

Get Current User

GET /v1/users/me

Authentication: User session (Bearer)

Response 200 OK

json
{
  "id": "user_abc123",
  "email": "[email protected]",
  "display_name": "Jane Developer",
  "role": "developer",
  "status": "active",
  "avatar_url": "https://lh3.googleusercontent.com/...",
  "created_at": 1738800000,
  "updated_at": 1738800000
}

List Users

GET /v1/users

Authentication: User session (Bearer, owner/admin)

Response 200 OK

Returns an array of user objects.


Invite User

POST /v1/users/invite

Authentication: User session (Bearer, owner/admin)

Request body

json
{
  "email": "[email protected]",
  "role": "developer"
}
FieldTypeRequiredDescription
emailstringYesEmail address (must match OIDC provider account)
rolestringYesRole to assign: admin, developer, or qa_viewer

Response 200 OK

Returns the created user object with invited status.

Error responses

StatusCodeDescription
400invalid_inputInvalid email or role
403forbiddenInsufficient permissions
409already_existsUser with this email already exists

Update User Role

PATCH /v1/users/{user_id}/role

Authentication: User session (Bearer, owner/admin)

Request body

json
{
  "role": "admin"
}
FieldTypeRequiredDescription
rolestringYesNew role: admin, developer, or qa_viewer

Response 200 OK

Returns the updated user object.

Error responses

StatusCodeDescription
400invalid_inputInvalid role value
403forbiddenInsufficient permissions
404not_foundUser not found

Disable User

Disable a user account. The user's sessions are invalidated and they cannot sign in.

DELETE /v1/users/{user_id}

Authentication: User session (Bearer, owner/admin)

Response 200 OK

Returns the updated user object with disabled status.

Error responses

StatusCodeDescription
403forbiddenInsufficient permissions
404not_foundUser not found

INFO

This endpoint disables the user rather than permanently deleting them. User records are preserved for the audit trail.


Re-enable User

Re-enable a previously disabled user account.

POST /v1/users/{user_id}/enable

Authentication: User session (Bearer, owner/admin)

Response 200 OK

Returns the updated user object with active status.

Error responses

StatusCodeDescription
403forbiddenInsufficient permissions
404not_foundUser not found

Self-hosted mobile CI, built for Flutter.