---
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

---

[API](https://skmtc.net/trycourier/apis/courier.md) · [All operations](https://skmtc.net/trycourier/apis/courier/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/trycourier/courier/versions/04f69fbf96a5/schema)
