Promote to Production
POST/agent-studio/agent/versions/:versionId/publish
Promotes a draft version to production.
Request
Version stringrequired
API Version
Available options
v3versionId stringrequired
source string
- application/json
- Body
- Example (auto)
Bodyrequired
locationIdstringrequired
Location ID for authorization
userIdstring
User ID performing the promotion action
userNamestring
User name performing the promotion action
userEmailstring
User email performing the promotion action
{
"locationId": "C2QujeCh8ZnC7al2InWR",
"userId": "usr_abc123def456",
"userName": "John Doe",
}
Version promoted and published successfully
- application/json
- Schema
- Example (auto)
Schema
successbooleanrequired
Success status
messagestringrequired
Response message
dataobjectrequired
Result data with production and new draft version details
{
"success": true,
"message": "Draft published to production successfully. New draft version created for future edits.",
"data": {
"productionVersion": {
"versionId": "v1a2b3c4d5e6f7g8h9i0",
"agentId": "p1q2r3s4t5u6v7w8x9y0z1a2",
"versionName": "Customer Support Agent v2",
"state": "prod",
"isPublished": true,
"version": 2,
"publishedAt": "2024-02-27T12:00:00.000Z",
"publishedBy": "usr_abc123def456",
"publishedByName": "John Doe",
},
"newDraftVersion": {
"versionId": "v2b3c4d5e6f7g8h9i0j1",
"agentId": "p1q2r3s4t5u6v7w8x9y0z1a2",
"versionName": "Customer Support Agent v3",
"state": "draft",
"isPublished": false,
"version": 3,
"createdAt": "2024-02-27T12:00:00.000Z"
}
}
}