MCP is live.Set upAsk the community
OmniDimension
Sessions

Create session

Create a short-lived voice session and get a ws_url for one conversation.

Connect the client and talk

The ws_url alone does nothing until a client connects to it. Creating the session is step 1; connecting a client is step 2. Your API key stays on your server: the client only ever receives the ws_url, which is single use and expires.

  • The token is valid to connect for 15 minutes after creation.
  • It covers one conversation and dies when that conversation ends.
  • Connect to the ws_url exactly as returned. Never build, edit, or cache it; the format is not part of the contract.
  • If the connection drops mid-call, reconnecting to the same ws_url re-attaches to the same conversation, so a brief network blip does not lose the call.

Two client paths, both using the same ws_url:

  • Browser: the @omnidim-ai/client web SDK handles microphone capture, agent audio playback, barge-in, and transcripts.
  • Any other platform: speak the wire protocol in Web call protocol: 16 kHz mono PCM16 frames in, audio and transcript events out.

This is step 1 of 2. Creating the session starts no audio. The client then connects to ws_url over WebSocket to talk.

Call this endpoint from your server with your API key. Return only ws_url to your client, and never the API key. The ws_url is single-use and expires, so it is safe to hand to your client. For how to connect and talk, see "Connect the client and talk" below the request details.

Body

agent_idintegerrequired

ID of the agent the session talks to.

typeenumrequired

The session type. Only voice is supported.

One of: voice

Default voice

custom_variablesobject

Per-session variables that personalize the conversation. Set server-side, so visitors cannot tamper with them. Two reserved keys are read as instructions for this session and never reach the agent: __languages and __post_call_actions.

+ Show child fields (2)
__languagesone of

Languages this session runs in, replacing the agent's configured list. The first entry is the language the visitor is greeted in. Send an array, or a pipe-separated string such as Hindi|English.

__post_call_actionsobject

Post-call actions for this session only, in the same shape as post_call_actions on agent create. Email and webhook only. They replace the agent's own post-call actions for this session. Items that cannot be used are skipped and listed in post_call_actions_ignored.

+ Show child fields (10)
emailobject
+ Show child fields (5)
enabledboolean
recipientsstring[]

Email addresses that should receive the notification.

includestring[]

Which sections to include in the email body.

One of: summaryextracted_variablesfullConversationsentiment

extracted_variablesobject[]

Variables the model should pull out of the conversation for the email.

+ Show child fields (2)
keystringrequired

Unique identifier for the variable in the post-call payload.

promptstringrequired

Instruction for the model on what to pull out of the conversation.

trigger_call_statusesstring[]

Call outcomes that should fire this action. Omit to use the default (completed, voicemail_detected). Pass an explicit list to also include failed calls, no-answers, busy signals, etc.

One of: completedvoicemail_detectedfailedno-answerbusycanceled

webhookobject
+ Show child fields (5)
enabledboolean
urlstring

Endpoint that receives a POST with the call payload.

Format uri

includestring[]

Which sections to include in the webhook body.

One of: summaryextracted_variablesfullConversationsentiment

extracted_variablesobject[]

Variables the model should pull out of the conversation for the webhook.

+ Show child fields (2)
keystringrequired

Unique identifier for the variable in the post-call payload.

promptstringrequired

Instruction for the model on what to pull out of the conversation.

trigger_call_statusesstring[]

Call outcomes that should fire this webhook. Omit to use the default (completed, voicemail_detected).

One of: completedvoicemail_detectedfailedno-answerbusycanceled

omni_crmobject

Save the call to Omni CRM.

+ Show child fields (4)
enabledboolean
includestring[]

Which sections to include in this action.

One of: summaryextracted_variablesfullConversationsentiment

extracted_variablesobject[]

Variables the model should pull out of the conversation for this action.

+ Show child fields (2)
keystringrequired

Unique identifier for the variable in the post-call payload.

promptstringrequired

Instruction for the model on what to pull out of the conversation.

trigger_call_statusesstring[]

