---
title: "Query users"
method: POST
path: "/users/search"
tags: ["Users"]
---

# Query users

`POST /users/search`

Use when listing or searching service accounts in an admin UI, or when auditing who has API access and which roles they have.

## Request body

- TypesUserFilter
  - `end_time` string, date-time
  - `expand` string
  - `filters` TypesFilterCondition[] — filters allows complex filtering based on multiple fields
    - `data_type` 'string' | 'number' | 'date' | 'array'
    - `field` string
    - `operator` 'eq' | 'contains' | 'not_contains' | 'gt' | 'lt' | 'gte' | 'in' | 'not_in' | 'before' | 'after'
    - `value` TypesValue
      - `array` string[]
      - `boolean` boolean
      - `date` string
      - `number` number
      - `string` string
  - `limit` integer
  - `offset` integer
  - `order` 'asc' | 'desc'
  - `roles` string[]
  - `sort` TypesSortCondition[]
    - `direction` 'asc' | 'desc'
    - `field` string
  - `start_time` string, date-time
  - `status` 'published' | 'deleted' | 'archived'
  - `type` 'user' | 'service_account'
  - `user_ids` string[] — Specific filters for users

## Response `200`

OK

- ListUsersResponse
  - `items` UserResponse[]
    - `email` string — Empty for service accounts
    - `id` string
    - `metadata` object
    - `name` string
    - `roles` string[]
    - `tenant` TenantResponse
      - `billing_details` TenantBillingDetails
        - `address` Address
          - `address_city` string
          - `address_country` string
          - `address_line1` string
          - `address_line2` string
          - `address_postal_code` string
          - `address_state` string
        - `email` string
        - `help_email` string
        - `phone` string
      - `created_at` string, date-time
      - `id` string
      - `metadata` TypesMetadata
      - `name` string
      - `status` string
      - `updated_at` string, date-time
    - `type` 'user' | 'service_account'
  - `pagination` TypesPaginationResponse
    - `limit` integer
    - `offset` integer
    - `total` integer

## Other responses

- `400` — Invalid request
- `500` — Server error

---

[API](https://skmtc.net/flexprice/apis/flexprice-api.md) · [All operations](https://skmtc.net/flexprice/apis/flexprice-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/flexprice/flexprice-api/revisions/f0601ed97bd3/schema)
