Get the audience
SDK platic.campaigns.audience.get()
Read the contacts in a campaign audience, page by page.
Example
curl https://api.platic.ai/v1/campaigns/$CAMPAIGN_ID/audience \
-H "Authorization: Bearer $PLATIC_API_KEY" await platic.campaigns.audience.get("campaign_123"); Path parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
campaignId | string | Unique identifier of the campaign | required |
Query parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
limit | number | Contacts per page, from 1 to 500. Default: 50 | — |
pageToken | string | The nextPageToken from the previous page. Send it with the same sortBy, sortDirection, limit, and workspace | — |
sortBy | enum | Field to sort by: lastUpdate (default), creationDate, or name | — |
sortDirection | enum | Sort direction: desc (default) or asc | — |
workspace | string | Only if the credential covers several workspaces: the campaign's workspace. It is required there | — |
Response
{
"status": "success",
"data": [
{
"id": "client_abc001",
"phoneNumber": "521234567890",
"name": "Ana Smith",
"firstname": "Ana",
"lastname": "Smith",
"email": "ana.smith@example.com",
"birthdate": null,
"gender": "female",
"company": "Acme Inc.",
"country": "MX",
"state": "Jalisco",
"city": "Guadalajara",
"address": null,
"postalCode": null,
"tags": ["campaign-abc123", "Qualified lead"],
"owners": ["agent@acme.com"],
"customFields": {},
"creationDate": "2026-03-02T18:32:28.903Z",
"lastUpdate": "2026-03-05T16:54:25.221Z"
},
{
"id": "client_abc002",
"phoneNumber": "529876543210",
"name": "Carlos Mendoza",
"firstname": "Carlos",
"lastname": "Mendoza",
"email": null,
"birthdate": null,
"gender": null,
"company": null,
"country": null,
"state": null,
"city": null,
"address": null,
"postalCode": null,
"tags": ["campaign-abc123"],
"owners": [],
"customFields": {},
"creationDate": "2026-03-03T10:15:00.000Z",
"lastUpdate": "2026-03-03T10:15:00.000Z"
}
],
"nextPageToken": null
} Response fields
| Field | Type | Description |
|---|---|---|
data | array | The contacts on this page |
nextPageToken | string | null | Token to request the next page; null on the last one |
Each item in data
| Field | Type | Description |
|---|---|---|
id | string | Internal ID of the contact |
phoneNumber | string | Phone number in international format |
name | string | null | Full name of the contact |
firstname | string | null | First name of the contact |
lastname | string | null | Last name of the contact |
email | string | null | Email address |
birthdate | string | null | Birth date in ISO 8601 |
gender | string | null | Gender |
company | string | null | Company |
country | string | null | Country |
state | string | null | State |
city | string | null | City |
address | string | null | Address |
postalCode | string | null | Postal code |
tags | string[] | The contact's tags (includes the campaign's tag) |
owners | string[] | Emails of the users responsible for the contact |
customFields | object | The contact's custom fields |
creationDate | string | null | Creation date in ISO 8601 |
lastUpdate | string | null | Last update date in ISO 8601 |
Errors
| Status | details.code | When |
|---|---|---|
400 | INVALID_REQUEST | A parameter is not valid, the pageToken is not from this list (another order, another limit, or another workspace), or the credential covers several workspaces and workspace is missing or is not one of them (details.available lists the valid ones) |
401 | UNAUTHENTICATED | The credential is missing or invalid |
403 | FORBIDDEN | The credential does not have the Campaigns permission in that workspace |
404 | NOT_FOUND | The campaign does not exist in the workspace or was deleted |
{
"code": 400,
"error": "Bad Request - The request has validation errors",
"details": {
"code": "INVALID_REQUEST",
"message": "pageToken does not match the requested filters, sort or limit; restart pagination without it"
}
} See Errors for the full shape of an error.