Users

Users are every account in CMS Admin — staff (judges, BCC/OCC personnel, sheriffs, stenographers), and public accounts (Counsel, self-registered Users).

The user model

  • Name
    id
    Type
    string
    Description

    Unique UUID identifier for the user.

  • Name
    full_name
    Type
    string
    Description

    Computed full name (first, middle, last, suffix).

  • Name
    first_name
    Type
    string
    Description

    The user's first name.

  • Name
    middle_name
    Type
    string | null
    Description

    The user's middle name.

  • Name
    last_name
    Type
    string
    Description

    The user's last name.

  • Name
    suffix
    Type
    string | null
    Description

    Name suffix (e.g. Jr., Sr., III).

  • Name
    initials
    Type
    string
    Description

    Computed initials, used for avatar placeholders.

  • Name
    email
    Type
    string
    Description

    The user's primary email. Must be unique.

  • Name
    secondary_email
    Type
    string | null
    Description

    An alternate email address.

  • Name
    status
    Type
    string | null
    Description

    Account status.

  • Name
    contact_number
    Type
    string | null
    Description

    Contact phone number.

  • Name
    disabled_at
    Type
    timestamp | null
    Description

    When set, the account is disabled and all API requests return 403.

  • Name
    last_login_at
    Type
    timestamp | null
    Description

    Timestamp of the user's last successful login.

  • Name
    email_verified_at
    Type
    timestamp | null
    Description

    Timestamp when the email address was verified.

  • Name
    roles
    Type
    array<string>
    Description

    Names of the Spatie roles assigned to this user.

  • Name
    permissions
    Type
    array<string>
    Description

    Names of permissions the user has, direct or via role.

  • Name
    is_occ
    Type
    boolean
    Description

    Whether the user has the Office of the Court Clerk role.

  • Name
    is_bcc
    Type
    boolean
    Description

    Whether the user has the Branch of the Court Clerk or Judge role.

  • Name
    is_counsel
    Type
    boolean
    Description

    Whether the user has the Counsel role.

  • Name
    branches
    Type
    array
    Description

    Court branches this user is assigned to.

  • Name
    roll_number
    Type
    string | null
    Description

    Bar roll number, for Counsel/bar-member accounts.

  • Name
    law_firm
    Type
    string | null
    Description

    Law firm name, for Counsel accounts.

  • Name
    region_code
    Type
    string | null
    Description

    PSGC region code of the user's address (plus province_code, city_code, barangay).

  • Name
    avatar_url
    Type
    string | null
    Description

    URL to the user's avatar image.

  • Name
    created_at
    Type
    timestamp
    Description

    Timestamp when the account was created.

  • Name
    updated_at
    Type
    timestamp
    Description

    Timestamp when the account was last updated.


GET/api/users

List all users

Retrieve a paginated list of users. Accessible to Office of the Court Clerk, Super Admin, Branch of the Court Clerk, Counsel, and User roles (this is the one users action almost every account type can call).

Optional attributes

  • Name
    filter[search]
    Type
    string
    Description

    Search users by name or email.

Request

GET
/api/users
curl -G https://your-domain.com/api/users \
  -H "Accept: application/json" \
  -H "X-XSRF-TOKEN: {token}" \
  --cookie "cms_admin_session={session}" \
  --data-urlencode "filter[search]=santos"

Response

{
  "data": [
    {
      "id": "1a2b3c4d-5e6f-7890-1a2b-3c4d5e6f7890",
      "full_name": "Maria Santos",
      "email": "maria.santos@example.com",
      "roles": ["Branch of the Court Clerk"],
      "is_bcc": true,
      "disabled_at": null,
      "created_at": "2025-11-01T08:00:00+00:00"
    }
  ],
  "meta": {"current_page": 1, "last_page": 3, "total": 42}
}

POST/api/users

Create a user

Create a staff user account. Requires the Super Admin role.

Required attributes

  • Name
    first_name
    Type
    string
    Description

    The user's first name.

  • Name
    last_name
    Type
    string
    Description

    The user's last name.

  • Name
    email
    Type
    string
    Description

    Must be unique.

  • Name
    password
    Type
    string
    Description

    Minimum 6 characters, must be confirmed (password_confirmation).

Optional attributes

  • Name
    roles
    Type
    array
    Description

    Array of { "role_id": "..." } objects to assign on creation.

  • Name
    court_branch_id
    Type
    string
    Description

    Assigns the new user to a court branch.

Request

