---
title: "Update an audience"
method: PATCH
path: "/v1/audiences/{audienceId}"
tags: ["Audiences"]
---

# Update an audience

`PATCH /v1/audiences/{audienceId}`

Updates `name` and/or `filters` (at least one required). Returns the bare updated row.

## Path parameters

- `audienceId` string, required — Audience id (opaque Convex document id) returned by `POST /v1/audiences` and listed by `GET /v1/audiences`.

## Request body

- AudiencesPatchRequest
  - `name` string
  - `filters` object
    - `filters` object[], required
      - `field` string, required
      - `operator` 'equals' | 'not_equals' | 'contains' | 'not_contains' | 'contains_any' | 'not_contains_any' | 'starts_with' | 'ends_with' | 'gt' | 'gte' | 'lt' | 'lte' | 'between' | 'is_true' | 'is_false' | 'in' | 'not_in' | 'is_empty' | 'not_exists' | 'is_not_empty' | 'exists' | 'is_set' | 'before' | 'after' | 'on_date', required
      - `value` unknown
      - `type` string — The field's value type — set `number`, `date`, or `boolean` for typed comparisons (dates are stored as epoch-ms, so a string `equals` on a date never matches). Omit for plain string fields.
    - `logicalOperator` 'and' | 'or', required

## Response `200`

Updated.

- Audience
  - `audienceId` string, required
  - `audienceName` string, required
  - `filters` object, required
    - `filters` object[], required
      - `field` string, required
      - `operator` 'equals' | 'not_equals' | 'contains' | 'not_contains' | 'contains_any' | 'not_contains_any' | 'starts_with' | 'ends_with' | 'gt' | 'gte' | 'lt' | 'lte' | 'between' | 'is_true' | 'is_false' | 'in' | 'not_in' | 'is_empty' | 'not_exists' | 'is_not_empty' | 'exists' | 'is_set' | 'before' | 'after' | 'on_date', required
      - `value` unknown
      - `type` string — The field's value type — set `number`, `date`, or `boolean` for typed comparisons (dates are stored as epoch-ms, so a string `equals` on a date never matches). Omit for plain string fields.
    - `logicalOperator` 'and' | 'or', required
  - `count` integer, required
  - `createdAt` string, date-time, required
  - `updatedAt` string, date-time, required

## Other responses

- `400` — Strict-body violation or no editable field supplied (at least one of `name` / `filters` is required).
- `401` — The API key was missing, invalid, or revoked.
- `403` — The caller does not have the required `audiences` permission.
- `404` — Audience not found in the API-key brand. Cross-brand ids intentionally surface as 404 (never 403) so the API does not leak cross-brand existence.
- `429` — The request hit the rolling rate limit window.
- `500` — Unexpected internal error.

---

[API](https://skmtc.net/brew/apis/brew-public-api-v1.md) · [All operations](https://skmtc.net/brew/apis/brew-public-api-v1/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/brew/brew-public-api-v1/revisions/db96cfedc6c5/schema)
