Skip to main content
POST
/
agents
curl --request POST \
  --url https://api.truedy.ai/api/public/v1/agents \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "Customer Support Agent",
  "voice_id": "voice_c7d82fec",
  "system_prompt": "You are a helpful customer support agent. Be friendly and professional. Ask how you can help the customer today."
}
'
{
  "data": {
    "id": "agt_f9447372",
    "name": "Customer Support Agent",
    "description": "AI-powered customer support",
    "status": "active",
    "voice_id": "voice_c7d82fec",
    "voice_name": "Sarah",
    "system_prompt": "You are a helpful customer support agent.",
    "model": "ultravox-v0.7",
    "tools": [],
    "knowledge_bases": [],
    "temperature": 0.7,
    "created_at": "2026-03-03T20:30:21.310278Z",
    "updated_at": "2026-03-03T20:30:21.310278Z"
  },
  "meta": {
    "request_id": "req_32e7531c-8",
    "ts": "2026-03-03T20:30:21.310278Z"
  }
}

Authorizations

Authorization
string
header
required

API key authentication. Include your API key in the Authorization header: Bearer <your_api_key>

Headers

X-Idempotency-Key
string

Optional idempotency key for safe retries

Body

application/json
name
string
required

Display name for the agent

Required string length: 1 - 255
Example:

"Customer Support Agent"

voice_id
string
required

ID of the voice to use (get available voices from GET /voices)

Example:

"voice_c7d82fec"

system_prompt
string
required

Instructions for how the agent should behave during calls

Minimum string length: 1
Example:

"You are a helpful customer support agent. Be friendly and professional. Ask how you can help."

description
string | null

Optional description of the agent's purpose

Maximum string length: 1000
Example:

"AI-powered customer support agent for handling inquiries"

greeting
string | null

Optional custom greeting message

Example:

"Hello! Thank you for calling. How can I help you today?"

temperature
number | null

LLM temperature (0=deterministic, 1=creative). Default: 0.7

Required range: 0 <= x <= 1
Example:

0.7

language_hint
string | null

BCP47 language code (e.g., en-US, es-ES, fr-FR)

Example:

"en-US"

recording_enabled
boolean | null

Enable call recording. Default: true

Example:

true

max_duration
string | null

Maximum call duration (e.g., 3600s for 1 hour)

Example:

"3600s"

join_timeout
string | null

Timeout for callee to answer (e.g., 30s)

Example:

"30s"

Response

Agent created successfully

data
object
required
meta
object
required