Skip to content
Sealmetrics

    ↑↓ to move · Enter to open · Esc to close

    Docs menu

    API Reference

    Users API

    Manage the current user's profile and password via /users/me — most other user CRUD endpoints are superadmin-only

    Manage the current user's profile and password. Most CRUD endpoints under /users are superadmin-only — for adding people to an organization use the Organizations API (/organizations/{slug}/invitations); for granting them access to a specific site use /sites/{site_id}/users.

    Base path: /users

    Required scope: read for GETs, write for mutations.


    Current User

    Get Current User

    http
    GET /users/me

    Response:

    json
    {
      "success": true,
      "data": {
        "id": 42,
        "email": "alice@acme.com",
        "name": "Alice",
        "role": "user",
        "is_active": true,
        "email_verified_at": "2024-12-15T08:00:00Z",
        "last_login_at": "2025-01-08T13:55:00Z",
        "created_at": "2024-12-10T10:00:00Z",
        "account_ids": ["acme", "acme-staging"],
        "two_factor_enabled": true,
        "two_factor_enabled_at": "2024-12-20T17:30:00Z"
      }
    }

    Update Current User

    http
    PATCH /users/me

    Required scope: write

    Request Body:

    FieldTypeRequiredDescription
    namestringYes1-255 chars

    Returns the updated UserInfo.

    Change Password

    http
    POST /users/me/password

    Required scope: write

    Request Body:

    FieldTypeRequiredDescription
    current_passwordstringYesCurrent password (for re-authentication)
    new_passwordstringYes12-128 chars, must satisfy the platform password policy

    Response:

    json
    { "success": true, "data": { "message": "Password changed successfully" } }

    Admin Endpoints (superadmin only)

    The endpoints below require the superadmin role. Regular tokens get 403.

    List Users

    http
    GET /users
    ParameterTypeDefaultDescription
    pageinteger1Page number
    page_sizeinteger50Items per page (1-100)
    include_inactivebooleanfalseInclude inactive accounts

    Response:

    json
    {
      "success": true,
      "data": {
        "users": [ /* UserInfo objects */ ],
        "total": 1284
      }
    }

    Get User

    http
    GET /users/{user_id}

    Returns UserInfo or 404.

    Create User

    http
    POST /users

    Required scope: write

    For inviting people into a workspace, prefer org invitations. This endpoint creates a user record directly (used for tooling / bulk provisioning).

    Request Body:

    FieldTypeRequiredDescription
    emailstringYesValid email
    namestringYes1-255 chars
    roleenumNouser (default) or superadmin
    passwordstringYes12-128 chars
    account_idsstring[]NoSites the user should have access to (default [])

    Response (201 Created): UserInfo object.

    Update User

    http
    PATCH /users/{user_id}

    Required scope: write

    Request Body (all optional):

    FieldTypeDescription
    namestringNew name (1-255)
    roleenumuser or superadmin
    is_activebooleanActivate / deactivate

    Deactivate User

    http
    DELETE /users/{user_id}

    Required scope: write. Soft-deletes the user (sets is_active = false).

    Response:

    json
    { "success": true, "data": { "message": "User deactivated successfully" } }