Skip to main content
WEBHOOK
TexmlCallCompletedWebhook
{
  "AccountSid": "f5586561-8ff0-4291-a51b-c7dfe4139ff9",
  "CallInitiatedAt": "2024-01-15T10:30:26.028Z",
  "CallSid": "v3:9X2vxPDFY2RHSJ1EdMS0RHRksMTg7ldNxdjWbVr9zBjbGjGsSe-aiQ",
  "CallSidLegacy": "v3:9X2vxPDFY2RHSJ1EdMS0RHRksMTg7ldNxdjWbVr9zBjbGjGsSe-aiQ",
  "CallStatus": "completed",
  "CallbackSource": "call-progress-events",
  "ConnectionId": "1234567890",
  "From": "+35319605860",
  "SequenceNumber": 3,
  "Timestamp": "2024-01-15T10:30:00Z",
  "To": "+13129457420",
  "AnsweredTime": "2024-01-15T10:30:15Z",
  "CallControlId": "v3:9X2vxPDFY2RHSJ1EdMS0RHRksMTg7ldNxdjWbVr9zBjbGjGsSe-aiQ",
  "CallDuration": "45",
  "CallLegId": "abc123-leg1",
  "CallQualityStats": "{\"mos\":4.2,\"jitter\":10,\"packet_loss\":0.5}",
  "CallSessionId": "session-abc123",
  "CallerId": "John Doe",
  "DialCallDuration": "120",
  "DialCallSid": "v3:9X2vxPDFY2RHSJ1EdMS0RHRksMTg7ldNxdjWbVr9zBjbGjGsSe-aiQ",
  "DialCallSidLegacy": "v3:9X2vxPDFY2RHSJ1EdMS0RHRksMTg7ldNxdjWbVr9zBjbGjGsSe-aiQ",
  "DialCallStatus": "completed",
  "EndTime": "2024-01-15T10:31:00Z",
  "ErrorCode": "10001",
  "ErrorMessage": "Call failed",
  "HangupCause": "normal_clearing",
  "HangupSource": "caller",
  "OccurredAt": "2024-01-15T10:31:00Z",
  "OrganizationId": "org-abc123",
  "ParentCallSid": "v3:MdI91X4lWFEs7IgbBEOT9M4AigoY08M0WWZFISt1Yw2axZ_IiE4pqg",
  "ParentCallSidLegacy": "v3:MdI91X4lWFEs7IgbBEOT9M4AigoY08M0WWZFISt1Yw2axZ_IiE4pqg",
  "RecordingDuration": "90",
  "RecordingUrl": "https://api.telnyx.com/v2/recordings/abc123.wav",
  "ShakenStirAttestation": "A",
  "ShakenStirValidated": true,
  "SipHangupCause": "200",
  "StartTime": "2024-01-15T10:30:00Z",
  "UserId": "f5586561-8ff0-4291-a51b-c7dfe4139ff9"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

telnyx-timestamp
integer<int64>
required

Unix timestamp (seconds since epoch) of when the webhook was sent - compatible with webhook-timestamp Unix timestamp for replay attack prevention

telnyx-signature-ed25519
string
required

Base64 encoded Ed25519 signature for webhook verification - compatible with webhook-signature Ed25519 signature of timestamp|payload for verification

Body

application/x-www-form-urlencoded

Webhook sent when a TeXML call is completed.

AccountSid
string
required

The unique identifier of the account (user_id).

Example:

"f5586561-8ff0-4291-a51b-c7dfe4139ff9"

CallInitiatedAt
string<date-time>
required

The timestamp when the call was initiated.

Example:

"2024-01-15T10:30:26.028Z"

CallSid
string
required

The unique identifier of the call (call_control_id).

Example:

"v3:9X2vxPDFY2RHSJ1EdMS0RHRksMTg7ldNxdjWbVr9zBjbGjGsSe-aiQ"

CallSidLegacy
string
required

Legacy call identifier, same as CallSid.

Example:

"v3:9X2vxPDFY2RHSJ1EdMS0RHRksMTg7ldNxdjWbVr9zBjbGjGsSe-aiQ"

CallStatus
enum<string>
required

The status of the call.

Available options:
completed,
busy,
no-answer,
canceled,
failed
Example:

"completed"

CallbackSource
enum<string>
required

The source of the callback.

Available options:
call-progress-events
Example:

"call-progress-events"

ConnectionId
string
required

The unique identifier of the connection.

Example:

"1234567890"

From
string
required

The phone number or SIP address of the caller.

Example:

"+35319605860"

SequenceNumber
integer
required

The sequence number of the event.

Example:

3

Timestamp
string<date-time>
required

The UTC timestamp when the webhook was generated.

Example:

"2024-01-15T10:30:00Z"

To
string
required

The phone number or SIP address that was called.

Example:

"+13129457420"

AnsweredTime
string<date-time>

The time when the call was answered (only present when CallStatus is 'completed').

Example:

"2024-01-15T10:30:15Z"

CallControlId
string

The call control ID (only present when CallStatus is 'completed').

Example:

"v3:9X2vxPDFY2RHSJ1EdMS0RHRksMTg7ldNxdjWbVr9zBjbGjGsSe-aiQ"

CallDuration
string

The duration of the call in seconds (conditional, only present if start_time and end_time are available).

Example:

"45"

CallLegId
string

The call leg ID (only present when CallStatus is 'completed').

Example:

"abc123-leg1"

CallQualityStats
string

JSON-encoded call quality statistics (only present when CallStatus is 'completed').

Example:

"{\"mos\":4.2,\"jitter\":10,\"packet_loss\":0.5}"

CallSessionId
string

The call session ID (only present when CallStatus is 'completed').

Example:

"session-abc123"

CallerId
string

The display name of the caller.

Example:

"John Doe"

DialCallDuration
string

The duration of the dialed call in seconds (conditional, only present in hangup action callbacks for Dial).

Example:

"120"

DialCallSid
string

The unique identifier of the dialed call (conditional, only present in hangup action callbacks for Dial).

Example:

"v3:9X2vxPDFY2RHSJ1EdMS0RHRksMTg7ldNxdjWbVr9zBjbGjGsSe-aiQ"

DialCallSidLegacy
string

Legacy dialed call identifier, same as DialCallSid (conditional, only present in hangup action callbacks for Dial).

Example:

"v3:9X2vxPDFY2RHSJ1EdMS0RHRksMTg7ldNxdjWbVr9zBjbGjGsSe-aiQ"

DialCallStatus
enum<string>

The status of the dialed call (conditional, only present in hangup action callbacks for Dial).

Available options:
completed,
busy,
no-answer,
canceled,
failed
Example:

"completed"

EndTime
string<date-time>

The time when the call ended (only present when CallStatus is 'completed').

Example:

"2024-01-15T10:31:00Z"

ErrorCode
string

Error code if an error occurred (conditional).

Example:

"10001"

ErrorMessage
string

Error message if an error occurred (conditional).

Example:

"Call failed"

HangupCause
string

The reason for call hangup (only present when CallStatus is 'completed').

Example:

"normal_clearing"

HangupSource
string

The source of the hangup (conditional, only present for hangup events).

Example:

"caller"

OccurredAt
string<date-time>

The timestamp when the event occurred (only present when CallStatus is 'completed').

Example:

"2024-01-15T10:31:00Z"

OrganizationId
string

The organization ID (only present when CallStatus is 'completed').

Example:

"org-abc123"

ParentCallSid
string

The unique identifier of the parent call that initiated this outbound call (conditional, only present for outbound calls initiated via Dial).

Example:

"v3:MdI91X4lWFEs7IgbBEOT9M4AigoY08M0WWZFISt1Yw2axZ_IiE4pqg"

ParentCallSidLegacy
string

Legacy parent call identifier, same as ParentCallSid (conditional, only present for outbound calls initiated via Dial).

Example:

"v3:MdI91X4lWFEs7IgbBEOT9M4AigoY08M0WWZFISt1Yw2axZ_IiE4pqg"

RecordingDuration
string

The duration of the recording in seconds (conditional, only present if recording was enabled).

Example:

"90"

RecordingUrl
string

The URL where the call recording can be accessed (conditional, only present if recording was enabled).

Example:

"https://api.telnyx.com/v2/recordings/abc123.wav"

ShakenStirAttestation
string

SHAKEN/STIR attestation level (conditional, only present if shaken_stir_data is available).

Example:

"A"

ShakenStirValidated
boolean

Whether SHAKEN/STIR validation passed (conditional, only present if shaken_stir_data is available).

Example:

true

SipHangupCause
string

The SIP hangup cause code (conditional, only present for hangup events).

Example:

"200"

StartTime
string<date-time>

The time when the call started (only present when CallStatus is 'completed').

Example:

"2024-01-15T10:30:00Z"

UserId
string

The user ID (only present when CallStatus is 'completed').

Example:

"f5586561-8ff0-4291-a51b-c7dfe4139ff9"

Response

200

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