v77

latestOpenAPI 3.1.0MITraw.githubusercontent.com2026-08-012528701.8 MB
Calls

AI sidecar SWAIG tool webhook

Sent to a sidecar tool's web_hook_url (or the SWAIG defaults.web_hook_url) when the sidecar calls one of your functions. Your endpoint runs the function and returns a JSON object with a response string (the result the model reads next) and, optionally, an action — a single object or an array — telling the sidecar what to do. See Supported SWAIG actions for what you can return.

The sidecar only listens to the call and never speaks on it, so a say action is reported back to you as a callback rather than being spoken aloud.

postWebhookaiSidecarSwaigToolWebhook

Payload

functionstring required

The name of the function the model is calling.

call_idstring required

The ID of the call the sidecar is attached to.

global_dataobject

The sidecar's current global_data. Present when the sidecar has any.

Example payload

{
  "function": "lookup_competitor",
  "argument": {
    "parsed": [
      {
        "competitor": "ACME"
      }
    ],
    "raw": "{\"competitor\":\"ACME\"}",
    "substituted": "{\"competitor\":\"ACME\"}"
  },
  "call_id": "2e1e66e5-5d07-413d-9668-55542992eec0",
  "channel_data": {
    "call_id": "2e1e66e5-5d07-413d-9668-55542992eec0",
    "caller_id_name": "Jane Doe",
    "caller_id_number": "+15555550100",
    "destination_number": "+15555550199"
  }
}

Response

Webhook received