Web calls API

Create web call

POST/v1/calls/web

Request body application/json

agent_idstringrequired
agent_versioninteger | string

Default 0

dialgem_llm_dynamic_variablesobject
metadataobject

Returns

201 with the fields below.

call_idstringrequired

The new call's id.

agent_idstringrequired

The agent that will answer.

agent_versionintegerrequired

The agent version the call will run. 0 is the live draft.

access_tokenstringrequired

A one-use token for the browser SDK. Hand it to the visitor's page; it cannot be reused.

expires_atstringrequired

ISO 8601 time the token stops working.

expires_inintegerrequired

Seconds until the token stops working.

curl -X POST "https://api.dialgem.com/v1/calls/web" \
  -H "X-API-Key: $DIALGEM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "agent_id": "agent_123"
  }'
Response 201
{
  "call_id": "call_123",
  "agent_id": "agent_123",
  "agent_version": 0,
  "access_token": "string",
  "expires_at": "string",
  "expires_in": 0
}

Get web call settings

GET/v1/web-calls/settings

Returns

200 with the fields below.

allowed_originsarray<string>required

Websites allowed to start browser calls, as origins such as `https://app.example.com`.

any_originbooleanrequired

True when any website may start browser calls (the list contains `*`).

limitsobjectrequired

The limits that apply to browser calls.

curl "https://api.dialgem.com/v1/web-calls/settings" \
  -H "X-API-Key: $DIALGEM_API_KEY"
Response 200
{
  "allowed_origins": [
    "string"
  ],
  "any_origin": false,
  "limits": {
    "max_concurrent_calls": 0,
    "tokens_per_minute": 0,
    "token_ttl_s": 0
  }
}

Set web call settings

PUT/v1/web-calls/settings

Request body application/json

allowed_originsarray<string>required

Returns

200 with the fields below.

allowed_originsarray<string>required

Websites allowed to start browser calls, as origins such as `https://app.example.com`.

any_originbooleanrequired

True when any website may start browser calls (the list contains `*`).

limitsobjectrequired

The limits that apply to browser calls.

curl -X PUT "https://api.dialgem.com/v1/web-calls/settings" \
  -H "X-API-Key: $DIALGEM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "allowed_origins": [
      "string"
    ]
  }'
Response 200
{
  "allowed_origins": [
    "string"
  ],
  "any_origin": false,
  "limits": {
    "max_concurrent_calls": 0,
    "tokens_per_minute": 0,
    "token_ttl_s": 0
  }
}