## List customers `customers.list(CustomerListParams**kwargs) -> SyncPageNumberSchema[Data]` **get** `/v1/customers` Lists or searches customers connected to your account. All supported query parameters are optional. If none are provided, the response will include all customers connected to your account. This endpoint supports advanced sorting and filtering options. ### Parameters - `created_from: Optional[Union[str, datetime]]` Start date for filtering by `created_at` date. - `created_to: Optional[Union[str, datetime]]` End date for filtering by `created_at` date. - `email: Optional[str]` Filter customers by `email` address. - `external_id: Optional[str]` Filter by your system's `external_id`. - `name: Optional[str]` Filter customers by `name` (partial match). - `page_number: Optional[int]` Page number for paginated results. Starts at 1. - `page_size: Optional[int]` Number of results per page. Maximum: 1000. - `search_text: Optional[str]` General search term to filter customers. - `sort_by: Optional[Literal["name", "created_at"]]` - `"name"` - `"created_at"` - `sort_order: Optional[Literal["asc", "desc"]]` - `"asc"` - `"desc"` - `status: Optional[List[Literal["pending", "review", "verified", 2 more]]]` Filter customers by their current `status`. - `"pending"` - `"review"` - `"verified"` - `"inactive"` - `"rejected"` - `types: Optional[List[Literal["individual", "business"]]]` Filter by customer type `individual` or `business`. - `"individual"` - `"business"` - `correlation_id: Optional[str]` - `request_id: Optional[str]` - `straddle_account_id: Optional[str]` ### Returns - `Data` - `id: str` Unique identifier for the customer. - `created_at: datetime` Timestamp of when the customer record was created. - `email: str` The customer's email address. - `name: str` Full name of the individual or business name. - `phone: str` The customer's phone number in E.164 format. - `status: Literal["pending", "review", "verified", 2 more]` - `"pending"` - `"review"` - `"verified"` - `"inactive"` - `"rejected"` - `type: Literal["individual", "business"]` - `"individual"` - `"business"` - `updated_at: datetime` Timestamp of the most recent update to the customer record. - `external_id: Optional[str]` Unique identifier for the customer in your database, used for cross-referencing between Straddle and your systems. ### Example ```python import os from straddle import Straddle client = Straddle( api_key=os.environ.get("STRADDLE_API_KEY"), # This is the default and can be omitted ) page = client.customers.list() page = page.data[0] print(page.id) ``` #### Response ```json { "data": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "email": "dev@stainless.com", "name": "name", "phone": "+46991022", "status": "pending", "type": "individual", "updated_at": "2019-12-27T18:11:19.117Z", "external_id": "external_id" } ], "meta": { "api_request_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "api_request_timestamp": "2019-12-27T18:11:19.117Z", "max_page_size": 0, "page_number": 0, "page_size": 0, "sort_by": "sort_by", "sort_order": "asc", "total_items": 0, "total_pages": 0 }, "response_type": "object" } ```