> ## Documentation Index
> Fetch the complete documentation index at: https://docs.callaidan.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Webhook — voice call completed

> **Not an endpoint on `api.callaidan.com`.** When a voice call ends, Aidan sends an HTTP `POST` with `Content-Type: application/json` to the **Webhook URL** you configure on the agent (Voice Agents page in the dashboard, or `webhook_url` on the agent). This path appears in the API reference only so the request body schema renders in the docs — do not call `https://api.callaidan.com/_reference/...`.

Respond with any **2xx** status to acknowledge delivery.



## OpenAPI

````yaml POST /_reference/webhooks/voice-agent-call-completed
openapi: 3.1.0
info:
  title: Aidan API
  description: API for managing AI agents (chatbots and voicebots) on the Outbox platform
  version: 1.0.0
servers:
  - url: https://api.callaidan.com
security: []
tags:
  - name: Webhooks
    description: >-
      **Inbound notifications.** After a voice call ends, Aidan POSTs JSON to
      the Webhook URL on your agent (Voice Agents settings or `webhook_url`).
      Your server receives these requests — they are not calls *to*
      `api.callaidan.com`. The documented path `/_reference/webhooks/...` exists
      only in this spec so the payload schema can appear in the API Reference;
      it is not callable on the production API.
paths:
  /_reference/webhooks/voice-agent-call-completed:
    post:
      tags:
        - Webhooks
      summary: Voice agent — call completed
      description: >-
        **Not an endpoint on `api.callaidan.com`.** When a voice call ends,
        Aidan sends an HTTP `POST` with `Content-Type: application/json` to the
        **Webhook URL** you configure on the agent (Voice Agents page in the
        dashboard, or `webhook_url` on the agent). This path appears in the API
        reference only so the request body schema renders in the docs — do not
        call `https://api.callaidan.com/_reference/...`.


        Respond with any **2xx** status to acknowledge delivery.
      operationId: inboundWebhookVoiceAgentCallCompleted
      requestBody:
        required: true
        description: JSON payload delivered to your Webhook URL.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VoiceAgentCallCompletionWebhookPayload'
            examples:
              completedCall:
                summary: Successful outbound call
                value:
                  id: thread-uuid
                  status: did-succeed
                  summary: >-
                    Caller wanted to book an appointment for teeth cleaning.
                    Successfully scheduled for Tuesday at 3pm. Caller was
                    friendly and confirmed contact details.
                  score: 87
                  agent:
                    id: agent-uuid
                    name: Dental Receptionist
                    phone_number: '+61412345678'
                  direction: outbound
                  duration: 142
                  contact:
                    id: contact-uuid
                    name: John Smith
                    email: john@example.com
                    phone_number: '+61498765432'
                    external_id: ghl-contact-123
                  transcript: Full conversation transcript here...
      responses:
        '200':
          description: >-
            Your server acknowledged the webhook (any 2xx response is
            acceptable).
      servers:
        - url: https://YOUR_WEBHOOK_HOST
          description: >-
            Use your actual Webhook URL domain (your HTTPS endpoint, Zapier,
            Make, etc.).
components:
  schemas:
    VoiceAgentCallCompletionWebhookPayload:
      title: Voice agent call completion webhook
      description: >-
        JSON body POSTed to the voice agent **Webhook URL** after each call
        completes. Field presence may vary with agent settings (e.g. transcript
        when call recording/transcripts are enabled).
      type: object
      properties:
        id:
          type: string
          description: Unique thread identifier for the call
        status:
          type: string
          description: Call outcome (e.g. `did-succeed`, `did-not-answer`, `error`)
        summary:
          type: string
          description: AI-generated summary of the call
        score:
          type: integer
          minimum: 0
          maximum: 100
          description: Call quality score (0–100)
        agent:
          type: object
          properties:
            id:
              type: string
              description: Voice agent unique ID
            name:
              type: string
              description: Voice agent display name
            phone_number:
              type: string
              description: The number the agent called from
          required:
            - id
            - name
            - phone_number
        direction:
          type: string
          enum:
            - inbound
            - outbound
          description: Call direction
        duration:
          type: integer
          minimum: 0
          description: Call length in seconds
        contact:
          type: object
          properties:
            id:
              type: string
              description: Contact unique ID
            name:
              type: string
              description: Contact full name
            email:
              type: string
              format: email
              nullable: true
              description: Contact email address
            phone_number:
              type: string
              description: Contact phone number
            external_id:
              type: string
              nullable: true
              description: Contact ID in your CRM (e.g. GoHighLevel contact ID)
          required:
            - id
            - name
            - phone_number
        transcript:
          type: string
          description: >-
            Full conversation transcript when transcripts are enabled for this
            agent
      required:
        - id
        - status
        - summary
        - score
        - agent
        - direction
        - duration
        - contact

````