Skip to main content
POST
Create web session

Authorizations

Authorization
string
header
required

API key from Voxworks, sent as Authorization: Bearer YOUR_API_KEY.

Body

application/json
script_id
string
required

The script the call runs. Must belong to your team.

contact_id
string

Attach the call to a known contact. Omit to use your team's shared web contact.

did
string

One of your team's numbers, used as the AI-side number identity on the call record. Omit for a browser-only call.

participant_identity
string

A label for the visitor, carried through to the transcript.

objects
object

Object data keyed by object type name, linked to the contact.

Response

Session minted.

success
boolean
required
Example:

true

session_id
string
required

Identifies this session. No call exists yet — the call is created when the visitor connects.

session_token
string
required

Single-use token authorising this one call. Pass it to the browser client; it is already included in headers.

expires_at
string<date-time>
required

When the token stops being redeemable. Roughly two minutes after minting.

ws_url
string
required

Secure WebSocket URL to connect to. Read it from the response on every call rather than hardcoding it.

Example:

"wss://MEDIA_EDGE_HOST"

sip_domain
string
required
sip_username
string
required
sip_password
string
required

Connection bootstrap, not a credential. It grants no access on its own — the session token is what authorises the call.

target
string
required

SIP URI the browser dials.

Example:

"sip:web@MEDIA_EDGE_HOST"

headers
object
required

Call metadata to forward verbatim. Pass through unchanged; do not construct these yourself.

script_id
string
contact_id
string
did
string | null
max_concurrent
integer

Your team's concurrent-call ceiling, shared between web and phone calls.