V 2.0

Call Report

Introduction

This document provides comprehensive information about the Call Report API endpoints. These endpoints allow retrieving, filtering, and exporting call log reports in various formats (CSV, Excel, PDF). The API supports advanced filtering capabilities including date ranges, agent filtering, duration filters, call types, and custom call analysis fields.

Base URL

The base URL for this API endpoint is: v4-api.deepcall.com/api/v2/callreport

Authentication

Authentication is required for all endpoints. It can be done in two ways:

  1. Using ssid (Session ID)
  2. Using userId and token

Note: When userId and token are used, ssid should not be present in the request.


Common Error Codes

These error codes can be returned by any endpoint in this API. Endpoint-specific errors are documented in their respective sections.

Authentication & Authorization Errors

Error Code Error Message Description Solution
1000 Invalid parameters Request validation failed or authentication invalid Check all required parameters are provided
1014 Invalid token Authentication token is expired or invalid Generate a new token or use valid ssid
1015 Permission denied User does not have LIST_CALL_LOG permission Contact admin to grant required permissions
1047 Invalid Request Data Request body is empty or malformed Ensure request body is valid JSON

System Errors

Error Code Error Message Description Solution
1009 Something went wrong Unexpected server error occurred Retry the request or contact support
1010 Error in DB connect Database connection is not available Check system status or retry after some time

Common Error Response Format

All error responses follow this structure:

{
  "status": "error",
  "message": "Error description here",
  "code": 1000
}

Excel Request Title Change

https://v4-api.deepcall.com/api/v2/CallReport/changeTitle

Endpoint

Description

The Change Title endpoint allows users to update the title/name of an Excel export request. This endpoint is specifically used to rename Excel export jobs that were created using the /excelRequest/ endpoint. It helps in organizing and identifying export files more easily by providing meaningful, descriptive names to your export requests.

Use Cases

Request Parameters

Parameter Type Required Description
userId string Yes* User ID for authentication (*required if ssid not provided)
token string Yes* Authentication token (*required if ssid not provided)
ssid string Yes* Session ID (*required if userId/token not provided)
requestId string Yes Excel export request ID (obtained from excelRequest or excelRequestList response)
title string Yes New title/name for the Excel export request

Request Examples

Example 1: Update Excel Export Request Title

{
  "ssid": "{{ssid}}",
  "requestId": "req_123456",
  "title": "November 2025 Campaign Report - Final"
}

Note: The requestId should be obtained from the /excelRequest/ or /excelRequestList/ endpoint response.

Example 2: Rename Excel Export with Descriptive Title

{
  "userId": "{{userid}}",
  "token": "{{token}}",
  "requestId": "req_789012",
  "title": "Agent Performance Analysis - Q4 2025"
}

Response Details

Success Response

Status Code: 200

{
  "code": 200,
  "status": "success",
  "message": "Title updated successfully"
}

Excel Request Title Change

var axios = require('axios');
var data = '{"ssid": "{{ssid}}","requestId": "{{objectid}}","title": "November 2025 Campaign Report - Final"}';

var config = {
 method: 'post',
 url: 'https://{{brand}}/api/v2/CallReport/changeTitle',
 headers: { 
'Content-Length': ''
 },
 data : data
};

axios(config)
.then(function (response) {
 console.log(JSON.stringify(response.data));
})
.catch(function (error) {
 console.log(error);
});
setUrl('https://{{brand}}/api/v2/CallReport/changeTitle');
$request->setMethod(HTTP_Request2::METHOD_POST);
$request->setConfig(array(
 'follow_redirects' => TRUE
));
$request->setHeader(array(
 'Content-Length' => ''
));
$request->setBody('{"ssid": "{{ssid}}","requestId": "{{objectid}}","title": "November 2025 Campaign Report - Final"}');
try {
 $response = $request->send();
 if ($response->getStatus() == 200) {
echo $response->getBody();
 }
 else {
echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
$response->getReasonPhrase();
 }
}
catch(HTTP_Request2_Exception $e) {
 echo 'Error: ' . $e->getMessage();
}
import http.client

