<!-- Generated by scripts/build-docs.js. Edit docs/swagger.yaml or docs/guides/, then run `npm run docs:build`. -->

# List employees

`GET https://{apiId}.execute-api.us-west-1.amazonaws.com/{stage}/v1/users`

Module: Users · operationId: `listUsers` · Auth: `Authorization: Bearer <token>`
Web page: https://apidocs.sequipay.com/#/api/list-users

Returns the authenticated company's employees, paginated. By default only **current** employees are returned; soft-deleted and draft employees are never returned.

Requires the `users:read` scope.

## Query parameters

- `first_name` (string): Partial, case-insensitive match on first name. Example: `ali`.
- `last_name` (string): Partial, case-insensitive match on last name.
- `full_name` (string): Partial, case-insensitive match on the full name.
- `email` (string): Partial, case-insensitive match on email.
- `status` (string): `active` (default) returns current employees; `inactive` returns only terminated employees (end date passed). One of: `active`, `inactive`. Default: `"active"`.
- `onboarding_complete` (boolean): Filter by onboarding state. Truthy values (`1`, `true`, `yes`) return fully-onboarded employees; any other value returns the rest.
- `page` (integer): 1-based page number. Default: `1`. Minimum: 1.
- `per_page` (integer): Page size (max 200). Default: `20`. Minimum: 1. Maximum: 200.

## Example request

```bash
curl -X GET "https://{apiId}.execute-api.us-west-1.amazonaws.com/{stage}/v1/users" \
  -H "Authorization: Bearer $SEQUIFI_TOKEN"
```

## Responses

### 200: A page of employees.

- `status` (integer) Example: `200`.
- `message` (string) Example: `success`.
- `data` (object)
  - `users` (array of object)
    - `id` (integer (int64)) Example: `1024`.
    - `first_name` (string) Example: `Alice`.
    - `last_name` (string) Example: `Nguyen`.
    - `middle_name` (string, nullable) Example: `R`.
    - `name_suffix` (string, nullable) Example: `Jr`.
    - `email` (string (email), nullable) Example: `alice@acme.com`.
    - `worker_type` (string): Employment classification (Core `classification`). Example: `w2`.
    - `dob` (string (date), nullable) Example: `1990-05-01`.
    - `mobile_no` (string, nullable) Example: `555-0100`.
    - `home_address_line_1` (string, nullable) Example: `1 Main St`.
    - `home_address_line_2` (string, nullable) Example: `Apt 4`.
    - `home_address_city` (string, nullable) Example: `Austin`.
    - `home_address_state` (string, nullable) Example: `TX`.
    - `home_address_zip` (string, nullable) Example: `78701`.
    - `position_id` (integer (int64), nullable) Example: `7`.
    - `position_name` (string, nullable) Example: `Sales Rep`.
    - `status` (string): Derived from the end date — `inactive` once it has passed. One of: `active`, `inactive`.
    - `onboarding_complete` (boolean): True when the employee has verification steps and all are complete.
    - `start_date` (string (date), nullable) Example: `2024-01-15`.
    - `end_date` (string (date), nullable)
    - `pay_type` (string) Example: `salary`.
    - `created_at` (string (date-time), nullable) Example: `2024-01-15T12:00:00.000Z`.
    - `updated_at` (string (date-time), nullable) Example: `2024-06-01T09:30:00.000Z`.
  - `current_page` (integer) Example: `1`.
  - `per_page` (integer) Example: `20`.
  - `total` (integer) Example: `42`.
  - `last_page` (integer) Example: `3`.
  - `filters` (object): Echoes the filters actually applied.

### 401: Missing, invalid, expired, or revoked token (from the authorizer).

### 403: The token lacks the required scope.

```json
{
  "error": "insufficient_scope",
  "required": "users:read"
}
```

### 500: An infrastructure or data error. The endpoint fails closed — a 500, never a partial or empty-looking result.

```json
{
  "status": 500,
  "message": "internal error",
  "data": null
}
```
