Outgoing Calls API Documentation
This document provides details for the API endpoints used to manage and retrieve outgoing call records.
Base URL
All endpoint URLs in this documentation are relative to the following base URL:
https://admin.rinble.com/index.php?r=apiv1/outgoing-calls
Authentication
All API requests must be authenticated using a token. The token must be sent as a parameter (token
) in every request, either in the query string for GET
requests or in the request body for POST
requests.
Example GET
request with token:
https://admin.rinble.com/index.php?r=apiv1/outgoing-calls/index&token=YOUR_API_TOKEN
If the token is missing, invalid, or expired, the API will respond with a 401 Unauthorized
error.
{
"status": 0,
"error_code": 401,
"message": "Invalid Token YOUR_API_TOKEN"
}
Endpoints
1. List Call Records
Retrieves a list of outgoing call detail records. This endpoint can be used to get all unaccessed calls or search for calls within a specific date range. By default, fetching records marks them as "accessed"; this behavior can be overridden.
- Endpoint:
/index
- Methods:
GET
,POST
Parameters
Parameter | Type | Required | Default | Description |
---|---|---|---|---|
token |
string | Yes | Your API access token. | |
fromDate |
string | No | Start date for filtering (YYYY-MM-DD ). If used, toDate is also required. If omitted, the API retrieves unaccessed calls. |
|
toDate |
string | No | End date for filtering (YYYY-MM-DD ). If used, fromDate is also required. |
|
doNotMarkAsAccessed |
string | No | If set to Y , the retrieved call records will not be marked as accessed by the API. |
|
limit |
integer | No | 1000 |
The maximum number of records to return when fromDate and toDate are not specified. The hard limit is 1000 . |
src |
string | No | Filter records by the source phone number (10 digits). | |
dst |
string | No | Filter records by the destination phone number (10 digits). |
Success Response (200 OK)
{
"status": 1,
"totalItems": 1,
"data": [
{
"uniqueid": "1678886400.54321",
"clid": "\"Internal User\" <5551234567>",
"src": "5551234567",
"dst": "5557654321",
"dcontext": "from-internal",
"duration": 120,
"start": "2023-03-15 12:05:00",
"calldate": "2023-03-15 12:05:00",
"billsec": 110,
"billmin": 2,
"answer": "2023-03-15 12:05:10",
"devicename": "SIP/101"
}
]
}
2. View a Single Call Record
Retrieves the details for a single outgoing call record, identified by its uniqueid
.
- Endpoint:
/view
- Methods:
GET
,POST
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
token |
string | Yes | Your API access token. |
uniqueid |
string | Yes | The unique identifier of the call record. |
Success Response (200 OK)
{
"status": 1,
"data": {
"calldetail_id": 201,
"uniqueid": "1678886400.54321",
"clid": "\"Internal User\" <5551234567>",
"src": "5551234567",
"dst": "5557654321",
"dcontext": "from-internal",
"src_account_id": 50,
"accessed_by_api_date": null,
"accessed_by_api_token_id": null
// ... other Calldetail model attributes
}
}
Error Response (400 Bad Request)
If the call record is not found for the associated account.
{
"status": 0,
"error_code": 400,
"message": "Bad request"
}
3. Download a Call Recording
Downloads the audio recording associated with a call record.
- Endpoint:
/download-recording
- Method:
GET
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
token |
string | Yes | Your API access token. |
uniqueid |
string | Yes | The unique identifier of the call record. |
Success Response (200 OK)
The body of the response will be the raw audio file (.mp3
or .wav
) with the appropriate Content-Type
and Content-Disposition
headers.
Error Response
If the call is not found, or the user is not authorized, a standard JSON error will be returned. If the recording file does not exist on the server, the request may be redirected.