Skip to main content
POST
Create Call

Authorizations

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

string
required
The call type to create. Use web_call for a browser-based call or outbound_call to place a phone call.
string
required
The unique ID of the agent that should own, handle, or be assigned to this resource. Use the id returned by the Agent API.
string
required
The caller ID used for outbound calls, in E.164 format. The number must be purchased, imported, or connected in Agni. Example: +14157774444.
string
required
The destination phone number for an outbound call, in E.164 format. Example: +12137774445.
object
Custom key-value data to attach to the resource. Use this for IDs or attributes from your own systems.
object
Dynamic variables injected into the agent prompt for this call. Keys should match variables used in the prompt template.

Response

boolean
Whether the request succeeded.
string
Human-readable status message.
string
LiveKit access token.
string
Room ID for the created call session.
string
Call session UUID.
string
LiveKit WebSocket URL.

Authorizations

X-Api-Key
string
header
required

Body

application/json
type
enum<string>
required

Call type

Available options:
web_call,
outbound_call
Example:

"outbound_call"

agent_id
string
required

Agent UUID

Example:

"<string>"

from_phone_number
string
required

Caller ID (for outbound)

Example:

"<string>"

to_phone_number
string
required

Destination phone (for outbound)

Example:

"<string>"

metadata
object

Custom key-value metadata

Example:
prompt_dynamic_variables
object

Variables for agent prompt

Example:

Response

200 - application/json

Successful response

success
boolean
message
string
access_token
string

LiveKit access token

room_id
string

Room ID for the created call session

session_id
string

Call session UUID

url
string

LiveKit WebSocket URL