Saltar para o conteúdo principal
PATCH
/
public
/
api
/
v1
/
agents
/
{agentPublicId}
Update agent
curl --request PATCH \
  --url https://api.gennia.ai/public/api/v1/agents/{agentPublicId} \
  --header 'Content-Type: application/json' \
  --header 'X-Api-Key: <api-key>' \
  --data '
{
  "aiModelPublicId": "9c3a4d22-1a8d-4b3f-9b1e-7a0f0c4f3e21",
  "audioListeningEnabled": false,
  "audioResponseEnabled": false,
  "avatarUrl": "https://cdn.example.com/avatars/support-bot.png",
  "categories": [
    "support",
    "billing"
  ],
  "description": "Answers questions about billing, refunds and account access.",
  "dynamicPromptEnabled": true,
  "followUpAfterHours": 24,
  "followUpBusinessHoursEnd": "18:00:00",
  "followUpBusinessHoursStart": "09:00:00",
  "followUpEnabled": false,
  "followUpInactivityMinutes": 30,
  "followUpIntervalMinutes": 60,
  "followUpMaxAttempts": 3,
  "followUpPrompt": "Politely check whether the customer still needs help.",
  "genuiEnabled": false,
  "longTermMemoryEnabled": false,
  "memoryCustomInstructions": "Remember customer preferences and prior issues.",
  "messageDelayEnabled": false,
  "messageDelayType": {
    "present": true
  },
  "messageSplittingEnabled": true,
  "name": "Support Bot",
  "sandboxEnabled": false,
  "systemPrompt": "You are a friendly support agent for Acme Corp.",
  "temperature": 0.7,
  "thinkingEffort": "medium",
  "thinkingEnabled": true,
  "ttsVoice": "alloy",
  "webSearchEnabled": true
}
'
{
  "aiModelName": "<string>",
  "aiModelPublicId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "audioListeningEnabled": true,
  "audioResponseEnabled": true,
  "avatarUrl": "<string>",
  "categories": [
    "<string>"
  ],
  "createdAt": "2023-11-07T05:31:56Z",
  "description": "<string>",
  "draftVersionNumber": 123,
  "dynamicPromptEnabled": true,
  "followUpAfterHours": 123,
  "followUpBusinessHoursEnd": "14:30:00",
  "followUpBusinessHoursStart": "14:30:00",
  "followUpEnabled": true,
  "followUpInactivityMinutes": 123,
  "followUpIntervalMinutes": 123,
  "followUpMaxAttempts": 123,
  "followUpPrompt": "<string>",
  "genuiEnabled": true,
  "hasExternalChannel": true,
  "hasUnpublishedChanges": true,
  "longTermMemoryEnabled": true,
  "memoryCustomInstructions": "<string>",
  "messageDelayEnabled": true,
  "messageSplittingEnabled": true,
  "name": "<string>",
  "publicId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "publishedVersionNumber": 123,
  "sandboxEnabled": true,
  "systemPrompt": "<string>",
  "temperature": 123,
  "thinkingEnabled": true,
  "ttsVoice": "<string>",
  "updatedAt": "2023-11-07T05:31:56Z",
  "webSearchEnabled": true
}

Autorizações

X-Api-Key
string
header
obrigatório

Parâmetros de caminho

agentPublicId
string<uuid>
obrigatório

Corpo

application/json

Body for updating an agent. All fields are independently optional; JsonNullable fields are tri-state (omit, set, or clear with null). Unknown fields are rejected with 400.

aiModelPublicId
object

Public ID of the AI model to use.

Exemplo:

"9c3a4d22-1a8d-4b3f-9b1e-7a0f0c4f3e21"

audioListeningEnabled
object

Enable audio listening (speech-to-text).

Exemplo:

false

audioResponseEnabled
object

Enable audio responses (text-to-speech).

Exemplo:

false

avatarUrl
object

New avatar URL (http or https).

Exemplo:

"https://cdn.example.com/avatars/support-bot.png"

categories
string[]

Up to 10 free-form category tags. Each tag must not exceed 100 characters.

Maximum array length: 10
Maximum string length: 100
Exemplo:
["support", "billing"]
description
object

New short description shown in the agent catalogue.

