Skip to main content
POST
/
v1
/
agent-create
curl -X POST https://api.voicy.co/functions/v1/agent-create \
  -H "Authorization: Bearer voicy_sk_live_xxx" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Appointment Booker",
    "language": "he",
    "prompt": "You are a friendly receptionist that books appointments.",
    "voice": "Keren",
    "welcome_message": "שלום, איך אפשר לעזור?",
    "variables_provided": [{ "name": "customer_name", "description": "The caller'\''s name" }],
    "variables_extracted": [{ "name": "appointment_date", "description": "The date the caller chose", "required": true }]
  }'
{
  "agent_id": "550e8400-e29b-41d4-a716-446655440000",
  "name": "Appointment Booker",
  "language": "he",
  "voice": "Keren",
  "agent_type": "singlePrompt",
  "active": true,
  "prompt": "You are a friendly receptionist that books appointments.",
  "welcome_message": "שלום, איך אפשר לעזור?",
  "variables_provided": [
    { "name": "customer_name", "description": "The caller's name" }
  ],
  "variables_extracted": [
    { "name": "appointment_date", "description": "The date the caller chose" }
  ],
  "created_at": "2026-06-06T10:00:00Z",
  "updated_at": "2026-06-06T10:00:00Z"
}
Creates a prompt-based voice agent and deploys it immediately — the returned agent_id can be used right away as override_agent_id on Dial.
Only prompt-based agents can be created via the API. Flow agents (multi-step conversational flows with branching, function calls, and knowledge bases) are built in the dashboard.

Body Parameters

name
string
required
Agent display name.
prompt
string
required
System prompt that defines the agent’s behavior.
language
string
default:"he"
Language code, e.g. he or en.
voice
string
default:"Keren"
Voice display name. One of Keren, Karmit, Kobi, Kfir, Dana, Dafna, Dorin, Dan, Dor, David, Sapir, Steve.
welcome_message
string
Message the agent speaks first when it answers. When empty, the agent opens the conversation from the prompt.
variables_provided
array
Variables to supply at call time (via vars_provided on Dial).
variables_extracted
array
Variables the agent should extract from the conversation after the call.

Response

The created Agent object.
curl -X POST https://api.voicy.co/functions/v1/agent-create \
  -H "Authorization: Bearer voicy_sk_live_xxx" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Appointment Booker",
    "language": "he",
    "prompt": "You are a friendly receptionist that books appointments.",
    "voice": "Keren",
    "welcome_message": "שלום, איך אפשר לעזור?",
    "variables_provided": [{ "name": "customer_name", "description": "The caller'\''s name" }],
    "variables_extracted": [{ "name": "appointment_date", "description": "The date the caller chose", "required": true }]
  }'
{
  "agent_id": "550e8400-e29b-41d4-a716-446655440000",
  "name": "Appointment Booker",
  "language": "he",
  "voice": "Keren",
  "agent_type": "singlePrompt",
  "active": true,
  "prompt": "You are a friendly receptionist that books appointments.",
  "welcome_message": "שלום, איך אפשר לעזור?",
  "variables_provided": [
    { "name": "customer_name", "description": "The caller's name" }
  ],
  "variables_extracted": [
    { "name": "appointment_date", "description": "The date the caller chose" }
  ],
  "created_at": "2026-06-06T10:00:00Z",
  "updated_at": "2026-06-06T10:00:00Z"
}