SignalWire AI Webhooks API

Callbacks an AI agent sends to your server. The same payloads apply to every surface an agent runs on — voice calls, Amazon Bedrock agents, sidecar agents, and text conversations.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/signalwire-ai-webhooks-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no email required.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

signalwire-ai-webhooks-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: SignalWire REST AI Webhooks API
  version: 1.0.0
  contact:
    name: SignalWire
    url: https://support.signalwire.com/portal/en/newticket?departmentId=1029313000000006907&layoutId=1029313000000074011
    email: support@signalwire.com
  license:
    name: MIT
    url: https://github.com/signalwire/docs/blob/main/LICENSE
  termsOfService: https://signalwire.com/legal/signalwire-cloud-agreement
  description: Callbacks an AI agent sends to your server. The same payloads apply to every surface an agent runs on — voice calls, Amazon Bedrock agents, sidecar agents, and text conversations.
servers:
- url: https://{space_name}.signalwire.com
  description: SignalWire API
  variables:
    space_name:
      default: '{Your_Space_Name}'
      description: Your SignalWire Space name
security:
- SignalWireBasicAuth: []
tags:
- name: AI Webhooks
  description: Callbacks an AI agent sends to your server. The same payloads apply to every surface an agent runs on — voice calls, Amazon Bedrock agents, sidecar agents, and text conversations.
  externalDocs:
    url: https://signalwire.com/docs/apis
    description: Developer documentation on AI webhooks