POST
/api/users
curl -X POST https://your-domain.com/api/users \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -H "X-XSRF-TOKEN: {token}" \
  --cookie "cms_admin_session={session}" \
  -d '{
    "first_name": "Roberto",
    "last_name": "Cruz",
    "email": "roberto.cruz@example.com",
    "password": "SecurePass123",
    "password_confirmation": "SecurePass123",
    "roles": [{"role_id": "role-uuid-here"}],
    "court_branch_id": "9c8d7e6f-5a4b-3210-9c8d-7e6f5a4b3210"
  }'

Response

{
  "data": {
    "id": "2b3c4d5e-6f7a-8901-2b3c-4d5e6f7a8901",
    "full_name": "Roberto Cruz",
    "email": "roberto.cruz@example.com",
    "roles": ["Branch of the Court Clerk"],
    "created_at": "2026-02-20T10:30:00+00:00"
  }
}

PUT/api/users/{user}

Update a user

Update a user's profile fields. Requires the Super Admin role.

Path parameters

  • Name
    user
    Type
    string
    Description

    The UUID of the user to update.

Required attributes

  • Name
    first_name
    Type
    string
    Description

    The user's first name.

  • Name
    last_name
    Type
    string
    Description

    The user's last name.

  • Name
    email
    Type
    string
    Description

    Must be unique, ignoring the current user.

Request

PUT
/api/users/{user}
curl -X PUT https://your-domain.com/api/users/2b3c4d5e-6f7a-8901-2b3c-4d5e6f7a8901 \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -H "X-XSRF-TOKEN: {token}" \
  --cookie "cms_admin_session={session}" \
  -d '{"first_name": "Roberto", "last_name": "Cruz Jr.", "email": "roberto.cruz@example.com"}'

Response

{
  "data": {
    "id": "2b3c4d5e-6f7a-8901-2b3c-4d5e6f7a8901",
    "full_name": "Roberto Cruz Jr.",
    "updated_at": "2026-02-20T11:00:00+00:00"
  }
}

DELETE/api/users/{user}

Delete a user

Delete a user account. Requires the Super Admin role.

Path parameters

  • Name
    user
    Type
    string
    Description

    The UUID of the user to delete.

Request

DELETE
/api/users/{user}
curl -X DELETE https://your-domain.com/api/users/2b3c4d5e-6f7a-8901-2b3c-4d5e6f7a8901 \
  -H "Accept: application/json" \
  -H "X-XSRF-TOKEN: {token}" \
  --cookie "cms_admin_session={session}"

Response

{
  "message": "User deleted successfully."
}

PUT/api/users/{user}/roles

Assign roles to a user

Assign one or more roles to a user, replacing their current role set. Requires the Super Admin role.

Path parameters

  • Name
    user
    Type
    string
    Description

    The UUID of the user.

Required attributes

  • Name
    roles
    Type
    array<string>
    Description

    Array of role names to assign.

Request

PUT
/api/users/{user}/roles
curl -X PUT https://your-domain.com/api/users/2b3c4d5e-6f7a-8901-2b3c-4d5e6f7a8901/roles \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -H "X-XSRF-TOKEN: {token}" \
  --cookie "cms_admin_session={session}" \
  -d '{"roles": ["Branch of the Court Clerk", "Stenographer"]}'

Response

{
  "data": {
    "id": "2b3c4d5e-6f7a-8901-2b3c-4d5e6f7a8901",
    "roles": ["Branch of the Court Clerk", "Stenographer"]
  }
}

PUT/api/users/{user}/branch

Assign a branch to a user

Assign a user to a court branch, scoping the branch-specific data they can see (hearings, sheriff's reports, TSN, etc.). Requires the Super Admin role.

Path parameters

  • Name
    user
    Type
    string
    Description

    The UUID of the user.

Required attributes

  • Name
    court_branch_id
    Type
    string
    Description

    Must reference an existing court branch.

Request

PUT
/api/users/{user}/branch
curl -X PUT https://your-domain.com/api/users/2b3c4d5e-6f7a-8901-2b3c-4d5e6f7a8901/branch \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -H "X-XSRF-TOKEN: {token}" \
  --cookie "cms_admin_session={session}" \
  -d '{"court_branch_id": "9c8d7e6f-5a4b-3210-9c8d-7e6f5a4b3210"}'

Response

{
  "data": {
    "id": "2b3c4d5e-6f7a-8901-2b3c-4d5e6f7a8901",
    "branches": [{"id": "9c8d7e6f-5a4b-3210-9c8d-7e6f5a4b3210", "name": "Branch 12"}]
  }
}

Was this page helpful?