> For a complete index of all SignalWire documentation pages, fetch https://signalwire.com/docs/llms.txt

# AI sidecar callback

POST 

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).

Reference: https://signalwire.com/docs/apis/rest/calls/webhooks/ai-sidecar-callback

## OpenAPI 3.1 Webhook Specification

```yaml
openapi: 3.1.0
info:
  title: signalwire-rest
  version: 1.0.0
paths: {}
webhooks:
  ai-sidecar-callback:
    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).
      responses:
        '200':
          description: Webhook received successfully
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                call_info:
                  $ref: >-
                    #/components/schemas/WebhooksAiSidecarCallbackPayloadContentApplicationJsonSchemaCallInfo
                  description: >-
                    Envelope describing the call. `project_id` and `space_id`
                    are included when available.
                sidecar_event:
                  $ref: >-
                    #/components/schemas/WebhooksAiSidecarCallbackPayloadContentApplicationJsonSchemaSidecarEvent
                  description: >-
                    The sidecar callback. Carries the common fields below plus
                    type-specific fields.
              required:
                - call_info
                - sidecar_event
components:
  schemas:
    WebhooksAiSidecarCallbackPayloadContentApplicationJsonSchemaCallInfo:
      type: object
      properties:
        project_id:
          type: string
          format: uuid
          description: Your project ID.
        space_id:
          type: string
          format: uuid
          description: Your Space ID.
        call_id:
          type: string
          format: uuid
          description: ID of the call the sidecar is attached to.
        content_type:
          type: string
          description: The content type of the POST body. Always `text/json`.
        content_disposition:
          type: string
          description: How the body is delivered. Always `post_data`.
        conversation_type:
          type: string
          description: The conversation type. Always `voice`.
      required:
        - call_id
        - content_type
        - content_disposition
        - conversation_type
      description: >-
        Envelope describing the call. `project_id` and `space_id` are included
        when available.
      title: WebhooksAiSidecarCallbackPayloadContentApplicationJsonSchemaCallInfo
    WebhooksAiSidecarCallbackPayloadContentApplicationJsonSchemaSidecarEventType:
      type: string
      enum:
        - start
        - turn
        - request
        - thought
        - insight
        - skip
        - tool_call
        - tool_result
        - action
        - global_data_change
        - history_pruned
        - error
        - ask_request
        - ask_answer
        - stop
        - final
      description: The callback type.
      title: >-
        WebhooksAiSidecarCallbackPayloadContentApplicationJsonSchemaSidecarEventType
    WebhooksAiSidecarCallbackPayloadContentApplicationJsonSchemaSidecarEventChannelData:
      type: object
      properties: {}
      description: >-
        Call/channel context: `call_id`, plus `caller_id_name` /
        `caller_id_number` / `destination_number` when available.
      title: >-
        WebhooksAiSidecarCallbackPayloadContentApplicationJsonSchemaSidecarEventChannelData
    WebhooksAiSidecarCallbackPayloadContentApplicationJsonSchemaSidecarEvent:
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/WebhooksAiSidecarCallbackPayloadContentApplicationJsonSchemaSidecarEventType
          description: The callback type.
        ts:
          type: integer
          format: int64
          description: When the event was produced, as a Unix timestamp in microseconds.
        tick_id:
          type: integer
          format: int64
          description: >-
            Identifies the evaluation this callback came from. Callbacks
            produced in the same evaluation share a `tick_id`.
        channel_data:
          $ref: >-
            #/components/schemas/WebhooksAiSidecarCallbackPayloadContentApplicationJsonSchemaSidecarEventChannelData
          description: >-
            Call/channel context: `call_id`, plus `caller_id_name` /
            `caller_id_number` / `destination_number` when available.
      required:
        - type
        - ts
        - tick_id
        - channel_data
      description: >-
        The sidecar callback. Carries the common fields below plus type-specific
        fields.
      title: WebhooksAiSidecarCallbackPayloadContentApplicationJsonSchemaSidecarEvent

```