---
title: "Ingest a Vapi end-of-call report"
method: POST
path: "/api/voice/v1/webhooks/vapi"
tags: ["SDK"]
---

# Ingest a Vapi end-of-call report

`POST /api/voice/v1/webhooks/vapi`

## Request

- Base URL: `https://api.agnost.ai`
- URL: `https://api.agnost.ai/api/voice/v1/webhooks/vapi`
- Auth: none declared. Required headers: `x-org-id`

Translates a Vapi `end-of-call-report` into one Agnost voice
conversation. The Vapi call ID becomes the conversation ID, the caller
number becomes the user ID, and each caller/assistant exchange becomes
an event. The completed call total is attached to exactly one event so
conversation cost aggregation does not multiply it by the turn count.

The caller number may be supplied in either `message.call.customer.number`
or `message.customer.number`. Transcript content may be supplied in
`message.artifact.messages`, `message.artifact.transcript`, or
`message.transcript`. Internal function calls found in the artifact are
stored as child tool events beneath their synthetic agent tool-call
events, including their arguments, results, timing, and success state.

## Headers

- `x-org-id` string, uuid, required

## Request body

- object
  - `message` object, required
    - `type` 'end-of-call-report', required
    - `startedAt` string, date-time
    - `endedAt` string, date-time
    - `endedReason` string
    - `durationSeconds` number
    - `cost` number: Vapi's completed total call cost in USD.
    - `transcript` string
    - `customer` object
      - `number` string
    - `analysis` object
    - `artifact` object
      - `transcript` string
      - `messages` object[]
      - `recordingUrl` string, uri
      - `stereoRecordingUrl` string, uri
      - `logUrl` string, uri
    - `call` object, required
      - `id` string, required
      - `orgId` string
      - `assistantId` string
      - `phoneNumberId` string
      - `type` string
      - `status` string
      - `customer` object
        - `number` string
      - `assistant` object
        - `id` string
        - `name` string

## Response `200`

Report accepted and translated into a conversation.

- object
  - `status` 'accepted', required
  - `session_id` string, required
  - `user_id` string, required
  - `event_count` integer, required

## Other responses

- `400`: Invalid organization ID, event type, call ID, or caller number.
- `413`: Transcript exceeds the one-megabyte ingestion limit.
- `422`: Missing organization header or usable transcript.
- `500`: Downstream Agnost ingestion failed.

## Changes

- **2026-11-03** `a61431b48f36`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/agnost/apis/agnost-ai-api/changes/api/voice/v1/webhooks/vapi/post.md)

---

[API](https://skmtc.dev/agnost/apis/agnost-ai-api.md) - [All operations](https://skmtc.dev/agnost/apis/agnost-ai-api/llms.txt) - [OpenAPI document](https://skmtc.dev/agnost/apis/agnost-ai-api/revisions/a61431b48f36?raw)
