Saltar al contenido principal
PATCH
/
v1
/
agent
/
{agent_id}
Update Agent
import requests

url = "http://localhost:3000/v1/agent/{agent_id}"

payload = {
    "name": "<string>",
    "description": "<string>",
    "prompt": "<string>",
    "greeting": "<string>",
    "time_before_start": 123,
    "voice_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "boosted_keywords": ["<string>"],
    "language": "es",
    "redirect_number": "<string>",
    "max_reminder_count": 1,
    "reminder_frequency_ms": 1001,
    "reminder_messages": ["<string>"],
    "knowledge_base_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
    "mode": "free",
    "conversational_path_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "integrations": [
        {
            "integration_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
            "tool_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"]
        }
    ],
    "call_tools": [
        {
            "call_tool_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
            "settings": {}
        }
    ]
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.text)
{
  "agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "modified_at": "2023-11-07T05:31:56Z",
  "created_at": "2023-11-07T05:31:56Z",
  "version_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "version_number": 123,
  "version_created_at": "2023-11-07T05:31:56Z",
  "voice": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "name": "<string>",
    "description": "<string>"
  },
  "language": "es",
  "mode": "free",
  "version_name": "<string>",
  "is_draft": false,
  "is_published": false,
  "name": "<string>",
  "description": "<string>",
  "prompt": "<string>",
  "greeting": "<string>",
  "time_before_start": 123,
  "boosted_keywords": [
    "<string>"
  ],
  "redirect_number": "<string>",
  "max_reminder_count": 3,
  "reminder_frequency_ms": 7500,
  "reminder_messages": [],
  "knowledge_base_ids": [],
  "conversational_path_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "integrations": [],
  "call_tools": []
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

agent_id
string<uuid>
required

Body

application/json
name
string | null

The name of the agent

description
string | null

The description given to the agent

prompt
string | null

The prompt given to the agent

greeting
string | null

The greeting message said by the agent to the caller at the beginning of the call

time_before_start
number | null

The time in seconds before the agent starts to speak

voice_id
string<uuid> | null

The voice id to be used by the agent

boosted_keywords
string[] | null

The keywords that are boosted for the agent

language
enum<string> | null

The language used by the agent

Opciones disponibles:
es,
en,
multi,
fr,
ca,
de,
bg,
zh,
zh-TW,
zh-HK,
cs,
da,
nl,
et,
fi,
nl-BE,
de-CH,
el,
hi,
hu,
id,
it,
ja,
ko,
lv,
lt,
ms,
no,
pl,
pt,
ro,
ru,
sk,
sv,
th,
tr,
uk,
vi
redirect_number
string | null

The phone number to use by the agent if needed

max_reminder_count
integer | null

Max reminders

Rango requerido: x >= 0
reminder_frequency_ms
integer | null

Frequency in ms for reminders

Rango requerido: x >= 1000
reminder_messages
string[] | null

List of messages for reminder

knowledge_base_ids
string<uuid>[] | null

The list of knowledge bases available for the agent to use

mode
enum<string> | null

The mode of the agent. Can be 'free' or 'path'

Opciones disponibles:
free,
path
conversational_path_id
string<uuid> | null

The id of the conversational path used by the agent.

integrations
IntegrationToolsRequest · object[] | null

The list of integrations and their tools to assign to the agent. If provided, replaces all existing integration assignments.

call_tools
CallToolRequest · object[] | null

The list of call-tools (built-in tools) to assign to the agent. If provided, replaces all existing call-tool assignments.

Response

Successful Response

agent_id
string<uuid>
required

The unique identifier for the agent

modified_at
string<date-time>
required

The date and time when the agent was last updated

created_at
string<date-time>
required

The date and time when the agent was created

version_id
string<uuid>
required

The version id of the agent

version_number
integer
required

The version number of the agent

version_created_at
string<date-time>
required

The date and time when the version was created

voice
Voice · object
required

The voice object used by the agent

language
enum<string>
required

The language used by the agent. Use multi for the agent using both english and spanish in the same call (multi will expand to more languages in the future)

Opciones disponibles:
es,
en,
multi,
fr,
ca,
de,
bg,
zh,
zh-TW,
zh-HK,
cs,
da,
nl,
et,
fi,
nl-BE,
de-CH,
el,
hi,
hu,
id,
it,
ja,
ko,
lv,
lt,
ms,
no,
pl,
pt,
ro,
ru,
sk,
sv,
th,
tr,
uk,
vi
mode
enum<string>
required

The mode of the agent. Can be 'free' or 'path'

Opciones disponibles:
free,
path
version_name
string | null

The version name of the agent

is_draft
boolean
default:false

Indicates if the agent is a draft version

is_published
boolean
default:false

Indicates if the agent is published

name
string | null

The name of the agent

description
string | null

The description given to the agent

prompt
string | null

The prompt given to the agent

greeting
string | null

The greeting message said by the agent to the caller at the beginning of the call. If set, the agent will always speak first both in inbound and outbound calls

time_before_start
number | null

The time in seconds before the agent starts to speak

boosted_keywords
string[] | null

he list of keywords that are boosted for the agent speech recognition. Use this to improve the agent's recognition of domain-specific terms. For example, ['bradycardia']

redirect_number
string | null

The phone number to use by the agent if the call needs to be redirected. If not provided, you won't be able to redirect the call even if the tool is present

max_reminder_count
integer
default:3

The maximum number of reminders that can be sent to the caller. If not provided, the default value is 3. Set this value to 0 to disable reminders

Rango requerido: x >= 0
reminder_frequency_ms
integer
default:7500

The frequency in milliseconds to send reminders to the caller. If not provided, the default value is 7500.

reminder_messages
string[]

The list of messages to send to the caller as reminders. If not provided, the default value is an empty list which makes the model to generate the reminder messages by itself. Please, note that when using an empty list, the reminder_frequency_ms can be a little bit higher than specified since it has to generate the messages

knowledge_base_ids
string<uuid>[] | null

The list of knowledge bases available for the agent to use

conversational_path_id
string<uuid> | null

The id of the conversational path used by the agent.

integrations
IntegrationToolsResponse · object[]

The list of integrations and their assigned tools for the agent

call_tools
CallToolResponse · object[]

The list of call-tools (built-in tools) assigned to the agent