---
title: "Query customers"
method: POST
path: "/customers/search"
tags: ["Customers"]
---

# Query customers

`POST /customers/search`

Use when listing or searching customers (e.g. admin CRM or reporting). Returns a paginated list; supports filtering and sorting.

## Request body

- TypesCustomerFilter
  - `customer_ids` string[]
  - `email` string
  - `end_time` string, date-time
  - `expand` string
  - `external_id` string
  - `external_ids` string[]
  - `filters` TypesFilterCondition[]
    - `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
  - `metadata` object
  - `offset` integer
  - `order` 'asc' | 'desc'
  - `sort` TypesSortCondition[]
    - `direction` 'asc' | 'desc'
    - `field` string
  - `start_time` string, date-time
  - `status` 'published' | 'deleted' | 'archived'

## Response `200`

OK

- ListCustomersResponse — Response object for listing customers with pagination
  - `items` CustomerResponse[]
    - `address_city` string — AddressCity is the city of the customer's address
    - `address_country` string — AddressCountry is the country of the customer's address (ISO 3166-1 alpha-2)
    - `address_line1` string — AddressLine1 is the first line of the customer's address
    - `address_line2` string — AddressLine2 is the second line of the customer's address
    - `address_postal_code` string — AddressPostalCode is the postal code of the customer's address
    - `address_state` string — AddressState is the state of the customer's address
    - `contact` string — Contact is an optional contact number for the customer (e.g. phone)
    - `created_at` string, date-time
    - `created_by` string
    - `email` string — Email is the email of the customer
    - `environment_id` string — EnvironmentID is the environment identifier for the customer
    - `external_id` string — ExternalID is the external identifier for the customer
    - `id` string — ID is the unique identifier for the customer
    - `integrations` EntityIntegrationMappingResponse[]
      - `created_at` string, date-time
      - `created_by` string
      - `entity_id` string
      - `entity_type` 'customer' | 'plan' | 'invoice' | 'subscription' | 'payment' | 'credit_note' | 'addon' | 'item' | 'item_price' | 'price' | 'invoice_line_item'
      - `environment_id` string
      - `id` string
      - `metadata` object
      - `provider_entity_id` string
      - `provider_type` string
      - `status` 'published' | 'deleted' | 'archived'
      - `tenant_id` string
      - `updated_at` string, date-time
      - `updated_by` string
    - `metadata` object — Metadata
    - `name` string — Name is the name of the customer
    - `status` 'published' | 'deleted' | 'archived'
    - `tenant_id` string
    - `timezone` string — Timezone is the customer's IANA timezone name (e.g. "Asia/Kolkata"). Defaults to "UTC". Inherited by subscriptions at creation time.
    - `updated_at` string, date-time
    - `updated_by` string
  - `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/versions/f0601ed97bd3/schema)