Call outcomes that fire this action. Omit to use the default (completed, voicemail_detected).

One of: completedvoicemail_detectedfailedno-answerbusycanceled

cloud_whatsappobject

Send a Cloud WhatsApp template message after the call.

+ Show child fields (8)
enabledboolean
includestring[]

Which sections to include in this action.

One of: summaryextracted_variablesfullConversationsentiment

extracted_variablesobject[]

Variables the model should pull out of the conversation for this action.

+ Show child fields (2)
keystringrequired

Unique identifier for the variable in the post-call payload.

promptstringrequired

Instruction for the model on what to pull out of the conversation.

trigger_call_statusesstring[]

Call outcomes that fire this action. Omit to use the default (completed, voicemail_detected).

One of: completedvoicemail_detectedfailedno-answerbusycanceled

phone_number_idinteger

The id of your organization's Cloud WhatsApp number the message is sent from.

template_idinteger

An approved template on that number. A template that is not approved, or that belongs to another number, is refused.

template_variablesobject[]

Which extracted variable fills each template placeholder.

+ Show child fields (2)
indexstring

The placeholder number, as a string.

extracted_varstring

The key of the extracted variable whose value fills this placeholder.

templatesobject[]

One or more templates to send, each with its variable mapping.

+ Show child fields (4)
template_idinteger

An approved template on the chosen number.

usage_descriptionstring

When this template should be sent. After the call, the model reads these descriptions to choose which templates fit the conversation.

always_sendboolean

Send this template after every call, whichever templates the model chooses.

variable_mappingsobject[]

How to fill each template placeholder.

+ Show child fields (5)
indexstring

The placeholder number, as a string.

extracted_varstring

The extracted variable whose value fills this placeholder.

static_valuestring

A fixed value for this placeholder. When set, it is used instead of the extracted variable.

modeenum

Which input the dashboard shows for this placeholder. It does not change the value sent: a static_value is used first, then the extracted variable, then fallback_value.

One of: variablestatic

fallback_valuestring

The value to use when the variable is not extracted.

workflowobject

Trigger a workflow after the call.

+ Show child fields (5)
enabledboolean
includestring[]

Which sections to include in this action.

One of: summaryextracted_variablesfullConversationsentiment

extracted_variablesobject[]

Variables the model should pull out of the conversation for this action.

+ Show child fields (2)
keystringrequired

Unique identifier for the variable in the post-call payload.

promptstringrequired

Instruction for the model on what to pull out of the conversation.

trigger_call_statusesstring[]

Call outcomes that fire this action. Omit to use the default (completed, voicemail_detected).

One of: completedvoicemail_detectedfailedno-answerbusycanceled

workflow_idinteger

The id of the workflow to run.

google_sheetsobject

Append the call to a Google Sheet. Sending this key replaces the agent's Google Sheets actions; leaving it out keeps them.

+ Show child fields (8)
enabledboolean
includestring[]

Which sections to include in this action.

One of: summaryextracted_variablesfullConversationsentiment

extracted_variablesobject[]

Variables the model should pull out of the conversation for this action.

+ Show child fields (2)
keystringrequired

Unique identifier for the variable in the post-call payload.

promptstringrequired

Instruction for the model on what to pull out of the conversation.

trigger_call_statusesstring[]

Call outcomes that fire this action. Omit to use the default (completed, voicemail_detected).

One of: completedvoicemail_detectedfailedno-answerbusycanceled

integration_idinteger

Required. The id of your Google Sheets integration.

spreadsheet_idstring

Required. The id in the sheet's URL, the part after /d/.

spreadsheet_namestring
worksheet_namestring

The tab to append to. Defaults to Sheet1.

slackobject

Post the call to a Slack channel. Sending this key replaces the agent's Slack actions; leaving it out keeps them.

+ Show child fields (7)
enabledboolean
includestring[]

Which sections to include in this action.

One of: summaryextracted_variablesfullConversationsentiment

extracted_variablesobject[]

Variables the model should pull out of the conversation for this action.

+ Show child fields (2)
keystringrequired

