> For the complete documentation index, see [llms.txt](https://codemash.gitbook.io/codemash/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://codemash.gitbook.io/codemash/cloud/database/taxonomies/edit.md).

# Edit a taxonomy

Edit a taxonomy — rename it, or change its description, parent, additional categories or term fields.

**Where:** Database → Taxonomies → row menu → **Edit taxonomy** · `/projects/<project>/db/taxonomies/<taxonomyName>/edit`

## Before you start

* The taxonomy exists — see [Create a taxonomy](/codemash/cloud/database/taxonomies/new.md).
* You need `database:update` on this taxonomy (`database:taxonomy:<id>`, or `database:taxonomy:all`).

## Steps

1. Open **Database → Taxonomies**, open the row menu of the taxonomy and choose **Edit taxonomy**. The form opens as **Editing Countries taxonomy**, with the saved values and a **Delete** button at the top right.
2. Change what you need — the fields are described on [Create a taxonomy](/codemash/cloud/database/taxonomies/new.md#steps). Example: **Description** `Countries we deliver to in 2027`. The **Term fields** tab changes the extra fields of every term — see [Term fields](/codemash/cloud/database/taxonomies/term-fields.md).

   <figure><img src="https://712692422-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHy372bqsaex2cqS3ikhL%2Fuploads%2Fgit-blob-6663b69d830d1298779b4cc0a746c6a04bfbd943%2Ftaxonomies-edit-1.png?alt=media" alt="Editing Countries taxonomy: Taxonomy name Countries, Description Countries we deliver to in 2027, Parent Regions, Additional categories Tags ticked; a red Delete button at the top right; Cancel and Save"><figcaption><p>Editing a taxonomy.</p></figcaption></figure>
3. Press **Save**.

## Result

Cloud goes back to the taxonomies list, and the row shows the new description and **Parent(s)**. The taxonomy keeps its id (`txn_2ecJhU8RtC0chrKoXPOMJR`), so its terms and every record that points at them stay linked — renaming a taxonomy keeps its terms too.

* Terms are not edited here; they have their own screen: [Terms](/codemash/cloud/database/taxonomies/terms.md).
* Adding a **Parent** later does not give existing terms a parent; open those terms and pick one.

## Change or remove it later

* **Delete** — **Delete** at the top right of this form — see [Delete a taxonomy](/codemash/cloud/database/taxonomies/delete.md).

## Do it from code

A save is a **full replace**: send every field you want to keep, and the taxonomy's `viewId` — without it a new taxonomy is created.

```ts
const { item } = await norbix.hub.database.getDatabaseTaxonomy({ id });
await norbix.hub.database.saveDatabaseTaxonomy({
  viewId: id, // without viewId a new taxonomy is created
  taxonomyName: item.name,
  description: 'Cities we deliver to in 2027',
  parentId: item.parentId, // a save replaces every field: send the parent again
});
```

```sh
norbix hub database taxonomy get --id txn_6IWiapNDOobxMHQ7ij0zTh
```

The client setup is on the [Database page](/codemash/cloud/database.md#use-it-from-code). API: [Save Database Taxonomy](/codemash/api-reference/database/taxonomies/save-database-taxonomy.md) · [Get Database Taxonomy](/codemash/api-reference/database/taxonomies/get-database-taxonomy.md)