Exemplo:

"Answers questions about billing, refunds and account access."

dynamicPromptEnabled
object

Enable dynamic prompt variables for this agent.

Exemplo:

true

followUpAfterHours
object

Hours of inactivity before the first follow-up is sent (0..720).

Exemplo:

24

followUpBusinessHoursEnd
object

End of the business-hours window for follow-ups.

Exemplo:

"18:00:00"

followUpBusinessHoursStart
object

Start of the business-hours window for follow-ups.

Exemplo:

"09:00:00"

followUpEnabled
object

Enable proactive follow-up messages after inactivity.

Exemplo:

false

followUpInactivityMinutes
object

Minutes of inactivity considered idle for follow-up logic (1..1440).

Exemplo:

30

followUpIntervalMinutes
object

Minutes between follow-up attempts (1..10080).

Exemplo:

60

followUpMaxAttempts
object

Maximum number of follow-up attempts per conversation (1..10).

Exemplo:

3

followUpPrompt
object

Prompt used to generate follow-up messages.

Exemplo:

"Politely check whether the customer still needs help."

genuiEnabled
object

Enable generative UI responses.

Exemplo:

false

longTermMemoryEnabled
object

Enable persistent long-term memory across conversations.

Exemplo:

false

memoryCustomInstructions
object

Custom instructions guiding what the agent should remember.

Exemplo:

"Remember customer preferences and prior issues."

messageDelayEnabled
object

Insert artificial delay between messages to feel more natural.

Exemplo:

false

messageDelayType
object

Strategy used to compute the inter-message delay.

messageSplittingEnabled
object

Split long responses into multiple messages.

Exemplo:

true

name
string

New display name of the agent.

Required string length: 1 - 150
Exemplo:

"Support Bot"

sandboxEnabled
object

Enable the sandbox (computer) tool for this agent.

Exemplo:

false

systemPrompt
object

New system prompt content.

Exemplo:

"You are a friendly support agent for Acme Corp."

temperature
object

Sampling temperature between 0.0 and 2.0.

Exemplo:

0.7

thinkingEffort
object

Reasoning effort level when thinking is enabled.

Exemplo:

"medium"

thinkingEnabled
object

Enable extended thinking for reasoning-capable models.

Exemplo:

true

ttsVoice
object

TTS voice identifier used when audio responses are enabled.

Exemplo:

"alloy"

webSearchEnabled
object

Enable the web-search tool for this agent.

Exemplo:

true

Resposta

OK

Agent metadata + editable-state configuration.

aiModelName
string

Selected AI model display name; null when not yet configured.

aiModelPublicId
string<uuid>

Selected AI model public ID; null when not yet configured.

audioListeningEnabled
boolean
audioResponseEnabled
boolean
avatarUrl
string
categories
string[]
createdAt
string<date-time>
description
string
draftVersionNumber
integer<int32>
dynamicPromptEnabled
boolean
followUpAfterHours
integer<int32>
followUpBusinessHoursEnd
string
Exemplo:

"14:30:00"

followUpBusinessHoursStart
string
Exemplo:

"14:30:00"

followUpEnabled
boolean
followUpInactivityMinutes
integer<int32>
followUpIntervalMinutes
integer<int32>
followUpMaxAttempts
integer<int32>
followUpPrompt
string
genuiEnabled
boolean
hasExternalChannel
boolean
hasUnpublishedChanges
boolean

True if the editable state differs from the published snapshot.

longTermMemoryEnabled
boolean
memoryCustomInstructions
string
messageDelayEnabled
boolean
messageDelayType
enum<string>

Delay tier when messageDelayEnabled=true.

Opções disponíveis:
LOW,
MEDIUM,
HIGH,
RANDOM
messageSplittingEnabled
boolean
name
string
publicId
string<uuid>
publishedVersionNumber
integer<int32>
sandboxEnabled
boolean
status
enum<string>
Opções disponíveis:
draft,
active,
inactive,
archived
systemPrompt
string
temperature
number<float>
thinkingEffort
enum<string>

Thinking effort tier.

Opções disponíveis:
low,
medium,
high
thinkingEnabled
boolean
ttsVoice
string
updatedAt
string<date-time>
webSearchEnabled
boolean