Skip to contentSkip to page list

Docs

Assign a tag

Assign a tag (e.g. "production", "staging") to a specific prompt version

PUT/api/v1/prompts/{id}/tags/{tag}
Request and response examples
request.py
import osimport requests​origin = "https://app.langwatch.ai"path = "/api/v1/prompts/<id>/tags/<tag>"api_key = os.environ["LANGWATCH_API_KEY"]headers = {    "X-Auth-Token": api_key,    "Content-Type": "application/json",}payload = {}​response = requests.put(    origin + path,    headers=headers,    json=payload,)print(response.json())

Success

application/json · Generated from schema

{  "configId": "string",  "versionId": "string",  "tag": "string",  "updatedAt": "2026-01-01T00:00:00Z"}
api-reference/prompts/update-tags

Authorization

X-Auth-Tokenstringheaderrequired

Project API key for sending traces and accessing project-scoped resources. Format: sk-lw-... (no underscore). Obtain one by creating a project via the Admin API or the LangWatch UI.

Path parameters

idstringrequired
tagstringrequired

Request body

application/json · Required

versionIdstringrequired

Responses

200

Success

application/json

configIdstringrequired
versionIdstringrequired
tagstringrequired
updatedAtstring (date-time)required
400

Bad Request

application/json

errorstringrequired
messagestring
401

Unauthorized

application/json

errorstringrequired
messagestring
404

Prompt not found

application/json

errorstringrequired
messagestring
422

Invalid tag or version

application/json

errorstringrequired
messagestring
500

Internal Server Error

application/json

errorstringrequired
messagestring

Documentation