Get your agent draft status
curl --request GET \
--url https://api.tryhamsa.com/v2/voice-agents/{voiceAgentId}/draft-status \
--header 'Authorization: <api-key>'import requests
url = "https://api.tryhamsa.com/v2/voice-agents/{voiceAgentId}/draft-status"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.tryhamsa.com/v2/voice-agents/{voiceAgentId}/draft-status', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.tryhamsa.com/v2/voice-agents/{voiceAgentId}/draft-status",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.tryhamsa.com/v2/voice-agents/{voiceAgentId}/draft-status"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.tryhamsa.com/v2/voice-agents/{voiceAgentId}/draft-status")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tryhamsa.com/v2/voice-agents/{voiceAgentId}/draft-status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"message": "success",
"data": {
"mine": {
"id": "9a4c1e6b-2f3d-4b8a-8e7c-5d1f0a2b3c47",
"author": {
"id": "b7d9e979-4a16-437b-8571-4ed92a94faa8",
"name": "Sara Ahmad",
"email": "[email protected]"
},
"status": "open",
"baseVersionNumber": 4,
"versionsBehind": 0,
"changedPaths": [
"conversation.preamble",
"llm.temperature"
],
"revision": "e2f7a9c3-6b1d-4e5f-a8c2-7d3b9f0e1a56",
"proposedAt": "2026-10-28T09:15:00.000Z",
"proposalNote": "New opening line for Saudi callers.",
"lastSentBack": {
"by": {
"id": "b7d9e979-4a16-437b-8571-4ed92a94faa8",
"name": "Sara Ahmad",
"email": "[email protected]"
},
"note": "Please keep the greeting under 10 seconds.",
"at": "2026-10-28T09:15:00.000Z"
},
"combinedFrom": [
{
"draftId": "9a4c1e6b-2f3d-4b8a-8e7c-5d1f0a2b3c47",
"revision": "e2f7a9c3-6b1d-4e5f-a8c2-7d3b9f0e1a56",
"author": {
"id": "b7d9e979-4a16-437b-8571-4ed92a94faa8",
"name": "Sara Ahmad",
"email": "[email protected]"
}
}
],
"expiresAt": "2026-11-04T09:15:00.000Z",
"publishedAs": 5,
"closedBy": {
"id": "b7d9e979-4a16-437b-8571-4ed92a94faa8",
"name": "Sara Ahmad",
"email": "[email protected]"
},
"closedAt": "2026-10-28T09:15:00.000Z",
"closedNote": "Covered by the new FAQ flow.",
"lastVia": {
"kind": "api_key",
"keyRef": "sk_live_4f2a",
"keyName": "CRM sync"
},
"proposedVia": {
"kind": "api_key",
"keyRef": "sk_live_4f2a",
"keyName": "CRM sync"
},
"updatedAt": "2026-10-28T09:15:00.000Z",
"valueKeys": [
"ORDER_ID"
]
},
"lastClosed": {
"draftId": "9a4c1e6b-2f3d-4b8a-8e7c-5d1f0a2b3c47",
"status": "published",
"publishedAs": 5,
"closedBy": {
"id": "b7d9e979-4a16-437b-8571-4ed92a94faa8",
"name": "Sara Ahmad",
"email": "[email protected]"
},
"closedNote": "Covered by the new FAQ flow.",
"closedAt": "2026-10-28T09:15:00.000Z"
},
"proposals": 2,
"beingReviewedBy": {
"by": {
"id": "b7d9e979-4a16-437b-8571-4ed92a94faa8",
"name": "Sara Ahmad",
"email": "[email protected]"
},
"since": "2026-10-28T09:15:00.000Z"
}
}
}{
"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
Get Agent Draft Status
A quick check of your draft: its summary if you have one, what happened to your last closed draft, and how many proposals from others are waiting (reviewers only).
GET
/
v2
/
voice-agents
/
{voiceAgentId}
/
draft-status
Get your agent draft status
curl --request GET \
--url https://api.tryhamsa.com/v2/voice-agents/{voiceAgentId}/draft-status \
--header 'Authorization: <api-key>'import requests
url = "https://api.tryhamsa.com/v2/voice-agents/{voiceAgentId}/draft-status"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.tryhamsa.com/v2/voice-agents/{voiceAgentId}/draft-status', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.tryhamsa.com/v2/voice-agents/{voiceAgentId}/draft-status",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.tryhamsa.com/v2/voice-agents/{voiceAgentId}/draft-status"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.tryhamsa.com/v2/voice-agents/{voiceAgentId}/draft-status")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tryhamsa.com/v2/voice-agents/{voiceAgentId}/draft-status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"message": "success",
"data": {
"mine": {
"id": "9a4c1e6b-2f3d-4b8a-8e7c-5d1f0a2b3c47",
"author": {
"id": "b7d9e979-4a16-437b-8571-4ed92a94faa8",
"name": "Sara Ahmad",
"email": "[email protected]"
},
"status": "open",
"baseVersionNumber": 4,
"versionsBehind": 0,
"changedPaths": [
"conversation.preamble",
"llm.temperature"
],
"revision": "e2f7a9c3-6b1d-4e5f-a8c2-7d3b9f0e1a56",
"proposedAt": "2026-10-28T09:15:00.000Z",
"proposalNote": "New opening line for Saudi callers.",
"lastSentBack": {
"by": {
"id": "b7d9e979-4a16-437b-8571-4ed92a94faa8",
"name": "Sara Ahmad",
"email": "[email protected]"
},
"note": "Please keep the greeting under 10 seconds.",
"at": "2026-10-28T09:15:00.000Z"
},
"combinedFrom": [
{
"draftId": "9a4c1e6b-2f3d-4b8a-8e7c-5d1f0a2b3c47",
"revision": "e2f7a9c3-6b1d-4e5f-a8c2-7d3b9f0e1a56",
"author": {
"id": "b7d9e979-4a16-437b-8571-4ed92a94faa8",
"name": "Sara Ahmad",
"email": "[email protected]"
}
}
],
"expiresAt": "2026-11-04T09:15:00.000Z",
"publishedAs": 5,
"closedBy": {
"id": "b7d9e979-4a16-437b-8571-4ed92a94faa8",
"name": "Sara Ahmad",
"email": "[email protected]"
},
"closedAt": "2026-10-28T09:15:00.000Z",
"closedNote": "Covered by the new FAQ flow.",
"lastVia": {
"kind": "api_key",
"keyRef": "sk_live_4f2a",
"keyName": "CRM sync"
},
"proposedVia": {
"kind": "api_key",
"keyRef": "sk_live_4f2a",
"keyName": "CRM sync"
},
"updatedAt": "2026-10-28T09:15:00.000Z",
"valueKeys": [
"ORDER_ID"
]
},
"lastClosed": {
"draftId": "9a4c1e6b-2f3d-4b8a-8e7c-5d1f0a2b3c47",
"status": "published",
"publishedAs": 5,
"closedBy": {
"id": "b7d9e979-4a16-437b-8571-4ed92a94faa8",
"name": "Sara Ahmad",
"email": "[email protected]"
},
"closedNote": "Covered by the new FAQ flow.",
"closedAt": "2026-10-28T09:15:00.000Z"
},
"proposals": 2,
"beingReviewedBy": {
"by": {
"id": "b7d9e979-4a16-437b-8571-4ed92a94faa8",
"name": "Sara Ahmad",
"email": "[email protected]"
},
"since": "2026-10-28T09:15:00.000Z"
}
}
}{
"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
Was this page helpful?