---
title: "List customers"
method: GET
path: "/customers"
tags: ["Customers"]
---

# List customers

`GET /customers`

## Request

- Base URL: `https://api.togai.com`
- URL: `https://api.togai.com/customers`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/togaihq/apis/togai-apis/docs/customers/get.ts> (a function with typed inputs; its response is checked against the schema)

Returns a list of customers with pagination and sort.

## Query parameters

- `nextToken` string
- `pageSize` number

## Response `200`

Response for list customers request

- CustomerPaginatedResponse
  - `data` Customer[]
    - `id` string, required: Identifier of customer
    - `togaiCustomerId` string, required: Unique identifier of customer
    - `name` string, required: Name of the Customer
    - `primaryEmail` string, required: Primary email of the customer
    - `billingAddress` string, required: billing address of the customer
    - `address` Address, required: billing address of the customer
      - `phoneNumber` string: Contact number
      - `line1` string: Address line 1 (eg. Street, PO Box, Company Name)
      - `line2` string: Address line 2 (eg. apartment, suite, unit or building)
      - `postalCode` string: ZIP or postal code
      - `city` string: City, district, suburb, town or village
      - `state` string: State, county, province or region
      - `country` string: Two letter country code [ISO-3166-1 Alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)
    - `status` 'ACTIVE' | 'ARCHIVED', required: Status of the customer
    - `createdAt` string, date-time, required
    - `updatedAt` string, date-time, required
  - `nextToken` string
  - `context` PaginationOptions
    - `pageSize` integer
    - `sortOrder` 'ASC' | 'DESC'

## Other responses

- `400`: Error response
- `401`: Error response
- `403`: Error response
- `404`: Error response
- `429`: Error response
- `default`: Error response

## Changes

- **2024-03-01** `6fb940b0dad9`: 1 breaking, 1 info
  - the `data/items/primaryEmail` response property's maxLength was increased from `255` to `320` for the response status `200`
  - added the required property `data/items/togaiCustomerId` to the response with the `200` status
- **2023-11-03** `a6c96c5ec06e`: 1 info
  - added the optional property `data/items/address/phoneNumber` to the response with the `200` status
- **2023-09-02** `6b13f6f47735`: 1 breaking, 1 warning
  - removed the required property `data/items/togaiCustomerId` from the response with the `200` status
  - removed the optional property `data/items/address/phoneNumber` from the response with the `200` status

[Operation history](https://skmtc.dev/togaihq/apis/togai-apis/changes/customers/get.md)

---

[API](https://skmtc.dev/togaihq/apis/togai-apis.md) - [All operations](https://skmtc.dev/togaihq/apis/togai-apis/llms.txt) - [OpenAPI document](https://skmtc.dev/togaihq/apis/togai-apis/revisions/442f5d8f4aa0?raw)
