Pular para o conteúdo

PATCH /v1/agents/{id}

PATCH
/v1/agents/{id}
curl --request PATCH \
--url https://seu-endereco-da-api/v1/agents/example \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "name": "example", "avatar": "example", "description": "example", "status": "active", "replaceOnChannels": true, "model": "example", "temperature": 1, "instructions": "example", "greeting": "example", "tone": "example", "length": "example", "useEmojis": true, "language": "example", "fallbackToHuman": true, "memory": "curta", "testPhone": "example", "businessHoursConfigId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "outOfHours": "avisar", "forbiddenSubjects": [ "example" ], "attemptLimit": 1, "typingWaitSeconds": 1, "understandAudio": true, "voiceReply": "never", "voice": "alloy", "channelIds": [ "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" ], "intents": [ { "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "name": "example", "description": "example", "samples": [ "example" ], "enabled": true, "collect": [ { "key": "example", "label": "example", "question": "example", "type": "text", "required": true, "options": [ "example" ], "validationHint": "example", "saveToContact": true } ], "action": { "type": "reply", "replyText": "example", "replyVerbatim": true, "request": { "method": "GET", "url": "example", "headers": [ { "key": "example", "value": "example" } ], "body": "example" }, "connectionId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "transferKind": "department", "transferTargetId": "example", "transferLabel": "example", "transferFallbackDepartmentId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "media": [ { "name": "example", "kind": "image", "mediaKey": "example" } ], "charge": {}, "actions": [ {} ] } } ] }'

Permissão que a Chave de acesso precisa: Gerenciar agentes de IA (agents:manage).

id
required
string
Media typeapplication/json
object
name
string
>= 1 characters <= 80 characters
avatar
string
description
string
status
string
Allowed values: active flows paused draft
replaceOnChannels
boolean
model
string
temperature
number
<= 1
instructions
string
greeting
string
tone
string
length
string
useEmojis
boolean
language
string
fallbackToHuman
boolean
memory
string
Allowed values: curta normal longa
testPhone
string
nullable
businessHoursConfigId
string format: uuid
nullable
outOfHours
string
Allowed values: avisar calado
forbiddenSubjects
Array<string>
attemptLimit
number
nullable >= 1 <= 10
typingWaitSeconds
number
nullable >= 2 <= 10
understandAudio
boolean
voiceReply
string
Allowed values: never when_customer_audio always
voice
string
Allowed values: alloy ash ballad coral echo fable nova onyx sage shimmer verse
channelIds
Array<string>
intents
Array<object>
object
id
string format: uuid
name
required
string
>= 1 characters
description
required
string
samples
required
Array<string>
enabled
required
boolean
collect
required
Array<object>
object
key
required
string
>= 1 characters
label
required
string
question
required
string
type
required
string
Allowed values: text number email phone cpf date choice
required
required
boolean
options
Array<string>
validationHint
string
saveToContact
boolean
action
required
object
type
required
string
Allowed values: reply request transfer media charge resend_charge renegotiate acoes
replyText
string
replyVerbatim
boolean
request
object
method
required
string
Allowed values: GET POST PUT PATCH DELETE
url
required
string
headers
Array<object>
object
key
required
string
value
required
string
body
string
connectionId
string format: uuid
transferKind
string
Allowed values: department agent human ai
transferTargetId
string
transferLabel
string
transferFallbackDepartmentId
string format: uuid
media
Array<object>
object
name
required
string
kind
required
string
Allowed values: image video document audio
mediaKey
string
charge
object
key
additional properties
any
actions
Array<object>
object
Media typeapplication/json
object
id
required
string
name
required
string
avatar
required
string
description
required
string
status
required

Active answers its channels; flows answers only when a flow block or another AI passes it the conversation, and never holds a channel; paused and draft answer no one (draft still answers its test phone)

string
Allowed values: active flows paused draft
model
required
string
temperature
required
number
instructions
required
string
testPhone
required
string
nullable
businessHoursConfigId
required

Business hours the agent follows; null keeps the agent answering at any time

string format: uuid
nullable
outOfHours
required

What the agent does outside the business hours: tell the customer the right hours, or stay silent

string
Allowed values: avisar calado
forbiddenSubjects
required

Subjects the owner forbids the agent to talk about, added on top of the fixed rules; empty keeps the agent as it always was

Array<string>
attemptLimit
required

Consecutive turns without understanding before the agent hands off to a person; null never hands off for this reason

number
nullable >= 1 <= 10
typingWaitSeconds
required

Seconds the agent waits after the customer’s last message before answering, so a burst of short messages gets one reply; null answers each message at once

number
nullable >= 2 <= 10
understandAudio
required

True turns the customer’s audio into text before the agent answers, charged to the AI credit; false makes the agent ask the customer to write.

boolean
voiceReply
required

When the agent answers with a voice note generated from its reply, charged to the AI credit: never, only when the customer’s last message was audio, or always; replies with buttons or a list stay as text

string
Allowed values: never when_customer_audio always
voice
required

Voice of the agent’s voice notes

string
Allowed values: alloy ash ballad coral echo fable nova onyx sage shimmer verse
channelIds
required
Array<string>
intents
required
Array<object>
object
updatedAt
required
string format: date-time
template
required

Ready-made AI the agent was created from; null for an agent written by hand

object
id
required
string format: uuid
slug
required
string
name
required
string
version
required

Template version the agent follows

number
companionWarnings
required

Companions that stayed in draft when the agent was turned on: a flow with an invalid graph or a sequence without steps

Array<object>
object
kind
required
string
Allowed values: flow sequence
id
required
string format: uuid
name
required
string
message
required
string
replacedAgentNames
required

Names of the active agents of AI paused to free this agent’s channels (replaceOnChannels), joined by comma; null when none was paused

string
nullable

Example

{
"status": "active",
"outOfHours": "avisar",
"voiceReply": "never",
"voice": "alloy",
"companionWarnings": [
{
"kind": "flow"
}
]
}