Count the readers a mailing would reach
On this page
POST
/v1/audiences/estimateestimate_audience| Risk | read |
| Authentication | API key or OAuth access token |
| Scopes | audiences:read |
| Idempotency | natural: repeating the call gives the same result |
| Dry run | not applicable |
| Success status | 200 |
| Response type | application/json |
What it does#
- Use when: You want the size of an audience by lists or tag before drafting a mailing.
- Do not use when: you need the readers themselves (call list_subscribers).
- Side effects: None.
- Reversible: Not applicable, nothing changes.
- Required scope: audiences:read.
- Idempotency: safe to repeat.
- Typical next step: call create_mailing_draft with the same lists and tag.
Scopes#
audiences:read: Count how many readers a mailing would reach, without seeing any reader data.
Request#
Path parameters#
None.
Query parameters#
None.
Body (application/json)#
| Field | Type | Required | Description |
|---|---|---|---|
list_ids | array of string, max 50 items | no | |
tag | string, max 200 characters | no |
Response#
| Field | Type | Required | Description |
|---|---|---|---|
count | integer, min -9007199254740991, max 9007199254740991 | yes |
Examples#
tag#
Request:
curl -X POST 'https://api.seemly.com/v1/audiences/estimate' \
-H "Authorization: Bearer $SEEMLY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"tag": "arc-readers"
}'const response = await fetch("https://api.seemly.com/v1/audiences/estimate", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.SEEMLY_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"tag": "arc-readers"
}),
});
const result = await response.json();
console.log(response.status, result);import os
import requests
response = requests.post(
"https://api.seemly.com/v1/audiences/estimate",
headers={
"Authorization": f"Bearer {os.environ['SEEMLY_API_KEY']}",
},
json={
"tag": "arc-readers",
},
)
print(response.status_code, response.json())Response: 200:
{
"count": 120
}Errors#
Every error is an application/problem+json body with a code, a fix sentence and next_actions. See reading a problem response.