Update an agent
update an AI agent.
PATCH
https://api.centerfy.ai/webhooks/inbound/agents/:id Headers
| Header | Required | Value | Description |
|---|---|---|---|
x-api-key | Yes | your sub-account API key (cfy_…) | Authenticates the request; or use Authorization: Bearer <key>. |
Content-Type | Yes | application/json | The request body is JSON. |
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string (uuid) | Yes | The agent id. |
Body parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
name | string | No | — | The agent’s display name; if present, must be a non-empty string. |
voice_id | string | No | — | The voice — accepts a friendly voice name (e.g. “Marissa”) or a raw voice id. If present, must be a non-empty string. |
llm_model | string | No | — | The LLM model; if present, must be a non-empty string. |
language | string | No | — | The agent language code; if present, must be a non-empty string. |
max_duration | number | No | — | Maximum call duration; if present, must be a number. |
temperature | number | No | — | LLM sampling temperature; if present, must be a number. |
silence_timeout | number | No | — | Silence timeout; if present, must be a number. |
voice_activity_timeout | number | No | — | End-of-turn wait: how long the caller must be silent before the agent replies, in milliseconds (800–3000; default 1000). Values under 100 mean the default. The alt spelling ‘voice_activbity_timeout’ is also accepted. |
interruption_sensitivity | string | No | — | How easily the caller can interrupt the agent while it is talking: low, medium (default) or high. Low ignores short noises but can miss a very short “yes” or “no”. Send "" to go back to the default. |
silence_checkin_seconds | number | No | — | Seconds of silence before the agent’s first “are you still there?” check-in (5–120; the agent keeps the check-ins inside silence_timeout). 0 or omitted = automatic, a quarter of silence_timeout. Send 0 to go back to automatic. |
ring_timeout_seconds | number | No | — | How long an outbound call rings before it counts as no answer, in seconds (15–120; default 30). Carrier voicemail usually answers after 25–40 s, so raise this when the agent should reach voicemail. Send 0 to go back to the default. |
background_noise | boolean | No | — | Whether ambient background noise is enabled; if present, must be a boolean. When set to true, ‘background_type’ is required. |
background_type | string | No | — | Ambient noise profile; if present, must be one of: call_center, coffee_shop, conventional_hall. Required when setting background_noise=true. |
voicemail_detection | boolean | No | — | Whether voicemail detection is enabled; if present, must be a boolean. When set to true, ‘voicemail_type’ is required. |
voicemail_type | string | No | — | Voicemail action; if present, must be one of: leave_message, hangup. Required when setting voicemail_detection=true; when ‘leave_message’, ‘voicemail_message’ is required. |
voicemail_message | string | No | — | The message left on voicemail; if present, must be a string. Required when voicemail_type=‘leave_message’. |
backcchanneling | boolean | No | — | Whether backchanneling is enabled; if present, must be a boolean. The alternate spelling ‘backchanneling’ is also accepted. |
is_active | boolean | No | — | Whether the agent is active; if present, must be a boolean. |
webhook | boolean | No | — | Whether an outbound webhook is enabled; if present, must be a boolean. When set to true, ‘webhook_url’ is required. |
webhook_url | string | No | — | The outbound webhook URL; if present, must be a string. Required when setting webhook=true. |
recording | boolean | No | — | Whether call recording is enabled; if present, must be a boolean. |
system_prompt | string | No | — | The agent’s instructions (system prompt); if present, must be a non-empty string. Read the current value with Get agent first if you want to edit rather than replace it. |
inbound_greeting | string | null | No | — | Verbatim opening line the agent speaks on inbound calls. Send "" or null to clear it, after which the agent opens the call from its system prompt. Max 2000 characters. |
outbound_greeting | string | null | No | — | Verbatim opening line the agent speaks on outbound calls. Send "" or null to clear it. Max 2000 characters. |
Request body
{
"system_prompt": "You are the friendly front-desk assistant for Acme Clinic. Book appointments, answer questions about opening hours and pricing, and transfer to a human when asked.",
"inbound_greeting": "Hi, thanks for calling Acme Clinic, this is Marissa. How can I help you today?",
"outbound_greeting": ""
}Example
curl -X PATCH "https://api.centerfy.ai/webhooks/inbound/agents/{id}" \
-H "x-api-key: $CENTERFY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"system_prompt": "You are the friendly front-desk assistant for Acme Clinic. Book appointments, answer questions about opening hours and pricing, and transfer to a human when asked.",
"inbound_greeting": "Hi, thanks for calling Acme Clinic, this is Marissa. How can I help you today?",
"outbound_greeting": ""
}' import { CenterfyClient } from "@centerfy/sdk";
const centerfy = new CenterfyClient({ apiKey: process.env.CENTERFY_API_KEY! });
const result = await centerfy.agents.update("<agentId>", {
"system_prompt": "You are the friendly front-desk assistant for Acme Clinic. Book appointments, answer questions about opening hours and pricing, and transfer to a human when asked.",
"inbound_greeting": "Hi, thanks for calling Acme Clinic, this is Marissa. How can I help you today?",
"outbound_greeting": ""
});
console.log(result); centerfy agents update <agentId> '{"system_prompt":"You are the friendly front-desk assistant for Acme Clinic. Book appointments, answer questions about opening hours and pricing, and transfer to a human when asked.","inbound_greeting":"Hi, thanks for calling Acme Clinic, this is Marissa. How can I help you today?","outbound_greeting":""}' MCP tool: centerfy_agents_update (see MCP server)
Response
{
"status": "success",
"agent": {
"id": "<agent_id>",
"name": "Front Desk Assistant",
"is_active": true,
"updated_at": "2026-10-12T10:25:00.000Z",
"system_prompt": "You are the friendly front-desk assistant for Acme Clinic. Book appointments, answer questions about opening hours and pricing, and transfer to a human when asked.",
"inbound_greeting": "Hi, thanks for calling Acme Clinic, this is Marissa. How can I help you today?",
"outbound_greeting": null
}
}Notes
Partial update — every field is optional, but the body must contain at least one updatable field. Sending one field never wipes the rest; existing configuration is preserved for fields you omit. Errors: 400 (invalid agent id / validation failure / empty body), 401 (unauthenticated), 404 (agent not found), 500 (server error). Success is 200. The response echoes the persisted system_prompt, inbound_greeting and outbound_greeting so you can confirm what was saved.