SLSmartletter API

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

Keys: full_access

Query parameters

limitinteger1–100, default 20.
afteruuidId of the last item of the previous page (older items).
beforeuuidId 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

namerequiredstring
descriptionstring
rulesrequiredobjectAND/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

namestring
descriptionstring
rulesobjectAND/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_iduuidA saved filter. Give `filter_id` or `rules`.
rulesobjectAND/OR tree: `{"op":"and","rules":[{"field":"custom.plan","op":"eq","value":"pro"},{"event":"email.clicked","op":"performed","within_days":30}]}`. See the guide.
segment_iduuidCount 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
}