Skip to main content
POST
/
agents
curl -X POST "https://api.nedzo.ai/v1/agents" \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "name": "Customer Support Agent",
      "agentType": "Voice",
      "direction": "inbound",
      "workspaceId": "123e4567-e89b-12d3-a456-426614174000",
      "prompt": "You are a helpful customer support assistant.",
      "openingLine": "Hello! How can I help you today?",
      "language": "english",
      "voiceId": "voice_123",
      "backgroundSound": true,
      "callDuration": 30,
      "postConversationWebhookUrl": "https://example.com/webhooks/conversation-completed"
    }'
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "name": "Customer Support Agent",
  "agentType": "Voice",
  "direction": "inbound",
  "prompt": "You are a helpful customer support assistant.",
  "isActive": true,
  "backgroundSound": true,
  "openingLine": "Hello! How can I help you today?",
  "language": "english",
  "voicemail": false,
  "voicemailMessage": null,
  "hipaaCompliance": false,
  "callDuration": 30,
  "speed": 1.0,
  "voiceId": "voice_123",
  "postConversationWebhookUrl": "https://example.com/webhooks/conversation-completed",
  "createdAt": "2024-01-15T10:30:00Z",
  "updatedAt": "2024-01-15T10:30:00Z"
}

Documentation Index

Fetch the complete documentation index at: https://docs.nedzo.ai/llms.txt

Use this file to discover all available pages before exploring further.

Create a new agent within a workspace.

Common Fields

name
string
required
Agent name (1-255 characters)
agentType
string
required
Type of agent to create. Valid values: Voice, Chat, Widget
direction
string
Call direction for Voice agents: inbound or outbound (default: “inbound”). Ignored for Chat and Widget agents.
workspaceId
string
Workspace UUID (required for account API keys, optional for workspace API keys)
prompt
string
System prompt for the agent
language
string
Agent language. Valid values: english, spanish, french, german, portuguese, dutch, chinese, japanese (default: “english”)
isActive
boolean
Whether the agent is active (default: true)

Type-Specific Fields

openingLine
string
Opening line the agent says when starting a conversation
voiceId
string
Voice ID for text-to-speech
voicemail
boolean
Enable voicemail detection (default: false). Typically used with outbound direction.
voicemailMessage
string
Message to leave on voicemail
backgroundSound
boolean
Enable background sound (default: true)
hipaaCompliance
boolean
When this is enabled, no logs, recordings, or transcriptions will be stored (default: false)
callDuration
integer
Maximum call duration in minutes, 1-60 (default: 30)
speed
number
Voice speed multiplier, 0.5-1.5 (default: 1.0)
postConversationWebhookUrl
string
URL to receive a POST request after each conversation ends. The payload includes the transcript, summary, outcome, duration, contact details, and extracted fields. Set to null to disable. See the Post-conversation webhook page for the full payload.
postCallWebhookUrl
string
deprecated
Deprecated. Use postConversationWebhookUrl instead. Still accepted on input for backwards compatibility; responses always use the new field.
curl -X POST "https://api.nedzo.ai/v1/agents" \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "name": "Customer Support Agent",
      "agentType": "Voice",
      "direction": "inbound",
      "workspaceId": "123e4567-e89b-12d3-a456-426614174000",
      "prompt": "You are a helpful customer support assistant.",
      "openingLine": "Hello! How can I help you today?",
      "language": "english",
      "voiceId": "voice_123",
      "backgroundSound": true,
      "callDuration": 30,
      "postConversationWebhookUrl": "https://example.com/webhooks/conversation-completed"
    }'
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "name": "Customer Support Agent",
  "agentType": "Voice",
  "direction": "inbound",
  "prompt": "You are a helpful customer support assistant.",
  "isActive": true,
  "backgroundSound": true,
  "openingLine": "Hello! How can I help you today?",
  "language": "english",
  "voicemail": false,
  "voicemailMessage": null,
  "hipaaCompliance": false,
  "callDuration": 30,
  "speed": 1.0,
  "voiceId": "voice_123",
  "postConversationWebhookUrl": "https://example.com/webhooks/conversation-completed",
  "createdAt": "2024-01-15T10:30:00Z",
  "updatedAt": "2024-01-15T10:30:00Z"
}