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

ParameterTypeRequiredDescription
agentIdstring (UUID)YesThe agent to update

Headers

HeaderValueRequired
x-api-keycfy_your_api_keyYes
Content-Typeapplication/jsonYes

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.

FieldTypeRequiredDescription
namestringOptionalAgent display name
voice_idstringOptionalVoice model (“Sulafat”, “Aria”, “Ravi”, etc.)
max_durationnumberOptionalMax call length in minutes
temperaturenumberOptionalLLM creativity (0.0 = precise, 1.0 = creative)
silence_timeoutnumberOptionalSeconds of silence before AI speaks
voice_activity_timeoutnumberOptionalVoice detection threshold in ms
llm_modelstringOptionalAI model to use
languagestringOptionalLanguage code (e.g., “en-US”)
background_noisebooleanOptionalEnable ambient background audio
background_typestringConditionalBackground audio type. Required when background_noise=true
voicemail_detectionbooleanOptionalAuto-detect voicemail
voicemail_typestringConditionalAction on voicemail. Required when voicemail_detection=true
voicemail_messagestringConditionalVoicemail message text. Required when voicemail_type=leave_message
backcchannelingbooleanOptionalVerbal acknowledgments during calls
is_activebooleanOptionalMake agent live or pause it
webhookbooleanOptionalEnable post-call webhook
webhook_urlstringConditionalWebhook URL for call data. Required when webhook=true
recordingbooleanOptionalRecord 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

StatusMeaning
200Agent updated successfully
400No updatable fields provided, or validation error
401Unauthorized — invalid or missing API key
403Organization/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.

© 2026 Centerfy AI. All rights reserved.