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

# Post Call Webhook

> Reference for receiving Phonely post-call data on your own webhook endpoint.

Phonely can send a `POST` request to your webhook endpoint after a call completes. Use this when you want to forward summaries, transcripts, outcomes, or call links into another system.

## Where To Configure It In Phonely

1. Open `/agent/{agentId}?tab=workflows`.
2. Add the `Send Call Data` post-call action to the workflow.
3. In the `Configure` tab, enter your webhook URL.
4. Choose whether to send the full call payload or a custom body.
5. Open the `Test` tab and send a sample request.
6. Confirm your receiver returns a success response.

## Receiver Requirements

* The receiver must accept HTTPS requests.
* The receiver must be ready to parse JSON request bodies.
* The receiver should return a `2xx` response after successful processing.
* The receiver should log failures for later debugging.

## Payload Contents

The schema below documents the standard post-call payload. It includes fields such as:

* call and agent identifiers
* transcript text and structured transcript
* summary, long summary, topic, and sentiment
* recording and dashboard URLs
* caller and business phone numbers
* call start time, end time, duration, and end reason

## Testing Tips

* Return `200 OK` after storing or accepting the payload.
* Re-run the `Test` tab any time you change the expected body or the receiver.
* If the receiver returns a non-success status, inspect the receiver logs before publishing the workflow.


## OpenAPI

````yaml POST /to_your_webhook_url
openapi: 3.0.1
info:
  title: Phonely API
  description: API for Phonely services including agent management and call summaries
  version: 1.0.0
servers:
  - url: https://app.phonely.ai/api
security: []
paths:
  /to_your_webhook_url:
    post:
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CallSummaryResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Call not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    CallSummaryResponse:
      type: object
      properties:
        agentName:
          type: string
          description: Name of the agent handling the call
        mentionedEmail:
          type: string
          nullable: true
          description: Email address mentioned during the call
        unansweredQuestions:
          type: array
          items:
            type: string
          description: List of questions that were not answered during the call
        actionItems:
          type: array
          items:
            type: string
          description: List of action items identified during the call
        followUpReason:
          type: string
          description: Reason for any required follow-up
        followUp:
          type: string
          description: Indicator if follow-up is required
        recordingUrl:
          type: string
          description: URL to access the call recording
        dashboardUrl:
          type: string
          description: URL to access the call dashboard
        purpose:
          type: string
          description: Main purpose or topic of the call
        sentiment:
          type: string
          description: Overall sentiment of the call
        transcriptText:
          type: string
          description: Full text transcript of the call
        transcript:
          type: array
          items:
            $ref: '#/components/schemas/TranscriptEntry'
          description: Structured transcript of the call
        mentionedDate:
          type: string
          nullable: true
          description: Any specific date mentioned during the call
        businessPhoneNumber:
          type: string
          description: Phone number of the agent
        keyPoints:
          type: array
          items:
            type: string
          description: Key points or highlights from the call
        topic:
          type: string
          description: Main topic or category of the call
        longSummary:
          type: string
          nullable: true
          description: Detailed summary of the call
        callId:
          type: string
          description: Unique identifier for the call
        ai_success:
          type: string
          description: Indicator of AI's success in handling the call
        customerPhoneNumber:
          type: string
          description: Phone number of the customer
        callStarted:
          type: string
          format: date-time
          description: Date string when the call started
        callEnded:
          type: string
          format: date-time
          description: Date string when the call ended
        duration:
          type: number
          description: Duration of the call in seconds
        callerName:
          type: string
          description: Name of the caller
        callDirection:
          type: string
          description: Direction of the call (inbound/outbound)
        mentionedTime:
          type: string
          nullable: true
          description: Any specific time mentioned during the call
        summary:
          type: string
          description: Brief summary of the call
        endedReason:
          type: string
          description: Reason for the call ending
    Error:
      type: object
      properties:
        error:
          type: string
          description: Error code or identifier
        message:
          type: string
          description: Detailed error message
    TranscriptEntry:
      type: object
      properties:
        content:
          type: string
          description: Content of the transcript entry
        role:
          type: string
          description: Role of the speaker (e.g., assistant, user)

````