Audience filters
Saved filters: AND/OR rules on fields, engagement and events. Send an issue to the matching contacts only.
- GET /audience-filters — List saved filters
- POST /audience-filters — Create a saved filter
- GET /audience-filters/{id} — Retrieve a saved filter
- PATCH /audience-filters/{id} — Update a saved filter
- DELETE /audience-filters/{id} — Delete a saved filter
- POST /audience-filters/count — Count matching contacts
get/audience-filters— List saved filters
Keys: full_access
Query parameters
| limit | integer | 1–100, default 20. |
| after | uuid | Id of the last item of the previous page (older items). |
| before | uuid | Id of the first item of the previous page (newer items). |
curl -X GET https://api.smartletter.ai/audience-filters \
-H "Authorization: Bearer $SMARTLETTER_API_KEY"Response 200
{
"object": "list",
"has_more": false,
"data": [
{
"object": "audience_filter",
"id": "8e5b1f70-0000-4000-8000-000000000007",
"name": "Active pros",
"description": null,
"rules": {
"op": "and",
"rules": [
{
"field": "custom.plan",
"op": "eq",
"value": "pro"
},
{
"event": "email.clicked",
"op": "performed",
"within_days": 30
}
]
},
"created_at": "2026-10-17T09:00:00.000Z",
"updated_at": "2026-10-17T09:00:00.000Z"
}
]
}post/audience-filters— Create a saved filter
Rules up to 3 levels deep, 30 conditions. Guide: /docs/personalization.
Keys: full_access
Body
| namerequired | string | |
| description | string | |
| rulesrequired | object | AND/OR tree: `{"op":"and","rules":[{"field":"custom.plan","op":"eq","value":"pro"},{"event":"email.clicked","op":"performed","within_days":30}]}`. See the guide. |
curl -X POST https://api.smartletter.ai/audience-filters \
-H "Authorization: Bearer $SMARTLETTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"Active pros","rules":{"op":"and","rules":[{"field":"custom.plan","op":"eq","value":"pro"},{"event":"email.clicked","op":"performed","within_days":30}]}}'Response 201
{
"object": "audience_filter",
"id": "8e5b1f70-0000-4000-8000-000000000007",
"name": "Active pros",
"description": null,
"rules": {
"op": "and",
"rules": [
{
"field": "custom.plan",
"op": "eq",
"value": "pro"
},
{
"event": "email.clicked",
"op": "performed",
"within_days": 30
}
]
},
"created_at": "2026-10-17T09:00:00.000Z",
"updated_at": "2026-10-17T09:00:00.000Z"
}get/audience-filters/{id}— Retrieve a saved filter
Keys: full_access
curl -X GET https://api.smartletter.ai/audience-filters/<id> \
-H "Authorization: Bearer $SMARTLETTER_API_KEY"Response 200
{
"object": "audience_filter",
"id": "8e5b1f70-0000-4000-8000-000000000007",
"name": "Active pros",
"description": null,
"rules": {
"op": "and",
"rules": [
{
"field": "custom.plan",
"op": "eq",
"value": "pro"
},
{
"event": "email.clicked",
"op": "performed",
"within_days": 30
}
]
},
"created_at": "2026-10-17T09:00:00.000Z",
"updated_at": "2026-10-17T09:00:00.000Z"
}patch/audience-filters/{id}— Update a saved filter
An issue already scheduled picks up the new rules when it starts sending.
Keys: full_access
Body
| name | string | |
| description | string | |
| rules | object | AND/OR tree: `{"op":"and","rules":[{"field":"custom.plan","op":"eq","value":"pro"},{"event":"email.clicked","op":"performed","within_days":30}]}`. See the guide. |
curl -X PATCH https://api.smartletter.ai/audience-filters/<id> \
-H "Authorization: Bearer $SMARTLETTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"Active pros (30 days)"}'Response 200
{
"object": "audience_filter",
"id": "8e5b1f70-0000-4000-8000-000000000007",
"name": "Active pros",
"description": null,
"rules": {
"op": "and",
"rules": [
{
"field": "custom.plan",
"op": "eq",
"value": "pro"
},
{
"event": "email.clicked",
"op": "performed",
"within_days": 30
}
]
},
"created_at": "2026-10-17T09:00:00.000Z",
"updated_at": "2026-10-17T09:00:00.000Z"
}delete/audience-filters/{id}— Delete a saved filter
Issues that used it keep their copy of the rules: deleting a filter never widens a send.
Keys: full_access
curl -X DELETE https://api.smartletter.ai/audience-filters/<id> \
-H "Authorization: Bearer $SMARTLETTER_API_KEY"Response 200
{
"object": "audience_filter",
"id": "8e5b1f70-0000-4000-8000-000000000007",
"deleted": true
}post/audience-filters/count— Count matching contacts
For a saved filter (filter_id) or rules not saved yet. active is who an issue would reach.
Keys: full_access
Body
| filter_id | uuid | A saved filter. Give `filter_id` or `rules`. |
| rules | object | AND/OR tree: `{"op":"and","rules":[{"field":"custom.plan","op":"eq","value":"pro"},{"event":"email.clicked","op":"performed","within_days":30}]}`. See the guide. |
| segment_id | uuid | Count within one newsletter only. |
curl -X POST https://api.smartletter.ai/audience-filters/count \
-H "Authorization: Bearer $SMARTLETTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"rules":{"op":"and","rules":[{"field":"custom.plan","op":"eq","value":"pro"},{"event":"email.clicked","op":"performed","within_days":30}]}}'Response 200
{
"object": "audience_filter_count",
"total": 412,
"active": 398
}