Skip to main content
Call detail records (CDRs) capture a complete log of every call that passes through the platform. Each record stores the originating caller_number, the destination_number, call direction (inbound or outbound), the final disposition (e.g. ANSWERED or NO ANSWER), raw and billable duration in seconds, the computed cost, and precise start and end timestamps. CDRs are associated with a tenant and optionally with the extension that handled the call. All endpoints require an active admin session. The list endpoint supports search across caller_number, destination_number, direction, and disposition, and orders results by started_at descending.

GET /api/cdrs

Returns all CDRs ordered by started_at descending, with the tenant and extension relations included. Query parameters
Optional. Filters CDRs whose caller_number, destination_number, direction, or disposition contains the given string (case-insensitive).
string
Value is "CDRs fetched successfully.".
array
Array of CDR objects.

POST /api/cdrs

Creates a new CDR record manually and returns 201 Created. This endpoint is typically used to ingest CDRs from an external telephony platform.
integer
required
ID of the tenant this CDR belongs to. Must reference an existing tenant.
integer
Optional. ID of the extension that handled the call. Must reference an existing extension when provided.
string
required
Originating phone number. Maximum 50 characters.
string
required
Dialled destination number. Maximum 50 characters.
string
required
Call direction, e.g. inbound or outbound. Maximum 50 characters.
string
required
Final call result, e.g. ANSWERED, NO ANSWER, BUSY. Maximum 50 characters.
integer
required
Total call duration in seconds. Minimum value: 0.
integer
required
Billable call duration in seconds. Minimum value: 0.
number
required
Calculated call cost as a decimal. Minimum value: 0.
string
required
Call start timestamp. Must be a valid date string parseable by PHP’s date rules, e.g. "2025-04-22 10:00:00".
string
Optional. Call end timestamp. Must be a valid date string when provided.
string
Value is "CDR created successfully.".
object
The newly created CDR record.

GET /api/cdrs/

Fetches a single CDR by its ID. Includes the tenant and extension relations. Path parameters
integer
required
The numeric ID of the CDR to retrieve.
string
Value is "CDR loaded successfully.".
object
The CDR record with tenant and extension included.

PUT /api/cdrs/

Replaces all fields on an existing CDR. PATCH /api/cdrs/{cdr} is also accepted and uses the same handler. Path parameters
integer
required
The numeric ID of the CDR to update.
integer
required
Must reference an existing tenant.
integer
Optional. Must reference an existing extension when provided.
string
required
Maximum 50 characters.
string
required
Maximum 50 characters.
string
required
Maximum 50 characters.
string
required
Maximum 50 characters.
integer
required
Minimum value: 0.
integer
required
Minimum value: 0.
number
required
Minimum value: 0.
string
required
Valid date string.
string
Optional. Valid date string.
string
Value is "CDR updated successfully.".
object
The updated CDR record.

DELETE /api/cdrs/

Permanently deletes the specified CDR record. Path parameters
integer
required
The numeric ID of the CDR to delete.
string
Value is "CDR deleted successfully.".