curl --request PATCH \
--url https://api.tryhamsa.com/v2/voice-agents/{voiceAgentId}/versions/{versionId} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"versionLabel": "Arabic greeting",
"changeSummary": "Rewrote the opening line."
}
'{
"success": true,
"message": "success",
"data": {
"id": "3b9e2c71-8f4d-4a6b-9c1e-2d7f5a8b0c34",
"agentId": "fc6f158b-24c2-45a6-957b-c57c0a8979b5",
"versionNumber": 4,
"versionLabel": "Arabic greeting",
"changeSummary": "Rewrote the opening line.",
"createdBy": {
"id": "b7d9e979-4a16-437b-8571-4ed92a94faa8",
"name": "Sara Ahmad"
},
"publishedBy": {
"id": "b7d9e979-4a16-437b-8571-4ed92a94faa8",
"name": "Sara Ahmad"
},
"sources": [
{
"draftId": "9a4c1e6b-2f3d-4b8a-8e7c-5d1f0a2b3c47",
"author": {
"id": "b7d9e979-4a16-437b-8571-4ed92a94faa8",
"name": "Sara Ahmad"
}
}
],
"createdAt": "2026-10-28T09:15:00.000Z",
"status": "APPROVED",
"isCurrentVersion": true,
"isLive": false
}
}{
"code": 8409,
"message": "Your draft changed in another tab or through your API key. Reload it and try again.",
"messageKey": "DraftStaleRevision",
"params": {
"reason": "STALE_REVISION",
"revision": "e2f7a9c3-6b1d-4e5f-a8c2-7d3b9f0e1a56"
}
}{
"code": 8409,
"message": "Your draft changed in another tab or through your API key. Reload it and try again.",
"messageKey": "DraftStaleRevision",
"params": {
"reason": "STALE_REVISION",
"revision": "e2f7a9c3-6b1d-4e5f-a8c2-7d3b9f0e1a56"
}
}{
"code": 8409,
"message": "Your draft changed in another tab or through your API key. Reload it and try again.",
"messageKey": "DraftStaleRevision",
"params": {
"reason": "STALE_REVISION",
"revision": "e2f7a9c3-6b1d-4e5f-a8c2-7d3b9f0e1a56"
}
}{
"code": 8409,
"message": "Your draft changed in another tab or through your API key. Reload it and try again.",
"messageKey": "DraftStaleRevision",
"params": {
"reason": "STALE_REVISION",
"revision": "e2f7a9c3-6b1d-4e5f-a8c2-7d3b9f0e1a56"
}
}{
"code": 8409,
"message": "Your draft changed in another tab or through your API key. Reload it and try again.",
"messageKey": "DraftStaleRevision",
"params": {
"reason": "STALE_REVISION",
"revision": "e2f7a9c3-6b1d-4e5f-a8c2-7d3b9f0e1a56"
}
}Agent Versions & Drafts
Update Agent Version
Changes a version’s label or change summary. The config of a version never changes.
PATCH
/
v2
/
voice-agents
/
{voiceAgentId}
/
versions
/
{versionId}
curl --request PATCH \
--url https://api.tryhamsa.com/v2/voice-agents/{voiceAgentId}/versions/{versionId} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"versionLabel": "Arabic greeting",
"changeSummary": "Rewrote the opening line."
}
'{
"success": true,
"message": "success",
"data": {
"id": "3b9e2c71-8f4d-4a6b-9c1e-2d7f5a8b0c34",
"agentId": "fc6f158b-24c2-45a6-957b-c57c0a8979b5",
"versionNumber": 4,
"versionLabel": "Arabic greeting",
"changeSummary": "Rewrote the opening line.",
"createdBy": {
"id": "b7d9e979-4a16-437b-8571-4ed92a94faa8",
"name": "Sara Ahmad"
},
"publishedBy": {
"id": "b7d9e979-4a16-437b-8571-4ed92a94faa8",
"name": "Sara Ahmad"
},
"sources": [
{
"draftId": "9a4c1e6b-2f3d-4b8a-8e7c-5d1f0a2b3c47",
"author": {
"id": "b7d9e979-4a16-437b-8571-4ed92a94faa8",
"name": "Sara Ahmad"
}
}
],
"createdAt": "2026-10-28T09:15:00.000Z",
"status": "APPROVED",
"isCurrentVersion": true,
"isLive": false
}
}{
"code": 8409,
"message": "Your draft changed in another tab or through your API key. Reload it and try again.",
"messageKey": "DraftStaleRevision",
"params": {
"reason": "STALE_REVISION",
"revision": "e2f7a9c3-6b1d-4e5f-a8c2-7d3b9f0e1a56"
}
}{
"code": 8409,
"message": "Your draft changed in another tab or through your API key. Reload it and try again.",
"messageKey": "DraftStaleRevision",
"params": {
"reason": "STALE_REVISION",
"revision": "e2f7a9c3-6b1d-4e5f-a8c2-7d3b9f0e1a56"
}
}{
"code": 8409,
"message": "Your draft changed in another tab or through your API key. Reload it and try again.",
"messageKey": "DraftStaleRevision",
"params": {
"reason": "STALE_REVISION",
"revision": "e2f7a9c3-6b1d-4e5f-a8c2-7d3b9f0e1a56"
}
}{
"code": 8409,
"message": "Your draft changed in another tab or through your API key. Reload it and try again.",
"messageKey": "DraftStaleRevision",
"params": {
"reason": "STALE_REVISION",
"revision": "e2f7a9c3-6b1d-4e5f-a8c2-7d3b9f0e1a56"
}
}{
"code": 8409,
"message": "Your draft changed in another tab or through your API key. Reload it and try again.",
"messageKey": "DraftStaleRevision",
"params": {
"reason": "STALE_REVISION",
"revision": "e2f7a9c3-6b1d-4e5f-a8c2-7d3b9f0e1a56"
}
}Authorizations
Path Parameters
Body
application/json
Was this page helpful?