> For the complete documentation index, see [llms.txt](https://docs.plumvoice.com/fuse/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.plumvoice.com/fuse/apis/logs/get-call-logs-with-details.md).

# Get Call Logs With Details

{% hint style="success" %}
**-** **NEW! -  Interactive API docs, now live!**

Visit [api-docs.plumvoice.com](https://api-docs.plumvoice.com) to **read** Plum API documentation, **build and test requests** in our interactive API sandbox, **review** the responses, and **share** it all with your team.
{% endhint %}

{% hint style="warning" %}
**Only for the last 5 days:**

Detailed call logs are only available for calls made within the last 5 days.
{% endhint %}

## Getting Call Logs With Details

<mark style="color:blue;">`GET`</mark> `https://fuse.plumvoice.com/api/all_logs/{start}/{end}`

Retrieve all call logs for the defined calls.

#### Path Parameters

| Name  | Type   | Description    |
| ----- | ------ | -------------- |
| start | string | UNIX timestamp |
| end   | string | UNIX timestamp |

#### Query Parameters

| Name   | Type    | Description                                                                                          |
| ------ | ------- | ---------------------------------------------------------------------------------------------------- |
| number | string  | Filters the list of call logs for only calls to this phone number.                                   |
| offset | integer | Number of call logs to skip before returning results. *Default: 0*                                   |
| limit  | integer | <p>Maximum number of call logs to return. <br><em>Default: 1000, Minimum: 1, Maximum: 10000</em></p> |

{% tabs %}
{% tab title="200 Example: Call was queued and then canceled." %}
{% tabs %}
{% tab title="JSON" %}

```javascript
{
  "calls": [
    {
      "dest": "6177123001",
      "src": "6177123000",
      "start": "1575898386",
      "end": "1575898423",
      "session_id": "100035;000;1575898377",
      "detail": [
        {
          "event": {
            "line": "Executing application \"Welcome Application\" version \"1.0\"",
            "data": {
              "module_type": "start",
              "result_variable": "start"
            }
          },
          "class": "info",
          "timestamp": 1575898386
        },
        {
          "event": {
            "line": "Hello, welcome to the Plum Fuse Plus sample application.  This application will show off a few different modules.  Let's start with some simple math.",
            "data": {
              "type": "static",
              "has_audio": false,
              "revision_id": "61231",
              "prompt_id_type": "module",
              "prompt_id": "598801",
              "language": "en-US",
              "module_type": "prompt",
              "result_variable": "welcome"
            }
          },
          "class": "prompt",
          "timestamp": 1575898386
        },
        {
          "event": {
            "line": "Please enter a number using your telephone keypad.  We will store this value as X.",
            "data": {
              "type": "static",
              "has_audio": false,
              "revision_id": "61231",
              "prompt_id_type": "module",
              "prompt_id": "598811",
              "language": "en-US",
              "module_type": "number",
              "result_variable": "X"
            }
          },
          "class": "prompt",
          "timestamp": 1575898399
        },
        {
          "event": {
            "line": "User input: 6 (dtmf)",
            "data": {
              "module_type": "number",
              "result_variable": "X"
            }
          },
          "class": "event",
          "timestamp": 1575898405
        },
        {
          "event": {
            "line": "Please enter another number using your telephone keypad.  We will store this value as Y.",
            "data": {
              "type": "static",
              "has_audio": false,
              "revision_id": "61231",
              "prompt_id_type": "module",
              "prompt_id": "598821",
              "language": "en-US",
              "module_type": "number",
              "result_variable": "Y"
            }
          },
          "class": "prompt",
          "timestamp": 1575898405
        },
        {
          "event": {
            "line": "User input: 9 (dtmf)",
            "data": {
              "module_type": "number",
              "result_variable": "Y"
            }
          },
          "class": "event",
          "timestamp": 1575898411
        },
        {
          "event": {
            "line": "Executing JavaScript",
            "data": {
              "module_type": "eval_js",
              "result_variable": "sum"
            }
          },
          "class": "info",
          "timestamp": 1575898411
        },
        {
          "event": {
            "line": "X plus Y equals: ",
            "data": {
              "type": "static",
              "has_audio": false,
              "revision_id": "61231",
              "prompt_id_type": "module",
              "prompt_id": "598831",
              "language": "en-US",
              "module_type": "prompt",
              "result_variable": "result"
            }
          },
          "class": "prompt",
          "timestamp": 1575898411
        },
        {
          "event": {
            "line": "15 (say-as: prompt)",
            "data": {
              "type": "dynamic",
              "language": "en-US",
              "module_type": "prompt",
              "result_variable": "result"
            }
          },
          "class": "prompt",
          "timestamp": 1575898411
        },
        {
          "event": {
            "line": ".",
            "data": {
              "type": "static",
              "has_audio": false,
              "revision_id": "61231",
              "prompt_id_type": "module",
              "prompt_id": "598851",
              "language": "en-US",
              "module_type": "prompt",
              "result_variable": "result"
            }
          },
          "class": "prompt",
          "timestamp": 1575898411
        },
        {
          "event": {
            "line": "To try that again, press 1.  Otherwise, press 2.",
            "data": {
              "type": "static",
              "has_audio": false,
              "revision_id": "61231",
              "prompt_id_type": "module",
              "prompt_id": "598861",
              "language": "en-US",
              "module_type": "yes_no",
              "result_variable": "try_sum_again"
            }
          },
          "class": "prompt",
          "timestamp": 1575898415
        },
        {
          "event": {
            "line": "User input: false (dtmf)",
            "data": {
              "module_type": "yes_no",
              "result_variable": "try_sum_again"
            }
          },
          "class": "event",
          "timestamp": 1575898419
        },
        {
          "event": {
            "line": "Now let's try capturing an address.",
            "data": {
              "type": "static",
              "has_audio": false,
              "revision_id": "61231",
              "prompt_id_type": "module",
              "prompt_id": "598881",
              "language": "en-US",
              "module_type": "prompt",
              "result_variable": "info"
            }
          },
          "class": "prompt",
          "timestamp": 1575898419
        },
        {
          "event": {
            "line": "Please say a US city and state.",
            "data": {
              "type": "static",
              "has_audio": false,
              "revision_id": "61231",
              "prompt_id_type": "module",
              "prompt_id": "598871",
              "language": "en-US",
              "module_type": "address",
              "result_variable": "city_state"
            }
          },
          "class": "prompt",
          "timestamp": 1575898423
        },
        {
          "event": {
            "line": "Disconnecting call",
            "data": {
              "module_type": "address",
              "result_variable": "city_state"
            }
          },
          "class": "event",
          "timestamp": 1575898423
        }
      ],
      "type": "inbound",
      "log": true
    }
  ],
  "total_calls": 1
}
```

{% endtab %}

{% tab title="XML" %}

```markup
<?xml version="1.0"?>
<result>
   <calls>
      <item>
         <dest>6177123001</dest>
         <src>6177123000</src>
         <start>1575898386</start>
         <end>1575898423</end>
         <session_id>100035;000;1575898377</session_id>
         <detail>
            <item>
               <event>
                  <line>Executing application "Welcome Application" version "1.0"</line>
                  <data>
                     <module_type>start</module_type>
                     <result_variable>start</result_variable>
                  </data>
               </event>
               <class>info</class>
               <timestamp>1575898386</timestamp>
            </item>
            <item>
               <event>
                  <line>Hello, welcome to the Plum Fuse Plus sample application.  This application will show off a few different modules.  Let's start with some simple math.</line>
                  <data>
                     <type>static</type>
                     <has_audio>false</has_audio>
                     <revision_id>61231</revision_id>
                     <prompt_id_type>module</prompt_id_type>
                     <prompt_id>598801</prompt_id>
                     <language>en-US</language>
                     <module_type>prompt</module_type>
                     <result_variable>welcome</result_variable>
                  </data>
               </event>
               <class>prompt</class>
               <timestamp>1575898386</timestamp>
            </item>
            <item>
               <event>
                  <line>Please enter a number using your telephone keypad.  We will store this value as X.</line>
                  <data>
                     <type>static</type>
                     <has_audio>false</has_audio>
                     <revision_id>61231</revision_id>
                     <prompt_id_type>module</prompt_id_type>
                     <prompt_id>598811</prompt_id>
                     <language>en-US</language>
                     <module_type>number</module_type>
                     <result_variable>X</result_variable>
                  </data>
               </event>
               <class>prompt</class>
               <timestamp>1575898399</timestamp>
            </item>
            <item>
               <event>
                  <line>User input: 6 (dtmf)</line>
                  <data>
                     <module_type>number</module_type>
                     <result_variable>X</result_variable>
                  </data>
               </event>
               <class>event</class>
               <timestamp>1575898405</timestamp>
            </item>
            <item>
               <event>
                  <line>Please enter another number using your telephone keypad.  We will store this value as Y.</line>
                  <data>
                     <type>static</type>
                     <has_audio>false</has_audio>
                     <revision_id>61231</revision_id>
                     <prompt_id_type>module</prompt_id_type>
                     <prompt_id>598821</prompt_id>
                     <language>en-US</language>
                     <module_type>number</module_type>
                     <result_variable>Y</result_variable>
                  </data>
               </event>
               <class>prompt</class>
               <timestamp>1575898405</timestamp>
            </item>
            <item>
               <event>
                  <line>User input: 9 (dtmf)</line>
                  <data>
                     <module_type>number</module_type>
                     <result_variable>Y</result_variable>
                  </data>
               </event>
               <class>event</class>
               <timestamp>1575898411</timestamp>
            </item>
            <item>
               <event>
                  <line>Executing JavaScript</line>
                  <data>
                     <module_type>eval_js</module_type>
                     <result_variable>sum</result_variable>
                  </data>
               </event>
               <class>info</class>
               <timestamp>1575898411</timestamp>
            </item>
            <item>
               <event>
                  <line>X plus Y equals:</line>
                  <data>
                     <type>static</type>
                     <has_audio>false</has_audio>
                     <revision_id>61231</revision_id>
                     <prompt_id_type>module</prompt_id_type>
                     <prompt_id>598831</prompt_id>
                     <language>en-US</language>
                     <module_type>prompt</module_type>
                     <result_variable>result</result_variable>
                  </data>
               </event>
               <class>prompt</class>
               <timestamp>1575898411</timestamp>
            </item>
            <item>
               <event>
                  <line>15 (say-as: prompt)</line>
                  <data>
                     <type>dynamic</type>
                     <language>en-US</language>
                     <module_type>prompt</module_type>
                     <result_variable>result</result_variable>
                  </data>
               </event>
               <class>prompt</class>
               <timestamp>1575898411</timestamp>
            </item>
            <item>
               <event>
                  <line>.</line>
                  <data>
                     <type>static</type>
                     <has_audio>false</has_audio>
                     <revision_id>61231</revision_id>
                     <prompt_id_type>module</prompt_id_type>
                     <prompt_id>598851</prompt_id>
                     <language>en-US</language>
                     <module_type>prompt</module_type>
                     <result_variable>result</result_variable>
                  </data>
               </event>
               <class>prompt</class>
               <timestamp>1575898411</timestamp>
            </item>
            <item>
               <event>
                  <line>To try that again, press 1.  Otherwise, press 2.</line>
                  <data>
                     <type>static</type>
                     <has_audio>false</has_audio>
                     <revision_id>61231</revision_id>
                     <prompt_id_type>module</prompt_id_type>
                     <prompt_id>598861</prompt_id>
                     <language>en-US</language>
                     <module_type>yes_no</module_type>
                     <result_variable>try_sum_again</result_variable>
                  </data>
               </event>
               <class>prompt</class>
               <timestamp>1575898415</timestamp>
            </item>
            <item>
               <event>
                  <line>User input: false (dtmf)</line>
                  <data>
                     <module_type>yes_no</module_type>
                     <result_variable>try_sum_again</result_variable>
                  </data>
               </event>
               <class>event</class>
               <timestamp>1575898419</timestamp>
            </item>
            <item>
               <event>
                  <line>Now let's try capturing an address.</line>
                  <data>
                     <type>static</type>
                     <has_audio>false</has_audio>
                     <revision_id>61231</revision_id>
                     <prompt_id_type>module</prompt_id_type>
                     <prompt_id>598881</prompt_id>
                     <language>en-US</language>
                     <module_type>prompt</module_type>
                     <result_variable>info</result_variable>
                  </data>
               </event>
               <class>prompt</class>
               <timestamp>1575898419</timestamp>
            </item>
            <item>
               <event>
                  <line>Please say a US city and state.</line>
                  <data>
                     <type>static</type>
                     <has_audio>false</has_audio>
                     <revision_id>61231</revision_id>
                     <prompt_id_type>module</prompt_id_type>
                     <prompt_id>598871</prompt_id>
                     <language>en-US</language>
                     <module_type>address</module_type>
                     <result_variable>city_state</result_variable>
                  </data>
               </event>
               <class>prompt</class>
               <timestamp>1575898423</timestamp>
            </item>
            <item>
               <event>
                  <line>Disconnecting call</line>
                  <data>
                     <module_type>address</module_type>
                     <result_variable>city_state</result_variable>
                  </data>
               </event>
               <class>event</class>
               <timestamp>1575898423</timestamp>
            </item>
         </detail>
         <type>inbound</type>
         <log>true</log>
      </item>
   </calls>
   <total_calls>1</total_calls>
</result>
```

{% endtab %}
{% endtabs %}
{% endtab %}
{% endtabs %}

### **Possible Response Codes**

* **200**: success
* **401**: authentication headers invalid or the account is inactive
* **404**: call log not found
* **405**: invalid HTTP method supplied (only GET allowed)
* **500**: database error

The return structure contains the following item(s):

| Name         | Data Type | Always Present | Description                                                                                                                                                                      |
| ------------ | --------- | -------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| error        | string    | No             | Message indicating what went wrong with the request when the HTTP code is not 200.                                                                                               |
| calls        | mixed     | No             | Array of calls that match the query parameters. Supplied when the HTTP code is 200. See the table below for more information on the data in this item.                           |
| total\_calls | int       | No             | The total number of calls for the given start, end and number parameters. Supplied when the HTTP code is 200. See the table below for more information on the data in this item. |

###

### Response Data Definitions

#### Single Call Entry

| Name        | Data Type | Value                                                                                                           |
| ----------- | --------- | --------------------------------------------------------------------------------------------------------------- |
| dest        | string    | Destination phone number of the call.                                                                           |
| src         | string    | Source phone number of the call.                                                                                |
| start       | int       | Start UNIX timestamp for this call.                                                                             |
| end         | int       | End Unix timestamp for this call.                                                                               |
| session\_id | string    | Unique ID for this call, also used to fetch individual call logs.                                               |
| details     | json      | <p>json format of log details for each call</p><p><em>false</em> if the call was made more than 5 days ago </p> |
| type        | string    | Type for this call (inbound, outbound or transfer).                                                             |
| log         | bool      | Flag indicating if a call log is available for this call.                                                       |

### **Sample Code**

This sample PHP code makes a request to this method:

```php
<?php
// account and application settings
$email = '<your_email_address>';
$developer_key = '<your_developer_key>';
$start = strtotime('midnight -5 days);
$end = strtotime('midnight');
$number = '6177123000';
$limit = 10000;
$offset = 0;

// build the URL
$url = 'https://fuse.plumvoice.com/api/all_logs/'.$start.'/'.$end.'?number='.$number.'&limit='.$limit.'&offset='.$offset;

$ch = curl_init();
curl_setopt($ch, CURLOPT_USERPWD, $email.':'.$developer_key);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, array("Accept: application/json"));
$result = curl_exec($ch);
$http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
var_dump($result);
var_dump($http_code);
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.plumvoice.com/fuse/apis/logs/get-call-logs-with-details.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
