prefix. Each rate is scoped to a single tenant and associates a destination label with a cost_per_minute and a billing_increment (the granularity in seconds at which the call is metered). The platform evaluates CDRs against the tenant’s rate table at call completion to calculate the cost value stored on the CDR. All endpoints require an active admin session. The list endpoint supports an optional search parameter that matches against prefix, destination, and status.
GET /api/rates
Returns all rates ordered by creation date descending, with the parenttenant relation included.
Query parameters
string
Optional. Filters rates whose
prefix, destination, or status contains the given string (case-insensitive).string
Value is
"Rates fetched successfully.".array
Array of rate objects.
POST /api/rates
Creates a new rate and returns201 Created with the record.
integer
required
ID of the tenant to assign this rate to. Must reference an existing tenant.
string
required
The dialled-number prefix that triggers this rate, e.g.
"44". Maximum 50 characters.string
required
Human-readable destination label. Maximum 255 characters.
number
required
Per-minute charge as a decimal number. Must be
0 or greater.integer
required
Billing granularity in seconds. Minimum value:
1. Common values are 6, 30, or 60.string
required
Lifecycle status, e.g.
active or inactive. Maximum 50 characters.string
Value is
"Rate created successfully.".object
The newly created rate record.
GET /api/rates/
Fetches a single rate by its ID. Includes the parenttenant relation.
Path parameters
integer
required
The numeric ID of the rate to retrieve.
string
Value is
"Rate loaded successfully.".object
The rate record with the
tenant relation included.PUT /api/rates/
Replaces all fields on an existing rate.PATCH /api/rates/{rate} is also accepted and uses the same handler.
Path parameters
integer
required
The numeric ID of the rate to update.
integer
required
Must reference an existing tenant.
string
required
Maximum 50 characters.
string
required
Maximum 255 characters.
number
required
Must be
0 or greater.integer
required
Minimum value:
1.string
required
Maximum 50 characters.
string
Value is
"Rate updated successfully.".object
The updated rate record.
DELETE /api/rates/
Permanently deletes the specified rate. Path parametersinteger
required
The numeric ID of the rate to delete.
string
Value is
"Rate deleted successfully.".