Skip to contentSkip to page list

Docs

Create Tags

Create a custom prompt tag definition for the organization

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

Tag created

application/json · Generated from schema

{  "id": "string",  "name": "string",  "createdAt": "2026-01-01T00:00:00Z"}
api-reference/prompts/create-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.

Request body

application/json · Required

namestringrequired

Responses

201

Tag created

application/json

idstringrequired
namestringrequired
createdAtstring (date-time)required
400

Bad Request

application/json

errorstringrequired
messagestring
401

Unauthorized

application/json

errorstringrequired
messagestring
422

Unprocessable Entity

application/json

errorstringrequired
messagestring
500

Internal Server Error

application/json

errorstringrequired
messagestring

Documentation