(GET) Get customers
Retrieve customers by ID or external ID. Supports pagination and sorting.
Endpoint
GET /customers
Retrieve customers by id or externalId. Supports pagination with take, skip, and sorting by createdAt.
Use this endpoint to list your customers, verify customer existence, or build customer management interfaces.
Endpoint text
GET /customersAuthentication
Requires an authorized credential with permission for customersRead. API keys are one supported credential; eligible OAuth or authenticated sessions may also authorize this operation.
Query Parameters
Request Limits
The `take` parameter supports values from 1 to 5,000. Requests above 5,000 are rejected.
Examples
Request cURL
curl -X GET "https://api.hoko.to/customers?take=50&sort=desc" \
-H "Authorization: Bearer <API_KEY>"Request JavaScript
const response = await fetch('https://api.hoko.to/customers?take=50&sort=desc', {
method: 'GET',
headers: {
Authorization: 'Bearer <API_KEY>'
}
});
const customers = await response.json();Response json
[
{
"id": "<customer_id>",
"externalId": "customer_123",
"name": "John Doe",
"email": "john@example.com",
"phone": "+1234567890",
"avatar": "https://example.com/avatar.jpg",
"createdAt": "2024-01-01T00:00:00Z",
"updatedAt": "2024-01-01T00:00:00Z"
}
]