> ## Documentation Index
> Fetch the complete documentation index at: https://developer.box.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update metadata taxonomies

export const Link = ({href, children, className, ...props}) => {
  const localizedHref = href;
  return <a href={localizedHref} className={className} {...props}>
      {children}
    </a>;
};

export const MultiRelatedLinks = ({sections = []}) => {
  if (!sections || sections.length === 0) {
    return null;
  }
  return <div className="space-y-8">
      {sections.map((section, index) => <RelatedLinks key={index} title={section.title} items={section.items} />)}
    </div>;
};

export const RelatedLinks = ({title, items = []}) => {
  const getBadgeClass = badge => {
    if (!badge) return "badge-default";
    const badgeType = badge.toLowerCase().replace(/\s+/g, "-");
    return `badge-${badge === "ガイド" ? "guide" : badgeType}`;
  };
  if (!items || items.length === 0) {
    return null;
  }
  return <div className="my-8">
      {}
      <h3 className="text-sm font-bold uppercase tracking-wider mb-4">{title}</h3>

      {}
      <div className="flex flex-col gap-3">
        {items.map((item, index) => <a key={index} href={item.href} className="py-2 px-3 rounded related_link hover:bg-[#f2f2f2] dark:hover:bg-[#111827] flex items-center gap-3 group no-underline hover:no-underline border-b-0">
            {}
            <span className={`px-2 py-1 rounded-full text-xs font-semibold uppercase tracking-wide flex-shrink-0 ${getBadgeClass(item.badge)}`}>
              {item.badge}
            </span>

            {}
            <span className="text-base">{item.label}</span>
          </a>)}
      </div>
    </div>;
};

Update metadata taxonomy elements such as `displayNames`, `descriptions`, and other attributes of an existing taxonomy structure.

## Update a metadata taxonomy

Use this endpoint to update top-level attributes of an existing taxonomy, such as changing its `displayName`.

Call the <Link href="/reference/patch-metadata-taxonomies-id-id">`PATCH /metadata_taxonomies/{namespace}/{taxonomy_key}`</Link> API endpoint.

<CodeGroup>
  ```sh cURL theme={null}
  curl --request PATCH \ 
  --url "https://api.box.com/2.0/metadata_taxonomies/{namespace}/{taxonomy_key}" \ 
  --header "Authorization: Bearer YOUR_ACCESS_TOKEN" \ 
  --header "Content-Type: application/json" \ 
  --data '{ 
  "displayName": "UPDATED DISPLAY NAME" 
  }'
  ```

  ```python Python v10 theme={null}
  client.metadata_taxonomies.update_metadata_taxonomy(
      namespace, taxonomy_key, updated_display_name
  )
  ```

  ```typescript Node/TypeScript v10 theme={null}
  await client.metadataTaxonomies.updateMetadataTaxonomy(namespace, taxonomyKey, {
    displayName: updatedDisplayName,
  } satisfies UpdateMetadataTaxonomyRequestBody);
  ```

  ```swift Swift v10 theme={null}
  try await client.metadataTaxonomies.updateMetadataTaxonomy(namespace: namespace, taxonomyKey: taxonomyKey, requestBody: UpdateMetadataTaxonomyRequestBody(displayName: updatedDisplayName))
  ```

  ```java Java v10 theme={null}
  client.getMetadataTaxonomies().updateMetadataTaxonomy(namespace, taxonomyKey, new UpdateMetadataTaxonomyRequestBody(updatedDisplayName))
  ```

  ```cs .NET v10 theme={null}
  await client.MetadataTaxonomies.UpdateMetadataTaxonomyAsync(namespaceParam: namespaceParam, taxonomyKey: taxonomyKey, requestBody: new UpdateMetadataTaxonomyRequestBody(displayName: updatedDisplayName));
  ```
</CodeGroup>

<Info>
  Additional information is available for the <Link href="/reference/resources/metadata-taxonomy#schema-namespace">`namespace`</Link> and <Link href="/reference/resources/metadata-taxonomy#schema-key">`taxonomy_key`</Link> of a taxonomy.
</Info>

## Update a taxonomy level

Update the display name and description of an existing level within a taxonomy. The level index identifies which level to update.

Call the <Link href="/reference/patch-metadata-taxonomies-id-id-levels-id">`PATCH /metadata_taxonomies/{namespace}/{taxonomy_key}/levels/{level_index}`</Link> API endpoint with the `displayName` and `description`.

<CodeGroup>
  ```sh cURL theme={null}
  curl --request PATCH \ 
  --url "https://api.box.com/2.0/metadata_taxonomies/{namespace}/{taxonomy_key}/levels/1" \ 
  --header "Authorization: Bearer YOUR_ACCESS_TOKEN" \ 
  --header "Content-Type: application/json" \ 
  --data '{ 
  "displayName": "Continent UPDATED", 
  "description": "Continent Level UPDATED" 
  }'
  ```

  ```python Python v10 theme={null}
  client.metadata_taxonomies.update_metadata_taxonomy_level_by_id(
      namespace,
      taxonomy_key,
      1,
      "Continent UPDATED",
      description="Continent Level UPDATED",
  )
  ```

  ```typescript Node/TypeScript v10 theme={null}
  await client.metadataTaxonomies.updateMetadataTaxonomyLevelById(
    namespace,
    taxonomyKey,
    1,
    {
      displayName: 'Continent UPDATED',
      description: 'Continent Level UPDATED',
    } satisfies UpdateMetadataTaxonomyLevelByIdRequestBody,
  );
  ```

  ```swift Swift v10 theme={null}
  try await client.metadataTaxonomies.updateMetadataTaxonomyLevelById(namespace: namespace, taxonomyKey: taxonomyKey, levelIndex: Int64(1), requestBody: UpdateMetadataTaxonomyLevelByIdRequestBody(displayName: "Continent UPDATED", description: "Continent Level UPDATED"))
  ```

  ```java Java v10 theme={null}
  client.getMetadataTaxonomies().updateMetadataTaxonomyLevelById(namespace, taxonomyKey, 1L, new UpdateMetadataTaxonomyLevelByIdRequestBody.Builder("Continent UPDATED").description("Continent Level UPDATED").build())
  ```

  ```cs .NET v10 theme={null}
  await client.MetadataTaxonomies.UpdateMetadataTaxonomyLevelByIdAsync(namespaceParam: namespaceParam, taxonomyKey: taxonomyKey, levelIndex: 1L, requestBody: new UpdateMetadataTaxonomyLevelByIdRequestBody(displayName: "Continent UPDATED") { Description = "Continent Level UPDATED" });
  ```
