---
title: "Update Annotation Class"
method: PUT
path: "/annotation_classes/{id}"
---

# Update Annotation Class

`PUT /annotation_classes/{id}`

Updates an existing annotation class.

## Path parameters

- `id` string, required

## Request body

- object
  - `name` string — New name of the annotation class
  - `description` string — New description of the annotation class
  - `images` object[] — List of images to serve as class thumbnails. Replaces all existing class images. To update an existing image, include the existing id for that record.
    - `id` string — Valid UUID of the class image. Optional. Autogenerated if not provided.
    - `key` string, required — Location on S3 the original image was uploaded to. Required, but needs to be generated using the upload info endpoint.
    - `crop_key` string — Location on S3 the thumbnail was uploaded to. If not specified, a thumbnail will be generated automatically from the original image. Needs to be generated using the upload info endpoint.
    - `x` number, float, required — X coordinate of the top left edge of the cropped area on the original image, which will be the thumbnail.
    - `y` number, float, required — https://dash.readme.com/project/v7/v1.0/refs/create-annotation-classY coordinate of the top left edge of the cropped area on the original image, which will be the thumbnail.
    - `scale` number, float, required — Zoom level of the original image when taking the crop. The crop is always 200 by 200 square.
    - `image_width` integer, required — Actual width of the original image
    - `image_height*` integer — Actual height of the original image
    - `index` integer, required — Position of the image withing the list of class thumbnails
  - `datasets` object[] — List of datasets the class will be associated with. Replaces existing associations.
    - `id` integer — Id of the dataset the class is associated with (use either this or slug, but not both).
    - `slug` string — Slug of the dataset the class is associated with (use either this or slug, but not both).
  - `metadata` object — New metadata for the class
    - `_color` string — RGBA string representing the color used to render the class in various places.
  - `annotation_type_ids` integer[] — List of the annotation class will be associated with. Replaces existing associations. Note that changing the main type of the class might have unforeseen consequences.

## Response `200`

200

## Other responses

- `400` — 400

---

[API](https://skmtc.net/v7labs/apis/darwin.md) · [All operations](https://skmtc.net/v7labs/apis/darwin/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/v7labs/darwin/versions/526a5b6b4cdc/schema)
