---
title: "Ingest a completed AgentPhone call"
method: POST
path: "/api/voice/v1/webhooks/agentphone"
tags: ["SDK"]
---

# Ingest a completed AgentPhone call

`POST /api/voice/v1/webhooks/agentphone`

## Request

- Base URL: `https://api.agnost.ai`
- URL: `https://api.agnost.ai/api/voice/v1/webhooks/agentphone`
- Auth: none declared

Translates an AgentPhone `agent.call_ended` webhook from a hosted-mode
agent into one Agnost voice conversation. Messages, reactions, number
releases, and test events are acknowledged without capture. Live voice
turns are rejected because Agnost cannot answer a caller. AgentPhone
sends no per-turn timestamps, so turn timing is estimated across the
call duration.

## Query parameters

- `org_id` string, uuid, required
- `agent_name` string

## Request body

- object
  - `event` string, required
  - `channel` string
  - `timestamp` string, date-time
  - `agentId` string
  - `data` object
    - `callId` string, required
    - `numberId` string
    - `from` string
    - `to` string
    - `direction` 'inbound' | 'outbound'
    - `status` string
    - `startedAt` string, date-time
    - `endedAt` string, date-time
    - `durationSeconds` number
    - `disconnectionReason` string
    - `transcript` object[]
      - `role` 'user' | 'agent'
      - `content` string
    - `summary` string
    - `userSentiment` string
    - `callSuccessful` boolean

## Response `200`

Completed call accepted and translated into a conversation.

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

## Other responses

- `204`: Event acknowledged without ingestion.
- `400`: Invalid organization ID or malformed AgentPhone envelope.
- `413`: Transcript exceeds the one-megabyte ingestion limit.
- `422`: Live voice turn from a webhook-mode agent, or AgentPhone data could not be normalized.
- `502`: 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/agentphone/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)