</CodeGroup>

<Info>
  Additional information is available for the <Link href="/reference/resources/metadata-taxonomy#schema-namespace">`namespace`</Link>, <Link href="/reference/resources/metadata-taxonomy#schema-key">`taxonomy_key`</Link>, and <Link href="/reference/resources/metadata-taxonomy-level">`level_index`</Link> of a taxonomy.
</Info>

## Update a taxonomy node

Use this endpoint to modify the display name or relationship attributes of an existing node in a taxonomy - for example, renaming **Paris** to **Paris City**.

Call the <Link href="/reference/patch-metadata-taxonomies-id-id-nodes-id">`PATCH /metadata_taxonomies/{namespace}/{taxonomy_key}/nodes/{node_id}`</Link> API endpoint with the taxonomy’s `displayName`.

<CodeGroup>
  ```sh cURL theme={null}
  curl --request PATCH \ 
  --url "https://api.box.com/2.0/metadata_taxonomies/{namespace}/{taxonomy_key}/nodes/{node_id}" \ 
  --header "Authorization: Bearer YOUR_ACCESS_TOKEN" \ 
  --header "Content-Type: application/json" \ 
  --data '{ 
  "displayName": "Poland UPDATED" 
  }'
  ```

  ```python Python v10 theme={null}
  client.metadata_taxonomies.update_metadata_taxonomy_node(
      namespace, taxonomy_key, country_node.id, display_name="Poland UPDATED"
  )
  ```

  ```typescript Node/TypeScript v10 theme={null}
  await client.metadataTaxonomies.updateMetadataTaxonomyNode(
    namespace,
    taxonomyKey,
    countryNode.id,
    {
      requestBody: {
        displayName: 'Poland UPDATED',
      } satisfies UpdateMetadataTaxonomyNodeRequestBody,
    } satisfies UpdateMetadataTaxonomyNodeOptionalsInput,
  );
  ```

  ```swift Swift v10 theme={null}
  try await client.metadataTaxonomies.updateMetadataTaxonomyNode(namespace: namespace, taxonomyKey: taxonomyKey, nodeId: countryNode.id, requestBody: UpdateMetadataTaxonomyNodeRequestBody(displayName: "Poland UPDATED"))
  ```

  ```java Java v10 theme={null}
  client.getMetadataTaxonomies().updateMetadataTaxonomyNode(namespace, taxonomyKey, countryNode.getId(), new UpdateMetadataTaxonomyNodeRequestBody.Builder().displayName("Poland UPDATED").build())
  ```

  ```cs .NET v10 theme={null}
  await client.MetadataTaxonomies.UpdateMetadataTaxonomyNodeAsync(namespaceParam: namespaceParam, taxonomyKey: taxonomyKey, nodeId: countryNode.Id, requestBody: new UpdateMetadataTaxonomyNodeRequestBody() { DisplayName = "Poland UPDATED" });
  ```
</CodeGroup>

<Info>
  Additional information is available for the <Link href="/reference/resources/metadata-taxonomy#schema-namespace">`namespace`</Link>, <Link href="/reference/resources/metadata-taxonomy#schema-key">`taxonomy_key`</Link>, and <Link href="/reference/resources/metadata-taxonomy-node">`node_id`</Link> of a taxonomy.
</Info>

<RelatedLinks
  title="RELATED APIS"
  items={[
{ label: translate("Update metadata taxonomy"), href: "/reference/patch-metadata-taxonomies-id-id", badge: "PATCH" },
{ label: translate("Update metadata taxonomy level"), href: "/reference/patch-metadata-taxonomies-id-id-levels-id", badge: "PATCH" },
{ label: translate("Update metadata taxonomy node"), href: "/reference/patch-metadata-taxonomies-id-id-nodes-id", badge: "PATCH" }
]}
/>

<RelatedLinks
  title="RELATED GUIDES"
  items={[

{ label: translate("Create metadata taxonomy items"), href: "/guides/metadata/taxonomies/create", badge: "GUIDE" },
{ label: translate("List metadata taxonomies"), href: "/guides/metadata/taxonomies/list", badge: "GUIDE" },
{ label: translate("Get metadata taxonomy items"), href: "/guides/metadata/taxonomies/get", badge: "GUIDE" },
{ label: translate("Remove metadata taxonomy items"), href: "/guides/metadata/taxonomies/remove", badge: "GUIDE" }


]}
/>

<RelatedLinks
  title="RELATED RESOURCES"
  items={[

{ label: translate("Metadata"), href: "/guides/metadata/index", badge: "GUIDE" }

]}
/>
