---
title: "Update Audience Segment Taxonomy"
method: POST
path: "/audience_taxonomies/{taxonomy_id}"
tags: ["Targeting"]
---

# Update Audience Segment Taxonomy

`POST /audience_taxonomies/{taxonomy_id}`

## Request

- Base URL: `https://api.mediamath.com/api/v3.0`
- URL: `https://api.mediamath.com/api/v3.0/audience_taxonomies/{taxonomy_id}`
- Auth: OAuth 2
  - Authorization code: `https://auth.mediamath.com/authorize`
  - Token URL: `https://auth.mediamath.com/oauth/token` scopes: `offline_access`, `manage:services`
- TypeScript: <https://skmtc.dev/mediamath/apis/campaigns-api/docs/audience_taxonomies/:taxonomy_id/post.ts> (a function with typed inputs; its response is checked against the schema)

Updates metadata and replaces the taxonomy tree for an existing audience segment taxonomy.
Access is scoped to the vendor's owning organization; `visibility=GLOBAL` and `revenue_share_pct` may be set only by global admins.

## Path parameters

- `taxonomy_id` integer, required

## Request body

- AudienceTaxonomiesUpdateRequest
  - `visibility` 'GLOBAL' | 'RESTRICTED': Visibility scope of the audience segment
  - `use_hash` boolean: Whether to use hashed identifiers for this segment
  - `revenue_share_pct` number, double: Revenue share percentage for this segment
  - `is_clearing_house` boolean: Whether this segment is managed through a clearing house
  - `permissions` object, required: Access permissions scoped to specific entities
    - `organizations` integer[]: Organization IDs granted access
    - `agencies` integer[]: Agency IDs granted access
    - `advertisers` integer[]: Advertiser IDs granted access
  - `taxonomy` AudienceTaxonomiesUpdateNode, required: A taxonomy node in an update request. Carry id to identify an existing segment (omit for new nodes).
    - `id` integer: ID of the existing audience_segments row. Omit for new nodes.
    - `name` string, required: Display name of the taxonomy node
    - `description` string: Human-readable description of the taxonomy node
    - `code` string: Vendor-defined segment code identifier
    - `buyable` boolean: Whether this segment can be purchased/targeted
    - `retail_cpm` number, double: Retail cost per thousand impressions
    - `wholesale_cpm` number, double: Wholesale cost per thousand impressions
    - `uniques` integer: Estimated number of unique users in this segment
    - `children` AudienceTaxonomiesUpdateNode[]: Nested child taxonomy nodes (supports arbitrary depth)

## Response `200`

Audience segment taxonomy updated successfully

- object
  - `data` AudienceTaxonomiesUpdateResponse
    - `taxonomy_id` integer, required: ID of the audience_taxonomies row
    - `created_by` integer, nullable, required: ID of the user who created the taxonomy (audience_taxonomies.created_by)
    - `updated_by` integer, nullable, required: ID of the user who last updated the taxonomy (audience_taxonomies.updated_by)
    - `created_on` string, date-time, nullable, required: Timestamp when the taxonomy was created (audience_taxonomies.created_on)
    - `updated_on` string, date-time, nullable, required: Timestamp when the taxonomy was last updated (audience_taxonomies.updated_on)
    - `audience_vendor_id` integer, required: ID of the audience_vendors row associated with this taxonomy
    - `revenue_share_pct` number, double, nullable: Revenue share percentage
    - `permissions` object, required: Entity-scoped access permissions
      - `organizations` integer[], required
      - `agencies` integer[], required
      - `advertisers` integer[], required
    - `taxonomy` AudienceTaxonomiesNodeResponse, required
      - `id` integer, required: ID of the created audience_segment row
      - `name` string, required: Display name of the taxonomy node
      - `code` string: Stored segment code (raw or CRC32-hashed depending on use_hash)
      - `buyable` boolean, required: Whether this segment can be purchased/targeted
      - `retail_cpm` number, double: Retail cost per thousand impressions
      - `wholesale_cpm` number, double: Wholesale cost per thousand impressions
      - `uniques` integer: Estimated number of unique users in this segment
      - `children` AudienceTaxonomiesNodeResponse[]: Nested child nodes, mirroring the request tree
  - `meta` SingleMetadata
    - `status` string, required

## Other responses

- `400`: Error response
- `403`: Error response
- `404`: Error response
- `409`: Error response
- `500`: Error response

---

[API](https://skmtc.dev/mediamath/apis/campaigns-api.md) - [All operations](https://skmtc.dev/mediamath/apis/campaigns-api/llms.txt) - [OpenAPI document](https://skmtc.dev/mediamath/apis/campaigns-api/revisions/408743891def?raw)
