# Update Permission Taxonomy

With a taxonomy ID (obtained from creating a new taxonomy), you can update the taxonomy, change permissions, and add or remove audience segments.


NOTE: you must always post the entire taxonomy when updating a taxonomy. 

To ensure that the entire taxonomy is correct, we recommend updates be done as a 3-step process:
1. GET the existing taxonomy (see example API response with definitions)
2. Identify & make changes (i.e. add/edit permissions, add/remove leaf nodes, change retail CPMs, etc)
3. POST the updated taxonomy

Endpoint: POST /audience_segments/{taxonomy_id}
Version: 2.0
Security: OAuth2

## Path parameters:

  - `taxonomy_id` (string, required)
    taxonomy_id

## Header parameters:

  - `Content-Type` (string, required)
    _

## Request fields (application/json):

  - `audience_vendor_id` (integer, required)

  - `permissions` (object)

  - `permissions.advertisers` (array)

  - `permissions.agencies` (array)

  - `permissions.organizations` (array)

  - `taxonomy` (object, required)

  - `taxonomy.children` (array, required)

  - `taxonomy.children.buyable` (boolean)

  - `taxonomy.children.children` (array)

  - `taxonomy.children.children.buyable` (boolean)

  - `taxonomy.children.children.children` (array)

  - `taxonomy.children.children.code` (any, required)

  - `taxonomy.children.children.id` (integer)

  - `taxonomy.children.children.name` (string, required)

  - `taxonomy.children.children.retail_cpm` (number, required)

  - `taxonomy.children.children.uniques` (number)

  - `taxonomy.children.children.wholesale_cpm` (number)

  - `taxonomy.children.id` (integer)

  - `taxonomy.children.name` (string)

  - `taxonomy.description` (string)

  - `taxonomy.id` (integer)

  - `use_hash` (boolean)
    If you are using a segment code that is not a 32-bit integer, you'd have to pass an optional parameter use_hash:true as part of the JSON body.

## Response 202 fields (application/json):

  - `data` (object)

  - `data.audience_vendor_id` (integer)

  - `data.created_by` (any,null)

  - `data.created_on` (string)

  - `data.is_clearing_house` (boolean)

  - `data.name` (string)

  - `data.permissions` (object)

  - `data.permissions.advertisers` (array)

  - `data.permissions.agencies` (array)

  - `data.permissions.organizations` (array)

  - `data.revenue_share_pct` (number)

  - `data.taxonomy` (object)

  - `data.taxonomy.children` (array)

  - `data.taxonomy.children.buyable` (boolean)

  - `data.taxonomy.children.children` (array)

  - `data.taxonomy.children.children.buyable` (boolean)

  - `data.taxonomy.children.children.children` (array)

  - `data.taxonomy.children.children.children.buyable` (boolean)

  - `data.taxonomy.children.children.children.children` (array)

  - `data.taxonomy.children.children.children.code` (string)

  - `data.taxonomy.children.children.children.description` (string)

  - `data.taxonomy.children.children.children.id` (integer)

  - `data.taxonomy.children.children.children.name` (string)

  - `data.taxonomy.children.children.children.retail_cpm` (number)

  - `data.taxonomy.children.children.children.uniques` (integer)

  - `data.taxonomy.children.children.children.wholesale_cpm` (integer)

  - `data.taxonomy.children.children.code` (string)

  - `data.taxonomy.children.children.description` (string)

  - `data.taxonomy.children.children.id` (integer)

  - `data.taxonomy.children.children.name` (string)

  - `data.taxonomy.children.children.retail_cpm` (number)

  - `data.taxonomy.children.children.uniques` (integer)

  - `data.taxonomy.children.children.wholesale_cpm` (number)

  - `data.taxonomy.children.code` (string)

  - `data.taxonomy.children.description` (string)

  - `data.taxonomy.children.id` (integer)

  - `data.taxonomy.children.name` (string)

  - `data.taxonomy.children.retail_cpm` (number)

  - `data.taxonomy.children.uniques` (integer)

  - `data.taxonomy.children.wholesale_cpm` (number)

  - `data.taxonomy.id` (integer)

  - `data.taxonomy.name` (string)

  - `data.taxonomy_id` (integer)

  - `data.updated_by` (integer)

  - `data.updated_on` (string)

  - `data.visibility` (string)
    Enum: "GLOBAL", "RESTRICTED"

  - `meta` (object)

  - `meta.status` (string)


