Skip to main content
POST
/
api
/
v1
/
agents
/
Create Agent
curl --request POST \
  --url https://api.ravan.ai/api/v1/agents/ \
  --header 'Content-Type: application/json' \
  --header 'X-Api-Key: <api-key>' \
  --data '
{
  "organizationId": "<string>",
  "agentName": "<string>",
  "status": "<string>",
  "model": "<string>",
  "s2sModel": "<string>",
  "voiceId": "<string>",
  "temperature": 123,
  "reminderTriggerMs": 123,
  "reminderMaxCount": 123,
  "reminderMessage": "<string>",
  "ambientSound": "<string>",
  "ambientSoundVolume": 123,
  "maxCallDurationMs": 123,
  "ringDurationMs": 123,
  "voicemailMessage": "<string>",
  "voicemailDetectionTimeoutMs": 123,
  "voicemailCustomPatterns": [
    {}
  ],
  "postCallAnalysisModel": "<string>",
  "postCallAnalysisData": [
    {
      "name": "<string>",
      "description": "<string>",
      "type": "<string>",
      "choices": [
        "<string>"
      ]
    }
  ],
  "selectedTools": [
    {}
  ],
  "knowledgeBase": "<string>",
  "beginMessage": "<string>",
  "startSpeaker": "<string>",
  "prompt": "<string>",
  "webhookUrls": [
    "<string>"
  ],
  "endcallOnSilenceDuration": 123,
  "interruptionSensitivity": 123,
  "memory": true,
  "calendarTimezone": "<string>",
  "accent": [
    "<string>"
  ],
  "emotion": true,
  "salesforceCalendarId": "<string>",
  "emergencyFallback": "<string>"
}
'
{
  "success": true,
  "message": "<string>",
  "data": {
    "id": "<string>",
    "organizationId": "<string>",
    "agentName": "<string>",
    "status": "<string>",
    "model": "<string>",
    "s2sModel": "<string>",
    "voiceId": "<string>",
    "temperature": 123,
    "reminderTriggerMs": 123,
    "reminderMaxCount": 123,
    "reminderMessage": "<string>",
    "ambientSound": "<string>",
    "ambientSoundVolume": 123,
    "maxCallDurationMs": 123,
    "ringDurationMs": 123,
    "voicemailMessage": "<string>",
    "voicemailDetectionTimeoutMs": 123,
    "voicemailCustomPatterns": [
      {}
    ],
    "postCallAnalysisModel": "<string>",
    "postCallAnalysisData": [
      {}
    ],
    "selectedTools": [
      {}
    ],
    "knowledgeBase": "<string>",
    "beginMessage": "<string>",
    "startSpeaker": "<string>",
    "prompt": "<string>",
    "webhookUrls": [
      "<string>"
    ],
    "endcallOnSilenceDuration": 123,
    "interruptionSensitivity": 123,
    "memory": true,
    "calendarTimezone": "<string>",
    "accent": [
      "<string>"
    ],
    "emotion": true,
    "calcomStatus": "<string>",
    "ghlAssignUserIdList": [
      {}
    ],
    "crmSyncProviders": {},
    "salesforceCalendarId": "<string>",
    "salesforceAssignUserIdList": [
      {}
    ],
    "emergencyFallback": "<string>",
    "createdAt": "<string>",
    "updatedAt": "<string>"
  }
}
Actual endpoint: POST https://api.ravan.ai/api/v1/agents/

Authorizations

X-Api-Key
string
required
Your Agni API key used to authenticate the request. Pass it in the X-Api-Key header. Find or rotate it from your Ravan AI account settings.

Body

organizationId
string
The organization ID this agent belongs to.
agentName
string
The public-facing display name for the agent.
status
string
Agent status. Allowed values: ACTIVE, INACTIVE.
model
string
The LLM model identifier used by the agent for reasoning and responses.
s2sModel
string
The speech-to-speech model identifier used for realtime voice conversations.
voiceId
string
The voice ID used for the agent speech output.
temperature
number
Controls response randomness. Lower values are more deterministic; higher values are more varied. Range: 0.01.0.
reminderTriggerMs
integer
Milliseconds of silence before the agent sends a reminder message.
reminderMaxCount
integer
Maximum number of reminder messages the agent can send during a call.
reminderMessage
string
The message the agent sends as a reminder during silence.
ambientSound
string
Background sound profile to play during calls. Leave empty to disable.
ambientSoundVolume
number
Volume for the ambient sound. Range: 0 (muted) to 1 (full volume).
maxCallDurationMs
integer
Maximum allowed call duration in milliseconds.
ringDurationMs
integer
Maximum time in milliseconds to let an outbound call ring before treating it as unanswered.
voicemailMessage
string
Message to leave when voicemail is detected.
voicemailDetectionTimeoutMs
integer
Maximum time in milliseconds to wait for voicemail detection.
voicemailCustomPatterns
array
Custom patterns used for voicemail detection. Pass null to disable.
postCallAnalysisModel
string
Model used to generate post-call analysis such as summaries and sentiment.
postCallAnalysisData
array
Array of structured data fields to extract after the call.
selectedTools
array
Tools enabled for the agent. Pass null to disable.
knowledgeBase
string
Knowledge base ID to attach to this agent.
beginMessage
string
The first message the agent says when the conversation starts.
startSpeaker
string
Who speaks first. Allowed values: agent, user.
prompt
string
The system prompt used by the agent. Supports template variables like {{current_time_Asia/Calcutta}}.
webhookUrls
string[]
List of webhook URLs to receive call events.
endcallOnSilenceDuration
integer
Duration of silence in milliseconds after which the call ends automatically.
interruptionSensitivity
number
Sensitivity for detecting user interruptions. Range: 0.01.0.
memory
boolean
Whether the agent retains memory across turns in a conversation.
calendarTimezone
string
IANA timezone used for calendar scheduling.
accent
string[]
Accent preferences for the agent voice.
emotion
boolean
Whether the agent expresses emotion in its voice.
salesforceCalendarId
string
Salesforce calendar ID for appointment scheduling.
emergencyFallback
string
Backup phone number to transfer the call to on failure (E.164 format).

Response

success
boolean
Whether the request succeeded.
message
string
Human-readable status message. Example: Agent created successfully
data
object
Created agent object.