paths: {}
webhooks:
  aiDebugWebhook:
    post:
      operationId: ai_debug_webhook
      summary: AI debug webhook
      description: 'A diagnostic feed for a call that is still in progress. Set `debug_webhook_url` on your agent and

        every step it takes is posted to that URL as it happens: speech recognized, model called, tool

        invoked, context switched, error hit. Use it to work out why a call went the way it did — which

        tool the agent reached for, what came back, where a turn went wrong — or to react while the call is

        still live, such as paging a supervisor.


        Each request carries `call_info` plus one or more event properties, where the property name is the

        event. One moment can produce several: evaluating a `data_map` webhook sends `webhook`, `input`,

        `output`, `error_keys`, and `match` together. Handle the properties you recognize and ignore the

        rest, since the set grows over time.


        Setting the URL is what enables the feed. `debug_webhook_level` only widens it: at `2` it also

        carries `conversation_add`, `llm_request`, and `llm_response`, which fire on every turn and every

        model call.'
      parameters: []
      responses:
        '200':
          description: Webhook received
      tags:
      - AI Webhooks
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Webhooks.AI.AiDebugWebhookPayload'
      security:
      - {}
  aiPostPromptCallback:
    post:
      operationId: ai_post_prompt_callback
      summary: AI post-prompt callback
      description: 'Sent to your [`ai.post_prompt_url`](/docs/swml/reference/calling/ai) when the AI session ends. It

        carries the agent''s answer to your [`post_prompt`](/docs/swml/reference/calling/ai)

        alongside the full record of the call: the conversation, the tool calls, the timings, and the

        token counts. This is the one report you get per call, so store the body verbatim and extract only

        the fields you query. Nothing you return in the response is read.


        Read `action` first. It is `post_conversation` on the end-of-call report described here. The same

        URL also receives `fetch_conversation` when the agent starts with a stored conversation

        ([`save_conversation`](/docs/swml/reference/calling/ai/params#paramssave_conversation) with a

        `conversation_id`), asking your endpoint to return that conversation; that request carries the

        call and session fields but none of the summary fields. Answer it with the stored

        `conversation_summary`.


        The conversation appears three times. `call_log` is the filtered view, with interrupted segments

        consolidated. `raw_call_log` is unfiltered and append-only, and is the only place barge-in detail

        survives. `call_timeline` is a flat stream of typed events aligned to `raw_call_log`.


        [`amazon_bedrock`](/docs/swml/reference/calling/amazon-bedrock) agents send a different report.

        Write your handler against the

        [Bedrock post-prompt callback](#tag/calls/webhook/bedrockPostPromptCallback) instead.'
      parameters: []
      responses:
        '200':
          description: Webhook received
      tags:
      - AI Webhooks
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Webhooks.AI.AiPostPromptCallbackPayload'
      security:
      - {}
  aiSidecarCallback:
    post:
      operationId: ai_sidecar_callback
      summary: AI sidecar callback
      description: 'Sent to the sidecar''s `url` as an HTTP `POST` whenever you set one. The same event is always

        published in real time on the SignalWire Relay event channel (`calling.ai.sidecar`), so the

        webhook is optional. Each event is wrapped under `sidecar_event` — read that before checking its

        `type` and fields.


        This payload covers the envelope shared by every callback. For the fields specific to each `type`

        (such as `insight.raw`, `turn.transcript_delta`, or `final.summary`), see the

        [SWML ai_sidecar reference](/docs/swml/reference/calling/ai-sidecar#callback-types).'
      parameters: []
      responses:
        '200':
          description: Webhook received
      tags:
      - AI Webhooks
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Webhooks.AI.AISidecarCallbackPayload'
      security:
      - {}
  aiSidecarSwaigToolWebhook:
    post:
      operationId: ai_sidecar_swaig_tool_webhook
      summary: AI sidecar SWAIG tool webhook
      description: "Sent to a sidecar tool's `web_hook_url` (or the SWAIG `defaults.web_hook_url`) when the sidecar\ncalls one of your functions.\n\nYour endpoint runs the function and replies with a JSON object. Both fields are optional, so `{}`\nis a valid reply:\n\n- `response` — the result the model reads next. A plain string only; the\n  `{tool_result, tool_prompt}` object form that [`ai`](/docs/swml/reference/calling/ai) agents\n  accept is not read. Omit it and the model reads a default result.\n- `action` — a single action object or an array of them. See\n  [Supported SWAIG actions](/docs/swml/reference/calling/ai-sidecar#supported-swaig-actions) for\n  what you can return.\n\nThere is no `post_process` on a sidecar reply.\n\nThe sidecar only listens to the call and never speaks on it, so a `say` action is reported back to\nyou as a callback rather than being spoken aloud."
      parameters: []
      responses:
        '200':
          description: Webhook received
      tags:
      - AI Webhooks
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Webhooks.AI.AISidecarSwaigToolWebhookPayload'
      security:
      - {}
  aiSwaigToolWebhook:
    post:
      operationId: ai_swaig_tool_webhook
      summary: AI SWAIG tool webhook
      description: "Sent to a tool's `web_hook_url` (or the SWAIG `defaults.web_hook_url`) when an\n[`ai`](/docs/swml/reference/calling/ai) agent calls one of your functions.\n\nYour endpoint runs the function and replies with a JSON object — the same shape a `data_map`\noutput produces, because the platform reads both the same way. Every field is optional, so `{}` is\na valid reply and a handler that only steers the call can return `action` alone:\n\n- `response` — the result the agent reads next, written to the AI rather than spoken to the\n  caller. A plain string becomes the tool message as-is; the object form\n  `{tool_result, tool_prompt}` splits the data half from the steering half. Omit it and the agent\n  reads a default result.\n- `action` — a single action object or an array of them, executed on the live call.\n- `post_process` — hold the actions until after the agent has spoken. **Default:** `false`."
      parameters: []
      responses:
        '200':
          description: Webhook received
      tags:
      - AI Webhooks
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Webhooks.AI.AiSwaigToolWebhookPayload'
      security:
      - {}
  bedrockPostPromptCallback:
    post:
      operationId: bedrock_post_prompt_callback
      summary: Amazon Bedrock post-prompt callback
      description: 'Sent to your [`amazon_bedrock.post_prompt_url`](/docs/swml/reference/calling/amazon-bedrock) when

        the agent''s session ends, carrying its answer to your `post_prompt` alongside the record of the

        call. Nothing you return in the response is read.


        Bedrock agents send a different report from [`ai`](/docs/swml/reference/calling/ai) agents. There

        is no `call_timeline`, `previous_contexts`, `hard_timeout`, `call_ended_by`, or `ai_id_tag`;

        `raw_call_log` is a copy of `call_log` rather than a separate unfiltered view; `swaig_log` is

        always empty; `conversation_summary` is always present; and the `total_*` fields arrive without

        your having to enable accounting. `post_prompt_url` also takes no separate credentials here — put

        them in the URL as `username:password@url`. Write your handler against this payload, not the

        [AI post-prompt callback](#tag/calls/webhook/aiPostPromptCallback).'
      parameters: []
      responses:
        '200':
          description: Webhook received
      tags:
      - AI Webhooks
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Webhooks.AI.BedrockPostPromptCallbackPayload'
      security:
      - {}
  bedrockSwaigToolWebhook:
    post:
      operationId: bedrock_swaig_tool_webhook
      summary: Amazon Bedrock SWAIG tool webhook
      description: "Sent to a tool's `web_hook_url` (or the SWAIG `defaults.web_hook_url`) when an\n[`amazon_bedrock`](/docs/swml/reference/calling/amazon-bedrock) agent calls one of your functions.\nYour endpoint runs the function and replies with a JSON object. Both fields are optional, so `{}`\nis a valid reply:\n\n- `response` — the result the agent reads next. A plain string only here; the\n  `{tool_result, tool_prompt}` object form that [`ai`](/docs/swml/reference/calling/ai) agents\n  accept is not read. Omit it and the agent reads a default result.\n- `action` — a single action object or an array of them, executed on the live call.\n\nThere is no `post_process`: a Bedrock agent always defers actions until after it has spoken.\n\nBedrock agents send a different payload from [`ai`](/docs/swml/reference/calling/ai) agents. Notably\n`content_type` is `text/json` rather than `text/swaig`, `argument` carries no `substituted` value,\nthere is no `version`, `description`, or `argument_desc`, and the call's timing and caller fields\nare named differently. Write your handler against this payload, not the\n[AI SWAIG tool webhook](#tag/calls/webhook/aiSwaigToolWebhook)."
      parameters: []
      responses:
        '200':
          description: Webhook received
      tags:
      - AI Webhooks
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Webhooks.AI.BedrockSwaigToolWebhookPayload'
      security:
      - {}
  swaigSignatureRequest:
    post:
      operationId: swaig_signature_request
      summary: SWAIG function signature request
      description: "Sent once per [`SWAIG.includes`](/docs/swml/reference/calling/ai/swaig/includes) entry when an AI\nagent loads, to discover the functions your server hosts. Every way of building an agent sends it —\nSWML you write yourself, SWML a Server SDK generates, or an agent you configure in your Dashboard —\nbecause they all resolve `includes` the same way.\n\nReply with the function definitions you host, each shaped like an entry in\n[`SWAIG.functions`](/docs/swml/reference/calling/ai/swaig/functions#properties) — `function`,\n`description`, and `parameters`. Three forms are accepted:\n\n- an array of definitions, the usual one;\n- a single definition on its own;\n- an object `{functions, defaults}`, where `defaults` sets SWAIG defaults across the definitions\n  it carries — useful when they share a `web_hook_url` or auth.\n\nEvery definition you return is registered, whether or not it was named in the request's\n`functions` list.\n\nThis is not the payload a function call sends. It goes to the `includes` entry's `url`, using\n`auth_user` and `auth_password` when set. Your endpoint can also receive it outside of a call, as a\ncheck that it answers, so answer it the same way. When your project has a signing key, the request\ncarries an `X-SignalWire-Signature` header you can verify."
      parameters: []
      responses:
        '200':
          description: Webhook received
      tags:
      - AI Webhooks
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Webhooks.AI.SwaigSignatureRequestPayload'
      security:
      - {}
components:
  schemas:
    Webhooks.AI.AICallTimelineEntry:
      type: object
      required:
      - type
      properties:
        type:
          type: string
          description: 'What happened. `user_input`, `ai_response`, and `tool_result` cover the conversation; `pronounce`

            and `text_normalize` record text rewrites; anything else is the name of a logged action.'
          examples:
          - ai_response
        ts:
          type: number
          description: When it happened, as a Unix timestamp in microseconds. Omitted when the source entry had no timestamp.
          examples:
          - 1694541297950440
      unevaluatedProperties: {}
      description: One event on the call, in order. Beyond `type`, an entry carries the fields belonging to that type.
    Webhooks.AI.BedrockPostPromptCallbackPayload:
      type: object
      required:
      - content_type
      - content_disposition
      - conversation_type
      - call_id
      - app_name
      - ai_session_id
      - action
      - call_log
      - raw_call_log
      - post_prompt_data
      - global_data
      - swaig_log
      - conversation_summary
      properties:
        project_id:
          type: string
          description: Your project ID, when available.
          examples:
          - 4d0d6f16-5881-4fcc-92a4-02c51a91954d
        space_id:
          type: string
          description: Your Space ID, when available.
          examples:
          - 451ed9ff-e568-4222-8af9-4f9ab7428d09
        content_type:
          type: string
          description: The content type of the request body. Always `text/json`.
          examples:
          - text/json
        content_disposition:
          type: string
          description: How the body is delivered. Always `agent.summary` for the end-of-call report.
          examples:
          - agent.summary
        conversation_type:
          type: string
          description: The kind of conversation the agent ran. Always `voice`.
          examples:
          - voice
        call_id:
          type: string
          description: The ID of the call.
          examples:
          - 2e1e66e5-5d07-413d-9668-55542992eec0
        app_name:
          type: string
          description: The name of your Bedrock application. Defaults to `bedrock`.
          examples:
          - bedrock
        ai_session_id:
          type: string
          description: The ID of the AI session on the call. Matches `call_id` for Bedrock agents.
          examples:
          - 2e1e66e5-5d07-413d-9668-55542992eec0
        conversation_id:
          type: string
          description: The conversation ID, when the agent was configured with one.
          examples:
          - support-thread-4821
        action:
          type: string
          description: What the request is asking of you. Always `post_conversation` for the end-of-call report.
          examples:
          - post_conversation
        call_log:
          type: array
          items:
            $ref: '#/components/schemas/Webhooks.AI.AICallLogEntry'
          description: 'The conversation. Each entry carries a `role` of `system`, `user`, or `assistant` and its

            `content`.'
          examples:
          - - role: system
              content: You dispatch taxis.
            - role: user
              content: I need a ride to the airport.
        raw_call_log:
          type: array
          items:
            $ref: '#/components/schemas/Webhooks.AI.AICallLogEntry'
          description: A copy of `call_log`. Bedrock agents do not keep a separate unfiltered log.
        call_start_date:
          type: integer
          format: int64
          description: When the call was created, as a Unix timestamp in microseconds.
          examples:
          - 1694541295773508
        call_answer_date:
          type: integer
          format: int64
          description: When the call was answered, as a Unix timestamp in microseconds. `0` when it never was.
          examples:
          - 1694541296799504
        call_end_date:
          type: integer
          format: int64
          description: When the call ended, as a Unix timestamp in microseconds. `0` while the call is still up.
          examples:
          - 1694541335435503
        ai_start_date:
          type: integer
          format: int64
          description: When the agent started, as a Unix timestamp in microseconds.
          examples:
          - 1694541297950440
        ai_end_date:
          type: integer
          format: int64
          description: When the agent stopped, as a Unix timestamp in microseconds. Omitted while it is still running.
          examples:
          - 1694541335425164
        caller_id_name:
          type: string
          description: The caller's name, when available.
          examples:
          - Jane Doe
        caller_id_number:
          type: string
          description: The caller's number, when available.
          examples:
          - '+15555550100'
        times:
          type: array
          items:
            $ref: '#/components/schemas/Webhooks.AI.AIResponseTiming'
          description: Per-response performance metrics, one entry per generated reply. Included once the agent has any.
        total_minutes:
          type: number
          description: 'The number of billable minutes, with a minimum of one. Fractional durations are kept as they are;

            only a call under a minute is raised to `1`. Included once the agent has stopped.'
          examples:
          - 3.14
        total_input_tokens:
          type: integer
          description: Input tokens the session consumed. Included once the agent has stopped.
          examples:
          - 5627
        total_output_tokens:
          type: integer
          description: Output tokens the session produced. Included once the agent has stopped.
          examples:
          - 119
        total_wire_input_tokens:
          type: integer
          description: A copy of `total_input_tokens`. Included once the agent has stopped.
          examples:
          - 5627
        total_wire_input_tokens_per_minute:
          type: number
          description: '`total_input_tokens` divided by `total_minutes`. Included once the agent has stopped.'
          examples:
          - 1792.04
        total_wire_output_tokens:
          type: integer
          description: A copy of `total_output_tokens`. Included once the agent has stopped.
          examples:
          - 119
        total_wire_output_tokens_per_minute:
          type: number
          description: '`total_output_tokens` divided by `total_minutes`. Included once the agent has stopped.'
          examples:
          - 37.9
        total_tts_chars:
          type: integer
          description: Characters sent to text-to-speech. Included once the agent has stopped.
          examples:
          - 842
        total_tts_chars_per_min:
          type: number
          description: '`total_tts_chars` divided by `total_minutes`. Included once the agent has stopped.'
          examples:
          - 268.15
        total_asr_minutes:
          type: number
          description: Minutes of audio sent to speech recognition. Included once the agent has stopped.
          examples:
          - 2.41
        total_asr_cost_factor:
          type: number
          description: Always `1`. Bedrock agents do not vary the factor. Included once the agent has stopped.
          examples:
          - 1
        SWMLVars:
          type: object
          unevaluatedProperties: {}
          description: SWML variables for the call. Included when the call carries SWML state.
        SWMLCall:
          type: object
          unevaluatedProperties: {}
          description: SWML call state. Included when the call carries SWML state.
        post_prompt_data:
          allOf:
          - $ref: '#/components/schemas/Webhooks.AI.AIPostPromptData'
          description: The agent's answer to your `post_prompt`.
        global_data:
          type: object
          unevaluatedProperties: {}
          description: The session's final `global_data`. An empty object when you seeded none.
          examples:
          - customer_tier: premium
        swaig_log:
          type: array
          items:
            $ref: '#/components/schemas/Webhooks.AI.AISwaigLogEntry'
          description: Always an empty array. Bedrock agents do not report a tool-call log.
          examples:
          - []
        conversation_summary:
          type: string
          description: The agent's answer to your `post_prompt`, as plain text.
          examples:
          - Caller booked a ride from 123 Main St to the airport for 6pm.
      unevaluatedProperties:
        not: {}
    Webhooks.AI.AiPostPromptCallbackPayload:
      type: object
      required:
      - content_type
      - content_disposition
      - conversation_type
      - call_id
      - app_name
      - ai_session_id
      - action
      properties:
        project_id:
          type: string
          description: Your project ID, when available.
          examples:
          - 4d0d6f16-5881-4fcc-92a4-02c51a91954d
        space_id:
          type: string
          description: Your Space ID, when available.
          examples:
          - 451ed9ff-e568-4222-8af9-4f9ab7428d09
        content_type:
          type: string
          description: The content type of the request body. Always `text/json`.
          examples:
          - text/json
        content_disposition:
          type: string
          description: 'How the body is delivered. `agent.summary` on the end-of-call report, `agent.load_conversation`

            on a request for a stored conversation.'
          examples:
          - agent.summary
        conversation_type:
          type: string
          enum:
          - voice
          - chat
          description: 'The kind of conversation the agent ran: a call, or a text conversation held over the

            [AI chat endpoint](/docs/apis/rest/ai-chat/chat-methods).'
          examples:
          - voice
        call_id:
          type: string
          description: The ID of the call. On a chat conversation this carries the conversation id instead.
          examples:
          - 2e1e66e5-5d07-413d-9668-55542992eec0
        app_name:
          type: string
          description: The name of your AI application.
          examples:
          - ai
        ai_session_id:
          type: string
          description: The ID of the AI session on the call.
          examples:
          - a0d4e6e5-5d07-413d-9668-55542992eec0
        ai_id_tag:
          type: string
          description: 'A stable fingerprint of the model the agent ran. Two calls that used the same model share it, so

            you can group reports by model without recording the model name. Omitted when the session had no

            model.'
          examples:
          - d742c5d1d969d9fdbbd9bd1c52499f2d
        conversation_id:
          type: string
          description: The conversation ID, when the agent was configured with one.
          examples:
          - support-thread-4821
        action:
          type: string
          enum:
          - post_conversation
          - fetch_conversation
          description: 'What the request is asking of you. `post_conversation` is the end-of-call report;

            `fetch_conversation` asks your endpoint to return a stored conversation.'
          examples:
          - post_conversation
        call_log:
          type: array
          items:
            $ref: '#/components/schemas/Webhooks.AI.AICallLogEntry'
          description: 'The conversation, filtered: interrupted segments are consolidated and evicted entries dropped.

            Included when `action` is `post_conversation`.'
          examples:
          - - role: system
              content: You dispatch taxis.
            - role: user
              content: I need a ride to the airport.
        raw_call_log:
          type: array
          items:
            $ref: '#/components/schemas/Webhooks.AI.AICallLogEntry'
          description: 'The conversation, unfiltered and append-only. Interruption detail appears here and nowhere else.

            Included when `action` is `post_conversation`.'
        call_timeline:
          type: array
          items:
            $ref: '#/components/schemas/Webhooks.AI.AICallTimelineEntry'
          description: 'A flat stream of typed events aligned to `raw_call_log`, for replaying the call in order.

            Included when the session produced any.'
        previous_contexts:
          type: array
          items:
            type: array
            items:
              type: object
              unevaluatedProperties: {}
          description: 'Conversations from before each context switch, oldest first, one array of messages per switch.

            Included only when the agent switched context during the call.'
        hard_timeout:
          type: boolean
          description: 'Always `true` when present, meaning the session ended because it hit its configured time limit

            rather than finishing on its own. Omitted otherwise.'
          examples:
          - true
        call_start_date:
          type: integer
          format: int64
          description: When the call was created, as a Unix timestamp in microseconds.
          examples:
          - 1694541295773508
        call_answer_date:
          type: integer
          format: int64
          description: When the call was answered, as a Unix timestamp in microseconds. `0` when it never was.
          examples:
          - 1694541296799504
        call_end_date:
          type: integer
          format: int64
          description: When the call ended, as a Unix timestamp in microseconds.
          examples:
          - 1694541335435503
        ai_start_date:
          type: integer
          format: int64
          description: When the AI session started, as a Unix timestamp in microseconds.
          examples:
          - 1694541297950440
        call_ended_by:
          type: string
          description: Who or what ended the call. Included when the session recorded it.
          examples:
          - assistant
        ai_end_date:
          type: integer
          format: int64
          description: 'When the AI session ended, as a Unix timestamp in microseconds. Omitted when the session was

            still running.'
          examples:
          - 1694541335425164
        caller_id_name:
          type: string
          description: The caller's name, when available.
          examples:
          - Jane Doe
        caller_id_number:
          type: string
          description: The caller's number, when available.
          examples:
          - '+15555550100'
        times:
          type: array
          items:
            $ref: '#/components/schemas/Webhooks.AI.AIResponseTiming'
          description: 'Per-response performance metrics, one entry per generated reply. Included once the session has

            any.'
        SWMLVars:
          type: object
          unevaluatedProperties: {}
          description: SWML variables for the call. Included when the call carries SWML state.
        SWMLCall:
          type: object
          unevaluatedProperties: {}
          description: SWML call state. Included when the call carries SWML state.
        post_prompt_data:
          allOf:
          - $ref: '#/components/schemas/Webhooks.AI.AIPostPromptData'
          description: The agent's answer to your `post_prompt`. Included when `action` is `post_conversation`.
        global_data:
          type: object
          unevaluatedProperties: {}
          description: 'The session''s final `global_data`. Alongside anything you seeded, the session adds

            `caller_id_name` and `caller_id_number` when the call carries them. Included when `action` is

            `post_conversation`.'
          examples:
          - customer_tier: premium
            pickup_address: 123 Main St, Springfield
        swaig_log:
          type: array
          items:
            $ref: '#/components/schemas/Webhooks.AI.AISwaigLogEntry'
          description: Every tool call the agent made, in order. Included when `action` is `post_conversation`.
        total_minutes:
          type: integer
          description: 'The number of billable minutes, rounded up to at least one. Included when you enable

            [`enable_accounting`](/docs/swml/reference/calling/ai/params#paramsenable_accounting).'
          examples:
          - 3
        total_input_tokens:
          type: integer
          description: Input tokens the session consumed. Included when you enable `enable_accounting`.
          examples:
          - 5627
        total_output_tokens:
          type: integer
          description: Output tokens the session produced. Included when you enable `enable_accounting`.
          examples:
          - 119
        total_wire_input_tokens:
          type: integer
          description: 'Input tokens counted against the model, which differs from `total_input_tokens` when the

            conversation was trimmed. Included when you enable `enable_accounting`.'
          examples:
          - 5627
        total_wire_input_tokens_per_minute:
          type: number
          description: '`total_wire_input_tokens` divided by `total_minutes`. Included when you enable `enable_accounting`.'
          examples:
          - 1875.67
        total_wire_output_tokens:
          type: integer
          description: Output tokens counted against the model. Included when you enable `enable_accounting`.
          examples:
          - 119
        total_wire_output_tokens_per_minute:
          type: number
          description: '`total_wire_output_tokens` divided by `total_minutes`. Included when you enable `enable_accounting`.'
          examples:
          - 39.67
        total_tts_chars:
          type: integer
          description: Characters sent to text-to-speech. Included when you enable `enable_accounting`.
          examples:
          - 842
        total_tts_chars_per_min:
          type: number
          description: '`total_tts_chars` divided by `total_minutes`. Included when you enable `enable_accounting`.'
          examples:
          - 280.67
        total_asr_minutes:
          type: number
          description: Minutes of audio sent to speech recognition. Included when you enable `enable_accounting`.
          examples:
          - 2.41
        total_asr_cost_factor:
          type: number
          description: '`total_asr_minutes` divided by `total_minutes`. Included when you enable `enable_accounting`.'
          examples:
          - 0.8
        conversation_summary:
          type: string
          description: 'A plain-language summary of the conversation, for storing against `conversation_id` and handing

            back on the next `fetch_conversation`. Included when you enable

            [`save_conversation`](/docs/swml/reference/calling/ai/params#paramssave_conversation) and set

            a `conve

# --- truncated at 32 KB (103 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/signalwire/refs/heads/main/openapi/signalwire-ai-webhooks-api-openapi.yml