List Clients
This endpoint returns a page of clients for the authenticated account.
Endpoint
Section titled “Endpoint”GET /v1/clients/clientsAuthentication
Section titled “Authentication”Include your API key in the x-api-key header. See Authentication.
Required Scope
Section titled “Required Scope”clients:readQuery Parameters
Section titled “Query Parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
archived | string | No | "true" returns only archived clients. Any other value, or no value, returns only clients that are not archived. |
all | string | No | "true" returns archived and non-archived clients. When set, archived is ignored. |
page | string | No | 0-based page index. Defaults to 0. A non-numeric value is treated as 0. |
pageSize | string | No | Number of clients per page. Defaults to 25. There is no maximum. |
sortCol | string | No | One of clientName, clientDescription, createdAt, updatedAt. Requires sortDir. Invalid values are ignored. |
sortDir | string | No | asc or desc (not case-sensitive). Requires sortCol. Invalid values are ignored. |
See Pagination for paging and sorting rules.
Request Body
Section titled “Request Body”This endpoint does not accept a request body.
Example Request
Section titled “Example Request”curl "https://api.crewsum.com/v1/clients/clients?page=0&pageSize=25&sortCol=clientName&sortDir=asc" \ -H "x-api-key: $CREWSUM_API_KEY"const response = await fetch( "https://api.crewsum.com/v1/clients/clients?page=0&pageSize=25&sortCol=clientName&sortDir=asc", { headers: { "x-api-key": process.env.CREWSUM_API_KEY } },);const result = await response.json();GET /v1/clients/clients?page=0&pageSize=25&sortCol=clientName&sortDir=asc HTTP/1.1Host: api.crewsum.comx-api-key: <your-api-key>Response
Section titled “Response”On success, the API returns HTTP 200 OK.
Example Response
Section titled “Example Response”{ "message": "Successfully fetched clients", "data": { "clients": [ { "id": "client-ghi123jkl4567890", "name": "Client Name", "description": "A brief description of the client", "isArchived": false, "createdAt": "2026-01-05T15:30:00.000Z", "updatedAt": "2026-02-10T09:12:00.000Z", "isDeleted": false, "customFields": { "region": "west" } } ], "count": 1 }}Behavior
Section titled “Behavior”data.clientsholds the current page.data.countis the total number of clients that match the filters, across all pages.- Deleted clients are never returned.
- Without a valid
sortColandsortDirpair, clients are sorted byupdatedAtdescending, thencreatedAtdescending. Clients that were never updated (updatedAt: null) sort last. updatedAtisnullfor clients that were never updated.customFieldsis always present. It is{}when the client has no custom fields.
Error Responses
Section titled “Error Responses”| Status | Meaning |
|---|---|
500 | {"message": "Error fetching clients"}. Crewsum could not fetch clients. |
Authentication and scope failures are described in Errors.
Related Webhooks
Section titled “Related Webhooks”This endpoint does not trigger a webhook.