Restore a discarded or expired agent draft
curl --request POST \
--url https://api.tryhamsa.com/v2/voice-agents/{voiceAgentId}/drafts/{draftId}/restore \
--header 'Authorization: <api-key>'import requests
url = "https://api.tryhamsa.com/v2/voice-agents/{voiceAgentId}/drafts/{draftId}/restore"
headers = {"Authorization": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: '<api-key>'}};
fetch('https://api.tryhamsa.com/v2/voice-agents/{voiceAgentId}/drafts/{draftId}/restore', 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}/drafts/{draftId}/restore",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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}/drafts/{draftId}/restore"
req, _ := http.NewRequest("POST", 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.post("https://api.tryhamsa.com/v2/voice-agents/{voiceAgentId}/drafts/{draftId}/restore")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tryhamsa.com/v2/voice-agents/{voiceAgentId}/drafts/{draftId}/restore")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"message": "success",
"data": {
"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"
],
"agentId": "fc6f158b-24c2-45a6-957b-c57c0a8979b5",
"config": {
"id": "48f7656f-098b-4c43-b165-7cfd2cc8ac30",
"type": "Single Prompt",
"name": "Customer Support Agent",
"conversation": {
"greetingMessage": "Hello, how can I help you today?",
"greetingMessageType": null,
"preamble": "You are a helpful assistant.",
"pokeMessages": [
"Are you still there?",
"Take your time, I'm here when you're ready."
],
"params": {
"customer_name": "Sara",
"order_number": "48213"
},
"alignment": {
"greetingMessage": "ltr",
"preamble": "ltr"
}
},
"voice": {
"voiceId": "en-US-Neural2-A",
"voiceRecordId": null,
"voiceRecord": {
"id": "voice-record-123",
"name": "English Voice",
"provider": "elevenlabs",
"ttsParams": {
"voiceId": "voice-123",
"dialect": "PLS",
"language": "ar"
},
"language": "en",
"image": "<string>",
"languageCode": "<string>",
"voiceRecord": {}
},
"lang": "en",
"config": {
"expressiveness": 1,
"preferredSttModel": "Hamsa-STT-S4",
"casualMode": false,
"autoEmotion": true,
"useReferenceAudio": true
},
"ttsParams": {}
},
"llm": {
"provider": "openai",
"model": "gpt-4",
"temperature": 0.2,
"baseUrl": null,
"apiKey": "{{secrets.OPENAI_KEY}}",
"reasoningEffort": null,
"hasApiKey": true,
"apiKeyLast4": "7890"
},
"callSettings": {
"noiseCancellation": "TELEPHONY_OPTIMIZED",
"cancelNoisePer": "conversation",
"interrupt": true,
"responseDelay": 400,
"userInactivityTimeout": 15,
"maxCallDuration": 300,
"silenceThreshold": 800,
"backgroundNoise": false,
"thinkingVoice": false,
"speakerIdentification": false,
"agenticRag": false,
"genderDetection": false,
"smartCallEnd": false,
"languageDialectSwitcher": false,
"waitForUserToSpeakFirst": 0,
"minInterruptionDuration": 0.5,
"vadActivationThreshold": 0.5,
"enableAutoGainControl": false,
"sendDenoisedToStt": false,
"promptEnhancer": "basic",
"enableEnhancedTurnTaking": false,
"smartCallEndPrompt": "Terminate the call when: (1) all customer inquiries have been resolved, (2) the conversation has reached a natural conclusion, (3) the customer's goal has been achieved, or (4) further conversation would be unproductive. Use this tool only when you've achieved the primary objective of the call.",
"timezone": "Asia/Amman",
"maxCallDurationBehavior": {
"action": "transfer_call",
"message": "We have reached the time limit, let me transfer you to {{agent_name}}.",
"messageType": "static",
"transfer": {
"phoneNumberType": "e164",
"phoneNumber": "+962790000000",
"transferType": "cold",
"sipHeaders": [
{
"id": "<string>",
"name": "<string>",
"value": "<string>"
}
]
}
},
"contextManager": {
"mode": "active"
},
"onHoldMusicId": "48f7656f-098b-4c43-b165-7cfd2cc8ac30",
"ambientSoundId": "48f7656f-098b-4c43-b165-7cfd2cc8ac30",
"onHoldMusic": {
"id": "48f7656f-098b-4c43-b165-7cfd2cc8ac30",
"name": "Default",
"url": "https://cdn.tryhamsa.com/audio-assets/default.mp3?Signature=...",
"duration": 32.5
},
"ambientSound": {
"id": "48f7656f-098b-4c43-b165-7cfd2cc8ac30",
"name": "Default",
"url": "https://cdn.tryhamsa.com/audio-assets/default.mp3?Signature=...",
"duration": 32.5
}
},
"tools": [
{
"persistentId": "payment-api",
"toolId": "uuid-123",
"version": 2,
"toolType": "FUNCTION",
"nodeId": "node-payment",
"testResult": {},
"overrides": {},
"selectedFunctions": [
"create_ticket",
"get_ticket"
]
}
],
"knowledgeBaseItemsIds": [
"9b1c2d3e-4f5a-4b6c-8d7e-0f1a2b3c4d5e"
],
"voiceDictionaryIds": [
"4d5e6f7a-8b9c-4d0e-9f1a-2b3c4d5e6f7a"
],
"phoneNumber": {
"type": "TWILIO",
"id": "48f7656f-098b-4c43-b165-7cfd2cc8ac30"
},
"webhookUrl": null,
"webhookAuth": {
"authKey": "bearer",
"authSecret": "secret"
},
"workflow": {
"nodes": [
{
"id": "2ZHj3IUpJFc-83H2-f8d3",
"type": "start",
"label": "Start",
"message": "Hello, how can I help you today?",
"messageType": "prompt",
"position": {
"x": 0,
"y": 0
},
"metadata": {
"version": 1
},
"transitions": []
}
],
"edges": [],
"customVariables": [
{
"id": "z5QsyxUbrKPjYMGaMj1e1",
"name": "customer_name",
"dataType": "string",
"description": "",
"defaultValue": "john",
"extractionPrompt": "",
"enumValues": []
}
]
},
"resolvedWebTools": [
{}
],
"outcomeResponseShape": {},
"alwaysOnExtractVariables": {
"variables": [
{}
]
},
"account": {
"plan": "pro"
},
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-15T10:30:00Z",
"policyIds": [
"5f0c9a52-7a3e-4d0e-9a1f-1c2b3d4e5f60"
],
"policyStates": {
"5f0c9a52-7a3e-4d0e-9a1f-1c2b3d4e5f60": true
},
"guardrailIds": [
"5f0c9a52-7a3e-4d0e-9a1f-1c2b3d4e5f60"
],
"guardrailStates": {
"5f0c9a52-7a3e-4d0e-9a1f-1c2b3d4e5f60": true
},
"functionMacroIds": [
"5f0c9a52-7a3e-4d0e-9a1f-1c2b3d4e5f60"
],
"functionMacroStates": {
"5f0c9a52-7a3e-4d0e-9a1f-1c2b3d4e5f60": true
}
},
"values": {
"ORDER_ID": "A-10293"
},
"createdAt": "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"
}
}{
"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": 8404,
"message": "Policy not found!",
"messageKey": "PolicyNotFound",
"params": {
"reason": "NO_DRAFT"
}
}{
"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
Restore Agent Draft
Brings back your own discarded or expired draft, up to 30 days after it closed. It is open again and expires 7 days from now unless you save to it.
POST
/
v2
/
voice-agents
/
{voiceAgentId}
/
drafts
/
{draftId}
/
restore
Restore a discarded or expired agent draft
curl --request POST \
--url https://api.tryhamsa.com/v2/voice-agents/{voiceAgentId}/drafts/{draftId}/restore \
--header 'Authorization: <api-key>'import requests
url = "https://api.tryhamsa.com/v2/voice-agents/{voiceAgentId}/drafts/{draftId}/restore"
headers = {"Authorization": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: '<api-key>'}};
fetch('https://api.tryhamsa.com/v2/voice-agents/{voiceAgentId}/drafts/{draftId}/restore', 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}/drafts/{draftId}/restore",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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}/drafts/{draftId}/restore"
req, _ := http.NewRequest("POST", 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.post("https://api.tryhamsa.com/v2/voice-agents/{voiceAgentId}/drafts/{draftId}/restore")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tryhamsa.com/v2/voice-agents/{voiceAgentId}/drafts/{draftId}/restore")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"message": "success",
"data": {
"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"
],
"agentId": "fc6f158b-24c2-45a6-957b-c57c0a8979b5",
"config": {
"id": "48f7656f-098b-4c43-b165-7cfd2cc8ac30",
"type": "Single Prompt",
"name": "Customer Support Agent",
"conversation": {
"greetingMessage": "Hello, how can I help you today?",
"greetingMessageType": null,
"preamble": "You are a helpful assistant.",
"pokeMessages": [
"Are you still there?",
"Take your time, I'm here when you're ready."
],
"params": {
"customer_name": "Sara",
"order_number": "48213"
},
"alignment": {
"greetingMessage": "ltr",
"preamble": "ltr"
}
},
"voice": {
"voiceId": "en-US-Neural2-A",
"voiceRecordId": null,
"voiceRecord": {
"id": "voice-record-123",
"name": "English Voice",
"provider": "elevenlabs",
"ttsParams": {
"voiceId": "voice-123",
"dialect": "PLS",
"language": "ar"
},
"language": "en",
"image": "<string>",
"languageCode": "<string>",
"voiceRecord": {}
},
"lang": "en",
"config": {
"expressiveness": 1,
"preferredSttModel": "Hamsa-STT-S4",
"casualMode": false,
"autoEmotion": true,
"useReferenceAudio": true
},
"ttsParams": {}
},
"llm": {
"provider": "openai",
"model": "gpt-4",
"temperature": 0.2,
"baseUrl": null,
"apiKey": "{{secrets.OPENAI_KEY}}",
"reasoningEffort": null,
"hasApiKey": true,
"apiKeyLast4": "7890"
},
"callSettings": {
"noiseCancellation": "TELEPHONY_OPTIMIZED",
"cancelNoisePer": "conversation",
"interrupt": true,
"responseDelay": 400,
"userInactivityTimeout": 15,
"maxCallDuration": 300,
"silenceThreshold": 800,
"backgroundNoise": false,
"thinkingVoice": false,
"speakerIdentification": false,
"agenticRag": false,
"genderDetection": false,
"smartCallEnd": false,
"languageDialectSwitcher": false,
"waitForUserToSpeakFirst": 0,
"minInterruptionDuration": 0.5,
"vadActivationThreshold": 0.5,
"enableAutoGainControl": false,
"sendDenoisedToStt": false,
"promptEnhancer": "basic",
"enableEnhancedTurnTaking": false,
"smartCallEndPrompt": "Terminate the call when: (1) all customer inquiries have been resolved, (2) the conversation has reached a natural conclusion, (3) the customer's goal has been achieved, or (4) further conversation would be unproductive. Use this tool only when you've achieved the primary objective of the call.",
"timezone": "Asia/Amman",
"maxCallDurationBehavior": {
"action": "transfer_call",
"message": "We have reached the time limit, let me transfer you to {{agent_name}}.",
"messageType": "static",
"transfer": {
"phoneNumberType": "e164",
"phoneNumber": "+962790000000",
"transferType": "cold",
"sipHeaders": [
{
"id": "<string>",
"name": "<string>",
"value": "<string>"
}
]
}
},
"contextManager": {
"mode": "active"
},
"onHoldMusicId": "48f7656f-098b-4c43-b165-7cfd2cc8ac30",
"ambientSoundId": "48f7656f-098b-4c43-b165-7cfd2cc8ac30",
"onHoldMusic": {
"id": "48f7656f-098b-4c43-b165-7cfd2cc8ac30",
"name": "Default",
"url": "https://cdn.tryhamsa.com/audio-assets/default.mp3?Signature=...",
"duration": 32.5
},
"ambientSound": {
"id": "48f7656f-098b-4c43-b165-7cfd2cc8ac30",
"name": "Default",
"url": "https://cdn.tryhamsa.com/audio-assets/default.mp3?Signature=...",
"duration": 32.5
}
},
"tools": [
{
"persistentId": "payment-api",
"toolId": "uuid-123",
"version": 2,
"toolType": "FUNCTION",
"nodeId": "node-payment",
"testResult": {},
"overrides": {},
"selectedFunctions": [
"create_ticket",
"get_ticket"
]
}
],
"knowledgeBaseItemsIds": [
"9b1c2d3e-4f5a-4b6c-8d7e-0f1a2b3c4d5e"
],
"voiceDictionaryIds": [
"4d5e6f7a-8b9c-4d0e-9f1a-2b3c4d5e6f7a"
],
"phoneNumber": {
"type": "TWILIO",
"id": "48f7656f-098b-4c43-b165-7cfd2cc8ac30"
},
"webhookUrl": null,
"webhookAuth": {
"authKey": "bearer",
"authSecret": "secret"
},
"workflow": {
"nodes": [
{
"id": "2ZHj3IUpJFc-83H2-f8d3",
"type": "start",
"label": "Start",
"message": "Hello, how can I help you today?",
"messageType": "prompt",
"position": {
"x": 0,
"y": 0
},
"metadata": {
"version": 1
},
"transitions": []
}
],
"edges": [],
"customVariables": [
{
"id": "z5QsyxUbrKPjYMGaMj1e1",
"name": "customer_name",
"dataType": "string",
"description": "",
"defaultValue": "john",
"extractionPrompt": "",
"enumValues": []
}
]
},
"resolvedWebTools": [
{}
],
"outcomeResponseShape": {},
"alwaysOnExtractVariables": {
"variables": [
{}
]
},
"account": {
"plan": "pro"
},
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-15T10:30:00Z",
"policyIds": [
"5f0c9a52-7a3e-4d0e-9a1f-1c2b3d4e5f60"
],
"policyStates": {
"5f0c9a52-7a3e-4d0e-9a1f-1c2b3d4e5f60": true
},
"guardrailIds": [
"5f0c9a52-7a3e-4d0e-9a1f-1c2b3d4e5f60"
],
"guardrailStates": {
"5f0c9a52-7a3e-4d0e-9a1f-1c2b3d4e5f60": true
},
"functionMacroIds": [
"5f0c9a52-7a3e-4d0e-9a1f-1c2b3d4e5f60"
],
"functionMacroStates": {
"5f0c9a52-7a3e-4d0e-9a1f-1c2b3d4e5f60": true
}
},
"values": {
"ORDER_ID": "A-10293"
},
"createdAt": "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"
}
}{
"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": 8404,
"message": "Policy not found!",
"messageKey": "PolicyNotFound",
"params": {
"reason": "NO_DRAFT"
}
}{
"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
Headers
Optional, up to 255 characters. Retry with the same key after a network error and you get the first answer back instead of the change being made twice (kept 10 minutes). Same key with a different body: 422 IdempotencyKeyReused. While the first request still runs: 409 IdempotencyKeyInProgress.
Maximum string length:
255Example:
"0b6f3c1e-retry-1"
Path Parameters
Was this page helpful?