Voice Call History

GET/api/v2/voice-call/history

Base URL https://api.easify.liveBearer token and Accept header required Authentication →

This endpoint retrieves the user's call history, including from, to, status, recording URLand other details about the calls. The results are returned as a paginated collection of records.

There is a rate limit of 60 requests per minute per API token. This limit is shared by all API endpoints except those with their own separate limit (/api/v2/sms/send, /api/v3/sms/send, etc.), so requests to other endpoints also count toward it. If you exceed this limit, you will receive a 429 Too Many Requests status, along with a message indicating when you can try again.

Query Parameters

from string The original phone number of the call Optional
to array The destination phone number(s) of the call(maximum array size: 100) Optional
from_date string The start date to filter calls (in YYYY-MM-DDformat). Optional
to_date string The end date to filter calls (in YYYY-MM-DDformat). Optional
public_call boolean The public_call filter only returns public call history data Optional
limit integer The number of records per page for pagination (Default: 10, Max: 50). Optional
order string The sorting order of the records. Use asc for ascending or desc for descending order. Defaults to desc if not provided. Optional
page integer The page number to retrieve. Defaults to 1 if not provided. Optional
include_subusers boolean If the authenticated user is an owner, they can fetch subuser's data by using the filter key include_subusers. Set include_subusers to true to fetch subuser's data. Optional

Example Request and Response

Params:

{
  "from": "+1234567****",
  "to": ["+1987654****"],
  "from_date": "2024-12-01",
  "to_date": "2024-12-15",
  "public_call": 1,
  "include_subusers": 1,
  "limit": 10,
  "order": "desc",
  "page": 1
}

Success Response:

{
  "status": true,
  "message": "Call History",
  "data": [
    {
      "id": 83801,
      "user_name": "John Smith",
      "user_type": "owner",
      "from": "+1315293****",
      "to": "+1315135****",
      "type": "Outgoing Call",
      "status": "Completed",
      "recording_url": "https://example.com/recordings/sample-call.mp3",
      "duration": 3,
      "is_public_call": 1,
      "is_automated_call": 0,
      "created_at": "12-10-2024 10:15:30 AM"
    },
    {
      "id": 83802,
      "user_name": "Cooper",
      "user_type": "sub_user",
      "from": "+1315135****",
      "to": "+1315293****",
      "type": "Outgoing Call",
      "status": "Missed",
      "recording_url": "https://example.com/recordings/sample-call.mp3",
      "duration": 3,
      "is_public_call": 1,
      "is_automated_call": 0,
      "created_at": "12-11-2024 02:05:20 PM"
    }
  ],
  "links": {
    "first": "https://api.easify.live/api/v2/voice-call/history?page=1",
    "last": "https://api.easify.live/api/v2/voice-call/history?page=61",
    "prev": "https://api.easify.live/api/v2/voice-call/history?page=1",
    "next": "https://api.easify.live/api/v2/voice-call/history?page=3"
  },
  "meta": {
    "current_page": 1,
    "from": 1,
    "last_page": 61,
    "links": [
      {
        "url": "https://api.easify.live/api/v2/voice-call/history?page=2",
        "label": "Next »",
        "active": false
      }
    ],
    "path": "https://api.easify.live/api/v2/voice-call/history",
    "per_page": 10,
    "to": 10,
    "total": 610
  }
}

Responses

Case Status Code Response
If the user does not provide a token in the header or provides an invalid token 401 { "status":false, "message":"Unauthenticated", "errors":[] }
An invalid value was passed to the 'to' field instead of an array 400 { "message": "The to field must be an array.", "errors": { "to": ["The to field must be an array."] } }
Invalid from_date or to_date format 400 { "status": false, "message": "Invalid date format", "errors": { "from_date": ["Invalid date"] } }
Invalid limit or page 400 { "status": false, "message": "Invalid pagination parameters", "errors": { "limit": ["min:1"] } }
If the user exceeds the allowed rate limit for requests 429 { "status":false, "message":"Too many requests. Try again in 59 seconds", "errors":[] }
If the user's subscription has ended 402 { "status":false,"message":"You need to recharge your account to proceed","errors":[] }
When the user account is inactive 403 { "status": false, "message": "Your account is currently inactive.", "errors": [] }
If the request comes from an IP address or domain that is not on the account's API whitelist 400 { "status": false, "message": "Access denied! Your IP or domain is not whitelisted.[ HostName : ] - [ Ip Address : << YOUR_SERVER_IP >>]", "errors": [] }

Response Explanation

  • id: Unique identifier for the call (integer).
  • from: The phone number the call originated from.
  • to: The phone number the call was made to.
  • type: The type of the call: "Incoming Call", "Outgoing Call" or "Missed Call".
  • status: The call status (e.g., "Completed", "Missed").
  • recording_url: A URL to the call recording (if available).
  • duration: The call duration in seconds, as an integer (e.g., 3).
  • created_at: When the call occurred, as MM-DD-YYYY hh:mm:ss AM/PM in your account's timezone (e.g., "12-10-2024 10:15:30 AM").
  • is_public_call: 1 if the call was initiated through the public API, otherwise 0.
  • is_automated_call: 1 if the call was placed as an automated call, otherwise 0.
  • user_type: The user_type specifies whether the user is a sub_user or an owner.
  • user_name: The user_name indicates the specific user's full name.

Code Examples

Fetch voice call history
php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => 'https://api.easify.live/api/v2/voice-call/history?from=%2B1234567****&to[]=%2B1987654****&from_date=2024-12-01&to_date=2024-12-15&public_call=1&limit=10&order=desc&page=1&include_subusers=1',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => [
    'Authorization: Bearer <>',
    'Accept: application/json',
  ],
]);

$response = curl_exec($curl);
curl_close($curl);

echo $response;