Point a deploy label at an agent version
import requests
url = "https://app.langwatch.ai/api/v1/agents/{agentId}/labels/{label}"
payload = { "version": 123 }
headers = {
"X-Auth-Token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-Auth-Token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({version: 123})
};
fetch('https://app.langwatch.ai/api/v1/agents/{agentId}/labels/{label}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request PUT \
--url https://app.langwatch.ai/api/v1/agents/{agentId}/labels/{label} \
--header 'Content-Type: application/json' \
--header 'X-Auth-Token: <api-key>' \
--data '{
"version": 123
}'{
"label": "<string>",
"version": 123,
"versionId": "<string>"
}Agents
Point a deploy label at an agent version
Points a deploy label, such as production, at one of the agent’s versions.
PUT
/
api
/
v1
/
agents
/
{agentId}
/
labels
/
{label}
Point a deploy label at an agent version
import requests
url = "https://app.langwatch.ai/api/v1/agents/{agentId}/labels/{label}"
payload = { "version": 123 }
headers = {
"X-Auth-Token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-Auth-Token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({version: 123})
};
fetch('https://app.langwatch.ai/api/v1/agents/{agentId}/labels/{label}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request PUT \
--url https://app.langwatch.ai/api/v1/agents/{agentId}/labels/{label} \
--header 'Content-Type: application/json' \
--header 'X-Auth-Token: <api-key>' \
--data '{
"version": 123
}'{
"label": "<string>",
"version": 123,
"versionId": "<string>"
}Authorizations
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
The agent id.
Minimum string length:
1The deploy label, for example production.
Required string length:
1 - 64Body
application/json
The version number the label points at.
Required range:
x <= 9007199254740991Last modified on November 3, 2026
Was this page helpful?