Skip to main content
GET
/
v2
/
audiences
/
{id}
/
size
curl -X GET "https://app.tracklysms.com/api/v2/audiences/664f1a2b3c4d5e6f7a8b9c0d/size" \
  -H "X-Api-Key: trk_your_api_key_here"
{
  "audience_id": "664f1a2b3c4d5e6f7a8b9c0d",
  "size": 12480,
  "calculated_at": "2025-11-20T10:30:45"
}
Calculates the current number of contacts matching the audience’s filter in real time. This operation runs the filter query against your contact database and updates the audience’s cached_size and cached_size_updated_at fields.
Size calculations run in real time against your contact database. For audiences with complex filters or large contact lists, this may take several seconds to complete.

Path Parameters

id
string
required
The unique identifier of the audience.

Response Fields

audience_id
string
The audience ID that was calculated.
size
integer
The current number of contacts matching the audience filter.
calculated_at
datetime
Timestamp when the calculation was performed.

Examples

curl -X GET "https://app.tracklysms.com/api/v2/audiences/664f1a2b3c4d5e6f7a8b9c0d/size" \
  -H "X-Api-Key: trk_your_api_key_here"
{
  "audience_id": "664f1a2b3c4d5e6f7a8b9c0d",
  "size": 12480,
  "calculated_at": "2025-11-20T10:30:45"
}

Error Codes

HTTP StatusError CodeDescription
401unauthorizedAPI key is missing or invalid
404not_foundNo audience exists with the specified ID

Next Steps

Creating Audiences

Build and size audiences

Create Schedule

Schedule a campaign to your audience