Update an agent

update an AI agent.

PATCH https://api.centerfy.ai/webhooks/inbound/agents/:id

Headers

HeaderRequiredValueDescription
x-api-keyYesyour sub-account API key (cfy_…)Authenticates the request; or use Authorization: Bearer <key>.
Content-TypeYesapplication/jsonThe request body is JSON.

Path parameters

NameTypeRequiredDescription
idstring (uuid)YesThe agent id.

Body parameters

NameTypeRequiredDefaultDescription
namestringNo—The agent’s display name; if present, must be a non-empty string.
voice_idstringNo—The voice — accepts a friendly voice name (e.g. “Marissa”) or a raw voice id. If present, must be a non-empty string.
llm_modelstringNo—The LLM model; if present, must be a non-empty string.
languagestringNo—The agent language code; if present, must be a non-empty string.
max_durationnumberNo—Maximum call duration; if present, must be a number.
temperaturenumberNo—LLM sampling temperature; if present, must be a number.
silence_timeoutnumberNo—Silence timeout; if present, must be a number.
voice_activity_timeoutnumberNo—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_sensitivitystringNo—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_secondsnumberNo—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_secondsnumberNo—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_noisebooleanNo—Whether ambient background noise is enabled; if present, must be a boolean. When set to true, ‘background_type’ is required.
background_typestringNo—Ambient noise profile; if present, must be one of: call_center, coffee_shop, conventional_hall. Required when setting background_noise=true.
voicemail_detectionbooleanNo—Whether voicemail detection is enabled; if present, must be a boolean. When set to true, ‘voicemail_type’ is required.
voicemail_typestringNo—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_messagestringNo—The message left on voicemail; if present, must be a string. Required when voicemail_type=‘leave_message’.
backcchannelingbooleanNo—Whether backchanneling is enabled; if present, must be a boolean. The alternate spelling ‘backchanneling’ is also accepted.
is_activebooleanNo—Whether the agent is active; if present, must be a boolean.
webhookbooleanNo—Whether an outbound webhook is enabled; if present, must be a boolean. When set to true, ‘webhook_url’ is required.
webhook_urlstringNo—The outbound webhook URL; if present, must be a string. Required when setting webhook=true.
recordingbooleanNo—Whether call recording is enabled; if present, must be a boolean.
system_promptstringNo—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_greetingstring | nullNo—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_greetingstring | nullNo—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.

© 2026 Centerfy AI. All rights reserved.