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"
}
Agents
Create agent
Create a new AI agent in a Nedzo workspace via the REST API. Configure the agent type, prompt, voice, language, model, actions, and knowledge base.
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"
}
Create a new agent within a workspace.
workspaceId is required for account-scoped API keys and inferred from the key for workspace-scoped keys. See Workspace ID and Request Scope.Common Fields
string
required
Agent name (1-255 characters)
string
required
Type of agent to create. Valid values:
Voice, Chat, Widgetstring
Call direction for Voice agents:
inbound or outbound (default: “inbound”). Ignored for Chat and Widget agents.string
Workspace UUID (required for account API keys, optional for workspace API keys)
string
System prompt for the agent
string
Agent language. Valid values:
english, spanish, french, german, portuguese, dutch, chinese, japanese (default: “english”)boolean
Whether the agent is active (default: true)
Type-Specific Fields
- Voice
- Chat
- Widget
string
Opening line the agent says when starting a conversation
string
Voice ID for text-to-speech
boolean
Enable voicemail detection (default: false). Typically used with outbound direction.
string
Message to leave on voicemail
boolean
Enable background sound (default: true)
boolean
When this is enabled, no logs, recordings, or transcriptions will be stored (default: false)
integer
Maximum call duration in minutes, 1-60 (default: 30)
number
Voice speed multiplier, 0.5-1.5 (default: 1.0)
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.string
deprecated
Deprecated. Use
postConversationWebhookUrl instead. Still accepted on input for backwards compatibility; responses always use the new field.string
URL to receive a POST request after each chat conversation ends (SMS, Instagram, Messenger, email, or web chat). The payload includes the transcript, summary, channel, contact details, and extracted fields. Set to
null to disable. See the Post-conversation webhook page for the full payload.string
URL to receive a POST request after each web agent conversation ends. The payload includes the transcript, summary, outcome, duration, and extracted fields. Set to
null to disable. See the Post-conversation webhook page for the full payload.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"
}
Was this page helpful?