Unique identifier for the variable in the post-call payload.

promptstringrequired

Instruction for the model on what to pull out of the conversation.

trigger_call_statusesstring[]

Call outcomes that fire this action. Omit to use the default (completed, voicemail_detected).

One of: completedvoicemail_detectedfailedno-answerbusycanceled

integration_idinteger

Required. The id of your Slack integration.

channel_idstring

The channel id. Send this or channel_name.

channel_namestring

The channel name. Send this or channel_id.

salesforceobject

Create or update a Salesforce record from the call. Sends a fixed set of fields for the object, so it takes no extracted_variables. Sending this key replaces the agent's Salesforce actions; leaving it out keeps them.

+ Show child fields (10)
enabledboolean
includestring[]

Which sections to include in this action.

One of: summaryextracted_variablesfullConversationsentiment

extracted_variablesobject[]

Variables the model should pull out of the conversation for this action.

+ Show child fields (2)
keystringrequired

Unique identifier for the variable in the post-call payload.

promptstringrequired

Instruction for the model on what to pull out of the conversation.

trigger_call_statusesstring[]

Call outcomes that fire this action. Omit to use the default (completed, voicemail_detected).

One of: completedvoicemail_detectedfailedno-answerbusycanceled

integration_idinteger

Required. The id of your Salesforce integration.

object_nameenum

Defaults to Lead.

One of: LeadContactAccountOpportunityCaseTaskProduct

actionenum

upsert finds the record by the caller's number and updates it or creates it. create creates a new record every call. Defaults to create.

One of: createupsert

match_fieldstring

upsert only: the phone field the caller's number is looked up in. Defaults to Phone.

log_callboolean

Log the call on the record, with the summary and recording link. Defaults to false.

add_noteboolean

Add the call summary as a note on the record. Defaults to false.

hubspotobject

Create a HubSpot record from the call. Sends a fixed set of fields for the object, so it takes no extracted_variables. Sending this key replaces the agent's HubSpot actions; leaving it out keeps them.

+ Show child fields (6)
enabledboolean
includestring[]

Which sections to include in this action.

One of: summaryextracted_variablesfullConversationsentiment

extracted_variablesobject[]

Variables the model should pull out of the conversation for this action.

+ Show child fields (2)
keystringrequired

Unique identifier for the variable in the post-call payload.

promptstringrequired

Instruction for the model on what to pull out of the conversation.

trigger_call_statusesstring[]

Call outcomes that fire this action. Omit to use the default (completed, voicemail_detected).

One of: completedvoicemail_detectedfailedno-answerbusycanceled

integration_idinteger

Required. The id of your HubSpot integration.

object_nameenum

Required.

One of: contactcompanydealticket

zoho_biginobject

Log the call in Zoho Bigin. Sending this key replaces the agent's Zoho Bigin actions; leaving it out keeps them.

+ Show child fields (8)
enabledboolean
includestring[]

Which sections to include in this action.

One of: summaryextracted_variablesfullConversationsentiment

extracted_variablesobject[]

Variables the model should pull out of the conversation for this action.

+ Show child fields (2)
keystringrequired

Unique identifier for the variable in the post-call payload.

promptstringrequired

Instruction for the model on what to pull out of the conversation.

trigger_call_statusesstring[]

Call outcomes that fire this action. Omit to use the default (completed, voicemail_detected).

One of: completedvoicemail_detectedfailedno-answerbusycanceled

integration_idinteger

Required. The id of your Zoho Bigin integration.

create_call_logboolean

Log the call. Defaults to true.

update_contactboolean

Update a matching contact with what the call captured. Defaults to true.

create_contactboolean

Create a contact when no contact matches. Defaults to true.

metadataobject

Key-value pairs stored on the session for your own tracking (e.g. CRM or lead IDs). Not shared with the agent; echoed back as metadata in the post-call webhook so you can correlate results with your records.

user_idintegerresellers only

Reseller keys only: act as one of your clients by its user id. Omit it to act on your own account. How acting for a client works.

Was this page helpful?