diagram-predecessorCall logs

The Calls API provides access to call history, recordings, transcripts, and real-time call events.

circle-info

Base URL: https://api.krosai.com/v1/calls

List Calls

Retrieve call history with filtering and pagination.

GET /calls

Query Parameters

Parameter
Type
Description

status

string

Filter by status: completed, failed, in_progress

direction

string

Filter by direction: inbound, outbound

phone_number_id

string

Filter by phone number

endpoint_id

string

Filter by endpoint

from_date

string

Start date (ISO 8601)

to_date

string

End date (ISO 8601)

limit

integer

Results per page (default: 50, max: 100)

offset

integer

Pagination offset

Request

curl
curl -X GET "https://api.krosai.com/v1/calls?limit=10&status=completed" \
  -H "x-api-key: kros_live_your_key"

Response

Get Call

Retrieve detailed information about a specific call.

GET /calls/{id}

Request

Response

Get Call Statistics

Get aggregated statistics for calls.

GET /calls/stats

Query Parameters

Parameter
Type
Description

phone_number_id

string

Filter by phone number

endpoint_id

string

Filter by endpoint

from_date

string

Start date (ISO 8601)

to_date

string

End date (ISO 8601)

Request

Response

Get Call Events

Retrieve the event timeline for a specific call.

GET /calls/{id}/events

Request

Response

Hangup Call

Terminate an active call.

POST /calls/{id}/hangup

Request

Response

Call Status Values

Status
Description

initiated

Call is being set up

ringing

Destination is ringing

in_progress

Call is active

completed

Call ended normally

failed

Call failed to connect

busy

Destination was busy

no_answer

No answer at destination

Hangup Causes

Cause
Description

normal_clearing

Normal call termination

user_hangup

Caller hung up

agent_hangup

Agent/endpoint hung up

no_answer

Destination didn't answer

busy

Destination busy

rejected

Call rejected

network_error

Network failure

timeout

Call timed out

Recordings

Call recordings are automatically generated for completed calls and stored securely.

Recording URL

Recordings are available via the recording_url field:

https://storage.krosai.com/recordings/call_abc123.mp3

Recording Formats

  • Format: MP3

  • Sample Rate: 48kHz

  • Channels: Mono (mixed)

  • Retention: 90 days (configurable)

Transcripts

Full transcripts are generated using speech-to-text and available in the transcript field.

Transcript Format

Plain text with speaker labels (when available):

Code Examples

Last updated