---
title: "Call Cost"
method: POST
path: "callCost"
tags: ["Callbacks"]
---

# Call Cost

`POST callCost` (webhook)

This webhook uses Telnyx headers (telnyx-timestamp, telnyx-signature-ed25519) that are compatible with Standard Webhooks specification for SDK generation. Custom validation logic can map these to standard webhook-timestamp and webhook-signature equivalents. See https://github.com/standard-webhooks/standard-webhooks for details.

## Headers

- `telnyx-timestamp` integer, required — Unix timestamp for replay attack prevention
- `telnyx-signature-ed25519` string, required — Ed25519 signature of timestamp|payload for verification

## Payload

- CallCostEvent
  - `data` CallCost
    - `record_type` 'event' — Identifies the type of the resource.
    - `event_type` 'call.cost' — The type of event being delivered.
    - `id` string, uuid — Unique identifier of the event.
    - `occurred_at` string, date-time — ISO 8601 datetime of when the event occurred.
    - `payload` object
      - `call_control_id` string — Call ID used to issue commands via Call Control API.
      - `connection_id` string — Call Control App ID (formerly Telnyx connection ID) used in the call.
      - `call_leg_id` string — ID that is unique to the call and can be used to correlate webhook events.
      - `call_session_id` string — ID that is unique to the call session and can be used to correlate webhook events. Call session is a group of related call legs that logically belong to the same phone call, e.g. an inbound and outbound leg of a transferred call.
      - `client_state` string — State received from a command. Base64-encoded.
      - `billing_group_id` string, nullable — Identifies the billing group associated with the call.
      - `status` 'success' | 'error' — The status of the cost calculation (`success` or `error`).
      - `total_cost` string, nullable — The total cost of the call.
      - `billed_duration_secs` integer, nullable — The longest billed duration across all cost parts, in seconds.
      - `cost_parts` CallCostPart[] — Breakdown of costs by call part.
        - `call_part` string — The product component this cost applies to. Values are determined by the billing system (e.g. sip-trunking, call-control, call-recording). Not a fixed set — new values may appear as products evolve.
        - `rate` string — The per-minute rate applied.
        - `cost` string — The cost for this part of the call.
        - `currency` string — The currency of the cost.
        - `billed_duration_secs` integer — The billed duration in seconds for this part of the call.
      - `occurred_at` string, date-time — ISO 8601 datetime of when the event occurred.

## Acknowledgement `200`

The server must return an HTTP 200, otherwise we will reattempt delivery at the failover webhook URL.

---

[API](https://skmtc.net/team-telnyx/apis/telnyx-api.md) · [All operations](https://skmtc.net/team-telnyx/apis/telnyx-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/team-telnyx/telnyx-api/revisions/e32d46c5945b/schema)
