---
title: "Update the tags assigned to a prompt"
method: PATCH
path: "/v1/workspaces/{id}/prompts/{promptId}"
tags: ["Prompts"]
---

# Update the tags assigned to a prompt

`PATCH /v1/workspaces/{id}/prompts/{promptId}`

Replaces the prompt's tag assignments with the provided set. A prompt's text and country are immutable — requests attempting to change them are rejected; create a new prompt instead.

## Path parameters

- `id` string, required — Workspace identifier.
- `promptId` string, required — Prompt identifier.

## Request body

- PublicApiUpdatePromptTagsRequest
  - `tagIds` string[], required — Full replacement set of tag IDs to assign to the prompt. Pass [] to remove all tags.

## Response `200`

The updated prompt tag assignments.

- PublicApiUpdatedPromptTags
  - `id` string, required
  - `workspaceId` string, required
  - `tagIds` string[], required

## Other responses

- `400` — Validation failed.
- `401` — Unauthorized.
- `403` — Forbidden.
- `404` — Prompt not found.
- `429` — Quota exhausted.

---

[API](https://skmtc.net/otterly/apis/otterly-public-api.md) · [All operations](https://skmtc.net/otterly/apis/otterly-public-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/otterly/otterly-public-api/versions/49f12c5f26c7/schema)