conn = http.client.HTTPSConnection("{{brand}}")
payload = "{\"ssid\": \"{{ssid}}\",\"requestId\": \"{{objectid}}\",\"title\": \"November 2025 Campaign Report - Final\"}"
headers = {
 'Content-Length': ''
}
conn.request("POST", "/api/v2/CallReport/changeTitle", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
var client = new RestClient("https://{{brand}}/api/v2/CallReport/changeTitle");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
var body = @"{" + "\n" +
@"  ""ssid"": ""{{ssid}}""," + "\n" +
@"  ""requestId"": ""{{objectid}}""," + "\n" +
@"  ""title"": ""November 2025 Campaign Report - Final""" + "\n" +
@"}";
request.AddParameter("text/plain", body,  ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
curl --location -g --request POST 'https://{{brand}}/api/v2/CallReport/changeTitle' \
--data-raw '{
  "ssid": "{{ssid}}",
  "requestId": "{{objectid}}",
  "title": "November 2025 Campaign Report - Final"
}'
var request = http.Request('POST', Uri.parse('https://{{brand}}/api/v2/CallReport/changeTitle'));
request.body = '''{\n  "ssid": "{{ssid}}",\n  "requestId": "{{objectid}}",\n  "title": "November 2025 Campaign Report - Final"\n}''';

http.StreamedResponse response = await request.send();

if (response.statusCode == 200) {
   print(await response.stream.bytesToString());
}
else {
   print(response.reasonPhrase);
}
package main

import (
   "fmt"
   "strings"
   "net/http"
   "io/ioutil"
)

func main() {

   url := "https://%7B%7Bbrand%7D%7D/api/v2/CallReport/changeTitle"
   method := "POST"

   payload := strings.NewReader(`{
  "ssid": "{{ssid}}",
  "requestId": "{{objectid}}",
  "title": "November 2025 Campaign Report - Final"
}`)

   client := &http.Client {
   }
   req, err := http.NewRequest(method, url, payload)

   if err != nil {
      fmt.Println(err)
      return
   }
   res, err := client.Do(req)
   if err != nil {
      fmt.Println(err)
      return
   }
   defer res.Body.Close()

   body, err := ioutil.ReadAll(res.Body)
   if err != nil {
      fmt.Println(err)
      return
   }
   fmt.Println(string(body))
}
POST /api/v2/CallReport/changeTitle HTTP/1.1
Host: {{brand}}
Content-Length: 107

{
  "ssid": "{{ssid}}",
  "requestId": "{{objectid}}",
  "title": "November 2025 Campaign Report - Final"
}
OkHttpClient client = new OkHttpClient().newBuilder()
   .build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "{\n  \"ssid\": \"{{ssid}}\",\n  \"requestId\": \"{{objectid}}\",\n  \"title\": \"November 2025 Campaign Report - Final\"\n}");
Request request = new Request.Builder()
   .url("https://{{brand}}/api/v2/CallReport/changeTitle")
   .method("POST", body)
   .addHeader("Content-Length", "")
   .build();
Response response = client.newCall(request).execute();
var myHeaders = new Headers();
myHeaders.append("Content-Length", "");

var raw = "{\n  \"ssid\": \"{{ssid}}\",\n  \"requestId\": \"{{objectid}}\",\n  \"title\": \"November 2025 Campaign Report - Final\"\n}";

var requestOptions = {
   method: 'POST',
   headers: myHeaders,
   body: raw,
   redirect: 'follow'
};

fetch("https://{{brand}}/api/v2/CallReport/changeTitle", requestOptions)
   .then(response => response.text())
   .then(result => console.log(result))
   .catch(error => console.log('error', error));
CURL *curl;
CURLcode res;
curl = curl_easy_init();
if(curl) {
   curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "POST");
   curl_easy_setopt(curl, CURLOPT_URL, "https://%7B%7Bbrand%7D%7D/api/v2/CallReport/changeTitle");
   curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
   curl_easy_setopt(curl, CURLOPT_DEFAULT_PROTOCOL, "https");
   struct curl_slist *headers = NULL;
   headers = curl_slist_append(headers, "Content-Length: ");
   curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
   const char *data = "{\n  \"ssid\": \"{{ssid}}\",\n  \"requestId\": \"{{objectid}}\",\n  \"title\": \"November 2025 Campaign Report - Final\"\n}";
   curl_easy_setopt(curl, CURLOPT_POSTFIELDS, data);
   res = curl_easy_perform(curl);
}
curl_easy_cleanup(curl);
#import 

dispatch_semaphore_t sema = dispatch_semaphore_create(0);

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://%7B%7Bbrand%7D%7D/api/v2/CallReport/changeTitle"]
   cachePolicy:NSURLRequestUseProtocolCachePolicy
   timeoutInterval:10.0];
NSDictionary *headers = @{
   @"Content-Length": @""
};

[request setAllHTTPHeaderFields:headers];
NSData *postData = [[NSData alloc] initWithData:[@"{\n  \"ssid\": \"{{ssid}}\",\n  \"requestId\": \"{{objectid}}\",\n  \"title\": \"November 2025 Campaign Report - Final\"\n}" dataUsingEncoding:NSUTF8StringEncoding]];
[request setHTTPBody:postData];

