Create an agent

create an AI agent.

POST https://api.centerfy.ai/webhooks/inbound/agents

Headers

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

Body parameters

NameTypeRequiredDefaultDescription
namestringYes—the agent’s display name (non-empty string, required).
voice_idstringYes—the voice — accepts a friendly voice name (e.g. “Marissa”) or a raw voice id (e.g. “Sulafat”). Required, non-empty string.
llm_modelstringYes—the LLM model to use (non-empty string, required).
languagestringYes—the agent language code (non-empty string, required).
max_durationnumberYes—maximum call duration (required number).
temperaturenumberYes—LLM sampling temperature (required number).
silence_timeoutnumberYes—silence timeout (required number).
voice_activity_timeoutnumberYes—voice-activity timeout (required number). The alt spelling ‘voice_activbity_timeout’ is also accepted in its place.
background_noisebooleanYes—whether ambient background noise is enabled (required boolean). When true, ‘background_type’ is required and must be one of: call_center, coffee_shop, conventional_hall.
voicemail_detectionbooleanYes—whether voicemail detection is enabled (required boolean). When true, ‘voicemail_type’ is required (leave_message | hangup); when voicemail_type=‘leave_message’, ‘voicemail_message’ is required.
webhookbooleanYes—whether an outbound webhook is enabled (required boolean). When true, ‘webhook_url’ is required.
recordingbooleanYes—whether call recording is enabled (required boolean).
backcchannelingbooleanYes—whether backchanneling is enabled (required boolean). The alt spelling ‘backchanneling’ is also accepted in its place.
background_typestringNo—ambient noise profile; required only when background_noise=true. One of: call_center, coffee_shop, conventional_hall.
voicemail_typestringNo—voicemail action; required only when voicemail_detection=true. One of: leave_message, hangup.
voicemail_messagestringNo—the message left on voicemail; required only when voicemail_type=‘leave_message’.
webhook_urlstringNo—the outbound webhook URL; required only when webhook=true.
system_promptstringNo—the agent’s instructions; if omitted, a standard default prompt is applied.
is_activebooleanNo—whether the agent is active; defaults to true when omitted.

Request body

{
  "name": "Front Desk Assistant",
  "voice_id": "Marissa",
  "llm_model": "gpt-4o",
  "language": "en",
  "system_prompt": "You are the friendly front-desk assistant for Acme Clinic.",
  "max_duration": 600,
  "temperature": 0.7,
  "silence_timeout": 10,
  "voice_activity_timeout": 5,
  "background_noise": true,
  "background_type": "call_center",
  "voicemail_detection": true,
  "voicemail_type": "leave_message",
  "voicemail_message": "Sorry we missed you — please leave a message and we'll call back.",
  "backcchanneling": true,
  "webhook": true,
  "webhook_url": "https://example.com/agent-events",
  "recording": true,
  "is_active": true
}

Example

curl -X POST "https://api.centerfy.ai/webhooks/inbound/agents" \
  -H "x-api-key: $CENTERFY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "Front Desk Assistant",
  "voice_id": "Marissa",
  "llm_model": "gpt-4o",
  "language": "en",
  "system_prompt": "You are the friendly front-desk assistant for Acme Clinic.",
  "max_duration": 600,
  "temperature": 0.7,
  "silence_timeout": 10,
  "voice_activity_timeout": 5,
  "background_noise": true,
  "background_type": "call_center",
  "voicemail_detection": true,
  "voicemail_type": "leave_message",
  "voicemail_message": "Sorry we missed you — please leave a message and we'\''ll call back.",
  "backcchanneling": true,
  "webhook": true,
  "webhook_url": "https://example.com/agent-events",
  "recording": true,
  "is_active": true
}'
import { CenterfyClient } from "@centerfy/sdk";

const centerfy = new CenterfyClient({ apiKey: process.env.CENTERFY_API_KEY! });

const result = await centerfy.agents.create({
  "name": "Front Desk Assistant",
  "voice_id": "Marissa",
  "llm_model": "gpt-4o",
  "language": "en",
  "system_prompt": "You are the friendly front-desk assistant for Acme Clinic.",
  "max_duration": 600,
  "temperature": 0.7,
  "silence_timeout": 10,
  "voice_activity_timeout": 5,
  "background_noise": true,
  "background_type": "call_center",
  "voicemail_detection": true,
  "voicemail_type": "leave_message",
  "voicemail_message": "Sorry we missed you — please leave a message and we'll call back.",
  "backcchanneling": true,
  "webhook": true,
  "webhook_url": "https://example.com/agent-events",
  "recording": true,
  "is_active": true
});
console.log(result);
centerfy agents create '{"name":"Front Desk Assistant","voice_id":"Marissa","llm_model":"gpt-4o","language":"en","system_prompt":"You are the friendly front-desk assistant for Acme Clinic.","max_duration":600,"temperature":0.7,"silence_timeout":10,"voice_activity_timeout":5,"background_noise":true,"background_type":"call_center","voicemail_detection":true,"voicemail_type":"leave_message","voicemail_message":"Sorry we missed you — please leave a message and we'\''ll call back.","backcchanneling":true,"webhook":true,"webhook_url":"https://example.com/agent-events","recording":true,"is_active":true}'

MCP tool: centerfy_agents_create (see MCP server)

Response

{
  "status": "success",
  "agent": {
    "id": "f1e2d3c4-0000-4000-8000-000000000001",
    "name": "Front Desk Assistant",
    "system_prompt": "You are the friendly front-desk assistant for Acme Clinic.",
    "is_active": true,
    "created_at": "2026-06-12T10:20:00.000Z"
  }
}

Notes

Errors: 400 (validation — missing or invalid required fields, or conditional rules not met), 401 (unauthenticated), 500 (insert error). Success is 201.

© 2026 Centerfy AI. All rights reserved.