Update Agent
Modify an existing AI agent's configuration — voice, model, behavior, or any setting.
PUT
Update Agent
Partial update — send only the fields you want to change. Every field from Create Agent (except organization_id and sub_account_id) is accepted as optional. Conditional rules still apply (e.g., if you set webhook=true, you must also provide webhook_url).
Endpoint
PUT https://crmwebhook.com/functions/v1/crm-api/update-agent/{agentId}
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
agentId | string (UUID) | Yes | The agent to update |
Headers
| Header | Value | Required |
|---|---|---|
x-api-key | cfy_your_api_key | Yes |
Content-Type | application/json | Yes |
Request Body
Send only the fields you want to change:
{
"name": "Updated Sales Bot",
"voice_id": "Aria",
"temperature": 0.5,
"is_active": false
}
Body Parameters
All fields are optional — include only the ones you want to update. organization_id and sub_account_id cannot be changed.
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Optional | Agent display name |
voice_id | string | Optional | Voice model (“Sulafat”, “Aria”, “Ravi”, etc.) |
max_duration | number | Optional | Max call length in minutes |
temperature | number | Optional | LLM creativity (0.0 = precise, 1.0 = creative) |
silence_timeout | number | Optional | Seconds of silence before AI speaks |
voice_activity_timeout | number | Optional | Voice detection threshold in ms |
llm_model | string | Optional | AI model to use |
language | string | Optional | Language code (e.g., “en-US”) |
background_noise | boolean | Optional | Enable ambient background audio |
background_type | string | Conditional | Background audio type. Required when background_noise=true |
voicemail_detection | boolean | Optional | Auto-detect voicemail |
voicemail_type | string | Conditional | Action on voicemail. Required when voicemail_detection=true |
voicemail_message | string | Conditional | Voicemail message text. Required when voicemail_type=leave_message |
backcchanneling | boolean | Optional | Verbal acknowledgments during calls |
is_active | boolean | Optional | Make agent live or pause it |
webhook | boolean | Optional | Enable post-call webhook |
webhook_url | string | Conditional | Webhook URL for call data. Required when webhook=true |
recording | boolean | Optional | Record calls |
Example Request
curl -X PUT \
https://crmwebhook.com/functions/v1/crm-api/update-agent/d8f2a229-2f5c-42ba-ac65-402f2c25fee2 \
-H "x-api-key: cfy_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"name": "docs api testing",
"voice_id": "Sulafat",
"max_duration": 30,
"temperature": 0.7,
"llm_model": "gpt-4o-mini",
"is_active": true
}'
Response Shape
{
"id": "d8f2a229-2f5c-42ba-ac65-402f2c25fee2",
"name": "docs api testing",
"is_active": true,
"updated_at": "2026-04-17T12:00:00Z"
}
Response Codes
| Status | Meaning |
|---|---|
200 | Agent updated successfully |
400 | No updatable fields provided, or validation error |
401 | Unauthorized — invalid or missing API key |
403 | Organization/sub-account mismatch with API key scope |
Common Update Patterns
{
"voice_id": "Aria"
} {
"is_active": false
} {
"llm_model": "gpt-4o",
"temperature": 0.5
} {
"webhook": true,
"webhook_url": "https://your-server.com/call-complete"
} Will updating an active agent interrupt live calls?
No. Changes apply to the next call. Any call in progress continues with the previous configuration.
Can I change the organization or sub-account?
No. organization_id and sub_account_id are set at creation and cannot be changed. Create a new agent in the target sub-account instead.