curl --request GET \
--url http://localhost:3000/api/audience/{id}/contacts{
"data": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"organizationId": "123e4567-e89b-12d3-a456-426614174000",
"primaryPhone": "+212612345678",
"channels": [],
"createdAt": "2024-01-01T00:00:00.000Z",
"updatedAt": "2024-01-01T00:00:00.000Z",
"firstName": "John",
"lastName": "Doe",
"fullName": "John Doe",
"primaryEmail": "john@example.com",
"address": "123 Main St",
"city": "Casablanca",
"state": "Casablanca-Settat",
"zip": "20000",
"occupation": "Engineer",
"preferredChannel": "phone",
"gender": "male"
}
],
"meta": {
"page": 1,
"limit": 20,
"total": 150,
"totalPages": 8,
"hasNextPage": true,
"hasPreviousPage": false
}
}Get paginated list of contacts belonging to an audience. Supports search and sort.
curl --request GET \
--url http://localhost:3000/api/audience/{id}/contacts{
"data": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"organizationId": "123e4567-e89b-12d3-a456-426614174000",
"primaryPhone": "+212612345678",
"channels": [],
"createdAt": "2024-01-01T00:00:00.000Z",
"updatedAt": "2024-01-01T00:00:00.000Z",
"firstName": "John",
"lastName": "Doe",
"fullName": "John Doe",
"primaryEmail": "john@example.com",
"address": "123 Main St",
"city": "Casablanca",
"state": "Casablanca-Settat",
"zip": "20000",
"occupation": "Engineer",
"preferredChannel": "phone",
"gender": "male"
}
],
"meta": {
"page": 1,
"limit": 20,
"total": 150,
"totalPages": 8,
"hasNextPage": true,
"hasPreviousPage": false
}
}Audience UUID
Page number (1-based)
x >= 11
Number of items per page
1 <= x <= 10020
Search term to filter results
100"john"
Field to sort by
"createdAt"
Sort order
asc, desc "desc"