---
title: "Update an audience"
method: PUT
path: "/audiences/{audience_id}"
tags: ["Audiences"]
---

# Update an audience

`PUT /audiences/{audience_id}`

Creates or replaces an audience from a filter and an AND or OR operator. Membership recalculates automatically as profiles change.

## Path parameters

- `audience_id` string, required

## Request body

- object
  - `name` string, nullable — The name of the audience
  - `description` string, nullable — A description of the audience
  - `operator` 'AND' | 'OR'
  - `filter` AudienceFilterConfig — Filter configuration for audience membership containing an array of filter rules
    - `operator` 'AND' | 'OR'
    - `filters` FilterConfig[], required — Array of filter rules (single conditions or nested groups)
      - `operator` string, required — The operator for this filter. Use comparison operators (EQ, GT, LT, GTE, LTE, NEQ, EXISTS, INCLUDES, STARTS_WITH, ENDS_WITH, IS_BEFORE, IS_AFTER, OMIT) for single conditions, or logical operators (AND, OR) for nested filter groups.
      - `path` string — The attribute path from the user profile to filter on. Required for single filter conditions, not used for nested filter groups.
      - `value` string — The value to compare against. Required for single filter conditions, not used for nested filter groups.
      - `filters` FilterConfig[] — Nested filter rules to combine with AND/OR. Required for nested filter groups, not used for single filter conditions.

## Response `200`

- AudienceUpdateResponse
  - `audience` Audience, required
    - `id` string, required — A unique identifier representing the audience_id
    - `name` string, required — The name of the audience
    - `description` string, required — A description of the audience
    - `operator` 'AND' | 'OR'
    - `filter` AudienceFilterConfig — Filter configuration for audience membership containing an array of filter rules
      - `operator` 'AND' | 'OR'
      - `filters` FilterConfig[], required — Array of filter rules (single conditions or nested groups)
        - `operator` string, required — The operator for this filter. Use comparison operators (EQ, GT, LT, GTE, LTE, NEQ, EXISTS, INCLUDES, STARTS_WITH, ENDS_WITH, IS_BEFORE, IS_AFTER, OMIT) for single conditions, or logical operators (AND, OR) for nested filter groups.
        - `path` string — The attribute path from the user profile to filter on. Required for single filter conditions, not used for nested filter groups.
        - `value` string — The value to compare against. Required for single filter conditions, not used for nested filter groups.
        - `filters` FilterConfig[] — Nested filter rules to combine with AND/OR. Required for nested filter groups, not used for single filter conditions.
    - `created_at` string, required
    - `updated_at` string, required

## Changes

- **2026-07-07** `d3fe53f97998` — 2 info
  - added the new optional request property `filter/operator`
  - added the optional property `audience/filter/operator` to the response with the `200` status
- **2026-01-14** `e3e54d99e2a7` — 6 breaking, 4 info
  - added the new required request property `filter/filters`
  - removed `#/components/schemas/SingleFilterConfig, #/components/schemas/NestedFilterConfig` from the `filter` request property `oneOf` list
  - the `filter` request property type/format changed from ``/`` to `object`/``
  - the response property `audience/filter` became nullable for the status `200`
  - …6 more
- **2026-01-05** `361d17797dff` — 1 breaking, 1 info
  - added `#/components/schemas/NestedFilterConfig` to the `audience/filter` response property `oneOf` list for the response status `200`
  - added `#/components/schemas/NestedFilterConfig` to the `filter` request property `oneOf` list
- **2025-10-07** `7143ea51f307` — 1 breaking, 1 info
  - removed `#/components/schemas/NestedFilterConfig` from the `filter` request property `oneOf` list
  - removed `#/components/schemas/NestedFilterConfig` from the `audience/filter` response property `oneOf` list for the response status `200`

[Change history](https://skmtc.dev/trycourier/apis/courier/changes/audiences/:audience_id/put.md)

---

[API](https://skmtc.dev/trycourier/apis/courier.md) · [All operations](https://skmtc.dev/trycourier/apis/courier/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/trycourier/courier/revisions/cb8586034158/schema)
