Skip to main content
PATCH
Update an agent (v1)
Required scope: agents.edit
Scopes apply to scoped API keys. Keys issued without scopes can call every /v1 endpoint.

Authorizations

Authorization
string
header
required

Your API key, e.g. pk_live_xxxxxxxxxxxxxxxxxxxxxxxx.

Path Parameters

id
string
required

Body

application/json
name
string
Required string length: 1 - 100
prompt
string
Required string length: 1 - 128000
greeting
string | null
Maximum string length: 2000
voice
string
Minimum string length: 1
preCallVariables
string[] | null
Maximum array length: 100
Pattern: ^[a-zA-Z_][a-zA-Z0-9_]*$
extractionConfig
object | null
agentType
enum<string>
Available options:
OUTBOUND,
INBOUND
enableRecording
boolean
endCallEnabled
boolean
endCallMessage
string | null
Maximum string length: 500
endCallTriggers
enum<string>[] | null
Maximum array length: 4
Available options:
CALLER_GOODBYE,
GOAL_COMPLETED,
IDLE,
REMOVE_FROM_LIST
maxCallDurationSecs
integer
Required range: 60 <= x <= 3600
backgroundAudioId
string | null
backgroundAudioVolume
number | null
Required range: 0 <= x <= 1
voicemailDetectionEnabled
boolean
voicemailMessage
string | null
Maximum string length: 500
screenerHandlingEnabled
boolean
transferEnabled
boolean
transferNumber
string | null
Maximum string length: 32
Pattern: ^\+\d{8,15}$
transferMessage
string | null
Maximum string length: 500
transferTriggers
enum<string>[] | null
Available options:
CALLER_ASKS_HUMAN,
FRUSTRATED,
ASKS_MANAGER,
UNKNOWN_QUESTION,
BILLING
transferMode
enum<string>

STATIC transfers to transferNumber. WEBHOOK asks transferWebhookUrl for a number at call time; transferNumber is then the fallback.

Available options:
STATIC,
WEBHOOK
transferWebhookUrl
string | null

HTTPS URL that answers {"to_number":"+E.164"} when a caller asks for a human. Cannot be set with an API key.

Maximum string length: 2048
transferWebhookSecret
string | null

Write-only signing secret for requests to transferWebhookUrl. A string sets it, null or "" removes it, omit to keep. Never returned. Cannot be set with an API key.

Maximum string length: 1024
transferWebhookTimeoutMs
integer

How long transferWebhookUrl has to answer, in milliseconds (default 3000).

Required range: 500 <= x <= 4000
studioConfig
object
abilities
object | null
flowGraph
object | null

Response

OK

id
string
required
name
string
required
prompt
string
required
greeting
string | null
required
voice
string
required
status
string
required
preCallVariables
string[] | null
required
variables
string[]
required
systemVariables
string[]
required
extractionConfig
object | null
required
agentType
string
required
enableRecording
boolean
required
endCallEnabled
boolean
required
endCallMessage
string | null
required
endCallTriggers
string[] | null
required
maxCallDurationSecs
number | null
required
backgroundAudioId
string | null
required
backgroundAudioVolume
number | null
required
voicemailDetectionEnabled
boolean
required
voicemailMessage
string | null
required
screenerHandlingEnabled
boolean
required
transferEnabled
boolean
required
transferNumber
string | null
required
transferMessage
string | null
required
transferTriggers
string[] | null
required
transferMode
enum<string>
required
Available options:
STATIC,
WEBHOOK
transferWebhookUrl
string | null
required
transferWebhookTimeoutMs
number
required
hasTransferWebhookSecret
boolean
required
language
string
required
studioConfig
object | null
required
abilities
object | null
required
promptEditedManually
boolean
required
createdAt
string
required
updatedAt
string
required
warnings
object[]