Skip to main content
POST
Create and initiate a webcall session
Legacy endpoint - deprecated. Unversioned endpoints are scheduled for removal on July 31, 2026. A public v1 replacement is not currently listed in the v1 reference. This endpoint remains available for existing integrations until then.
Creates a browser-based web call session for an agent. The v1 path is /webcalls. Legacy unversioned /webcall integrations can continue during the transition window, but new v1 integrations should use /webcalls.

When to use this

  • Website embeds: let a visitor start a voice conversation from a page.
  • Product demos: launch a temporary web call without dialing a phone number.
  • Support flows: collect web visitor context and pass it to the agent as metadata.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

X-API-Key
string

API key for authentication (alternative to JWT token)

Body

application/json
phone_number
string
required

Phone number to call (must include country code). Format: +[country code][phone number]

Example:

"+1234567890"

agent_id
string
required

Agent ID to use for the call. Must belong to the authenticated organization.

Example:

"ag_12345678901234"

metadata
object
required

Metadata for the call including customer information and any additional context. This data will be available during the call for personalization.

Example:
agent_version_number
number

Specific agent version number to use (optional). If provided, must be a published version. If not provided, will use the latest published version.

Example:

2

Response

Webcall session created successfully

session_id
string
required

Unique session ID for the webcall. This is the call log ID that can be used to track the webcall session.

Example:

"mf0x4riongyz6h"

agent_id
string
required

Agent ID used for the webcall

Example:

"0e709fd2-8339-46fa-8e28-ca8c66e00f43"

call_id
string
required

Call ID from Nexa Speech API

Example:

"mf0x4riongyz6h"

state
string
required

Current state of the webcall session

Example:

"created"

websocket_url
string
required

WebSocket URL for connecting to the webcall session

Example:

"/webcall/ws/mf0x4riongyz6h"

message
string
required

Success message from the API

Example:

"Webcall session created successfully"