Skip to content

Update the draft

PATCH
/v1/agents/{id}
curl --request PATCH \
--url https://api.orvoca.com/v1/agents/example \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "name": "example", "greeting": "example", "instructions": "example", "language": "hi-IN", "auto_switch": true, "voice_id": "priya", "speed": 1, "settings": { "interruptions": true, "max_call_minutes": 1, "silence_timeout_s": 1, "transfer_number": "example", "record_calls": true, "ai_disclosure": true, "ai_disclosure_text": "example", "end_call_phrases": [ "example" ] }, "tool_ids": [] }'

Changes stay in the draft until the agent is published.

id
required
string
Media typeapplication/json
object
name
string
>= 2 characters <= 40 characters
greeting
string
>= 1 characters <= 300 characters
instructions
string
>= 1 characters <= 8000 characters
language

Marathi, Bengali, Gujarati, Punjabi and Odia only where call_languages on the workspace lists them

string
Allowed values: hi-IN en-IN kn-IN ta-IN te-IN ml-IN mr-IN bn-IN gu-IN pa-IN od-IN
auto_switch
boolean
voice_id
string
Allowed values: priya ritu neha pooja simran kavya ishita shreya roopa amelia sophia aditya rahul rohan amit dev ratan varun manan sumit kabir aayan shubh ashutosh advait
speed
number
>= 0.8 <= 1.3
settings
object
interruptions
boolean
max_call_minutes
integer
>= 1 <= 30
silence_timeout_s
integer
>= 5 <= 30
transfer_number
string | null
/^\+91\d{10}$/
record_calls
boolean
ai_disclosure
boolean
ai_disclosure_text
string
>= 1 characters <= 200 characters
end_call_phrases
Array<string>
<= 10 items
tool_ids

Tools from /v1/tools the agent may use

Array<string>
default: <= 20 items

Updated

Media typeapplication/json
object
id
required
string
name
required
string
status
required
string
Allowed values: draft live paused
template
required
string | null
draft
required
object
name
required
string
>= 2 characters <= 40 characters
greeting
required
string
>= 1 characters <= 300 characters
instructions
required
string
>= 1 characters <= 8000 characters
language
required

Marathi, Bengali, Gujarati, Punjabi and Odia only where call_languages on the workspace lists them

string
Allowed values: hi-IN en-IN kn-IN ta-IN te-IN ml-IN mr-IN bn-IN gu-IN pa-IN od-IN
auto_switch
required
boolean
voice_id
required
string
Allowed values: priya ritu neha pooja simran kavya ishita shreya roopa amelia sophia aditya rahul rohan amit dev ratan varun manan sumit kabir aayan shubh ashutosh advait
speed
required
number
>= 0.8 <= 1.3
settings
required
object
interruptions
required
boolean
max_call_minutes
required
integer
>= 1 <= 30
silence_timeout_s
required
integer
>= 5 <= 30
transfer_number
required
string | null
/^\+91\d{10}$/
record_calls
required
boolean
ai_disclosure
required
boolean
ai_disclosure_text
required
string
>= 1 characters <= 200 characters
end_call_phrases
required
Array<string>
<= 10 items
tool_ids

Tools from /v1/tools the agent may use

Array<string>
default: <= 20 items
has_unpublished_changes
required
boolean
published_version_id
required
string | null
outbound_number_id
required

Default number for outbound calls

string | null
created_at
required
string
updated_at
required
string | null

Example

{
"id": "agt_01JF8Z6Q3X7K9M2N4P6R8T0V2W",
"status": "draft",
"draft": {
"language": "hi-IN",
"voice_id": "priya",
"tool_ids": []
}
}

Invalid request

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
param
string
request_id
required
string

Example generated

{
"error": {
"code": "example",
"message": "example",
"param": "example",
"request_id": "example"
}
}

Not signed in or bad API key

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
param
string
request_id
required
string

Example generated

{
"error": {
"code": "example",
"message": "example",
"param": "example",
"request_id": "example"
}
}

Not allowed

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
param
string
request_id
required
string

Example generated

{
"error": {
"code": "example",
"message": "example",
"param": "example",
"request_id": "example"
}
}

Not found

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
param
string
request_id
required
string

Example generated

{
"error": {
"code": "example",
"message": "example",
"param": "example",
"request_id": "example"
}
}

Name taken

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
param
string
request_id
required
string

Example generated

{
"error": {
"code": "example",
"message": "example",
"param": "example",
"request_id": "example"
}
}