[request setHTTPMethod:@"POST"];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
   if (error) {
      NSLog(@"%@", error);
      dispatch_semaphore_signal(sema);
   } else {
      NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
      NSError *parseError = nil;
      NSDictionary *responseDictionary = [NSJSONSerialization JSONObjectWithData:data options:0 error:&parseError];
      NSLog(@"%@",responseDictionary);
      dispatch_semaphore_signal(sema);
   }
}];
[dataTask resume];
dispatch_semaphore_wait(sema, DISPATCH_TIME_FOREVER);
open Lwt
open Cohttp
open Cohttp_lwt_unix

let postData = ref "{\n  \"ssid\": \"{{ssid}}\",\n  \"requestId\": \"{{objectid}}\",\n  \"title\": \"November 2025 Campaign Report - Final\"\n}";;

let reqBody = 
   let uri = Uri.of_string "https://%7B%7Bbrand%7D%7D/api/v2/CallReport/changeTitle" in
   let headers = Header.init ()
      |> fun h -> Header.add h "Content-Length" ""
   in
   let body = Cohttp_lwt.Body.of_string !postData in

   Client.call ~headers ~body `POST uri >>= fun (_resp, body) ->
   body |> Cohttp_lwt.Body.to_string >|= fun body -> body

let () =
   let respBody = Lwt_main.run reqBody in
   print_endline (respBody)
$headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"
$headers.Add("Content-Length", "")

$body = "{`n  `"ssid`": `"{{ssid}}`",`n  `"requestId`": `"{{objectid}}`",`n  `"title`": `"November 2025 Campaign Report - Final`"`n}"

$response = Invoke-RestMethod 'https://{{brand}}/api/v2/CallReport/changeTitle' -Method 'POST' -Headers $headers -Body $body
$response | ConvertTo-Json
require "uri"
require "net/http"

url = URI("https://{{brand}}/api/v2/CallReport/changeTitle")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Length"] = ""
request.body = "{\n  \"ssid\": \"{{ssid}}\",\n  \"requestId\": \"{{objectid}}\",\n  \"title\": \"November 2025 Campaign Report - Final\"\n}"

response = https.request(request)
puts response.read_body
printf '{
  "ssid": "{{ssid}}",
  "requestId": "{{objectid}}",
  "title": "November 2025 Campaign Report - Final"
}'| http  --follow --timeout 3600 POST 'https://{{brand}}/api/v2/CallReport/changeTitle' \
 Content-Length:
import Foundation
#if canImport(FoundationNetworking)
import FoundationNetworking
#endif

var semaphore = DispatchSemaphore (value: 0)

let parameters = "{\n  \"ssid\": \"{{ssid}}\",\n  \"requestId\": \"{{objectid}}\",\n  \"title\": \"November 2025 Campaign Report - Final\"\n}"
let postData = parameters.data(using: .utf8)

var request = URLRequest(url: URL(string: "https://{{brand}}/api/v2/CallReport/changeTitle")!,timeoutInterval: Double.infinity)
request.addValue("", forHTTPHeaderField: "Content-Length")

request.httpMethod = "POST"
request.httpBody = postData

let task = URLSession.shared.dataTask(with: request) { data, response, error in 
   guard let data = data else {
      print(String(describing: error))
      semaphore.signal()
      return
   }
   print(String(data: data, encoding: .utf8)!)
   semaphore.signal()
}

task.resume()
semaphore.wait()

Example Response

 [{"key":"Date"
"value":"Sun
 23 Nov 2025 09:42:19 GMT"}
{"key":"Content-Type"
"value":"application\/json; charset=utf-8"}
{"key":"Content-Length"
"value":"136"}
{"key":"Connection"
"value":"keep-alive"}
{"key":"Access-Control-Allow-Origin"
"value":"*"}
{"key":"Access-Control-Allow-Methods"
"value":"GET
 PUT
 POST
 DELETE
 OPTIONS"}
{"key":"Access-Control-Allow-Headers"
"value":"session-token
Authorization
Origin
Accept
Content-Type
DNT
Authorization
Keep-Alive
User-Agent
X-Requested-With
If-Modified-Since
Cache-Control
Content-Type
Content-Range
Range"}
{"key":"Access-Control-Allow-Credentials"
"value":"true"}
{"key":"Vary"
"value":"Origin"}
{"key":"ETag"
"value":"W\/\"88-RajtaW45FP72hkXvVuhZ+DCWft8\""}
{"key":"Strict-Transport-Security"
"value":"max-age=15724800; includeSubDomains"}
{"key":"Access-Control-Max-Age"
"value":"1728000"}]
 {
    "status": "success",
    "data": {
        "acknowledged": true,
        "modifiedCount": 1,
        "upsertedId": null,
        "upsertedCount": 0,
        "matchedCount": 1
    },
    "response": true
}
©2021-2025 DeepCall (Powered by Sarv.com). All rights reserved.