> For the complete documentation index, see [llms.txt](https://user-docs.voipcube.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://user-docs.voipcube.io/user-manual/customer-service-api/user-status-logs.md). Agents can also search and read this documentation through its [MCP server](https://user-docs.voipcube.io/~gitbook/mcp).

# User Status Logs

It is possible for customers with 3CX to define custom statuses in the VoIPcube Portal. Whenever a user selects one of these statuses in the VoIPcube Client, the action is logged in our system. Via the Customer Service API these logs can be fetched.

## Endpoint <a href="#endpoint" id="endpoint"></a>

There is a single endpoint that can be used to retrieve the user status logs. The endpoint is available on the Customer Service API located at [https://customer.voipcube.nl](https://customer.voipcube.nl/).

The following endpoint can be used to fetch the user status logs:

* `GET: /stats/user-statuses`

{% hint style="info" %}
An API key is needed to access the customer service API. This API key has to be attached to the HTTPS requests in the `Key` header.\
The key can be generated in the VoIPcube portal on the Customer page
{% endhint %}

## Query string parameters <a href="#query-string-parameters" id="query-string-parameters"></a>

Several query string parameters can be provided in order to customize the response.

<table data-header-hidden data-full-width="true"><thead><tr><th></th><th></th><th></th></tr></thead><tbody><tr><td><strong>Query string parameter</strong></td><td><strong>Required</strong></td><td><strong>Description</strong></td></tr><tr><td>from</td><td>true</td><td>Date to mark the start of the query period for which to fetch logs. Must be noted in international date format, e.g.: <code>2023-05-29T15:02:10Z</code> (the time portion is optional, if not provided <code>00:00:00</code> is assumed)</td></tr><tr><td>to</td><td>true</td><td>Date to mark the end of the query period for which to fetch logs. Must be noted in international date format, e.g.: <code>2023-05-29T15:02:10Z</code> (the time portion is optional, if not provided <code>00:00:00</code> is assumed)</td></tr><tr><td>userIds</td><td>false</td><td>Possibility to only fetch the logs of specific <code>userId</code>s. If provided, must be given as an array, e.g.: <code>userIds[]=1d0abaa0-f0f8-42b3-b0f5-d755d33cf3fd&#x26;userIds[]=ebd1a29a-8980-404c-9def-cd54865abdc1</code></td></tr><tr><td>page</td><td>false</td><td>If used, turns on pagination. To be used in combination with the <code>size</code> query string parameter. Must contain a whole, positive number. If <code>size</code> is provided, but <code>page</code> is not, or it contains an invalid value, it will default to a value of <code>1</code>.</td></tr><tr><td>size</td><td>false</td><td>If used, turns on pagination. To be used in combination with the <code>page</code> query string parameter. Must contain a whole, positive number. If <code>page</code> is provided, but <code>size</code> is not, or it contains an invalid value, it will default to a value of <code>25</code>.</td></tr></tbody></table>

## Response <a href="#response" id="response"></a>

Given that the request was formatted correctly. It will return a response that looks like the following:

```json
[
  {
      "status": "Customer visit",
      "userId": "0d00ae63-5b5d-45b9-a7c0-88f9cfb26b5e",
      "time": "2023-07-19T12:58:19.282Z"
  },
  {
      "status": "Researching problem",
      "userId": "0d00ae63-5b5d-45b9-a7c0-88f9cfb26b5e",
      "time": "2023-07-19T13:11:22.600Z"
  },
  {
      "status": "Available",
      "userId": "ebd1a29a-8980-404c-9def-cd54865abdc1",
      "time": "2023-07-19T13:12:55.243Z"
  },
  {
      "status": "",
      "userId": "ebd1a29a-8980-404c-9def-cd54865abdc1",
      "time": "2023-07-19T13:24:04.569Z"
  },
  {
      "status": "Available",
      "userId": "0d00ae63-5b5d-45b9-a7c0-88f9cfb26b5e",
      "time": "2023-07-19T13:41:24.075Z"
  }
]
```

## Limitations <a href="#limitations" id="limitations"></a>

To prevent an large data pull, a limitation has been placed on the length of the query period. A maximum period of 1 year worth of logs can be retrieved from the API.


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://user-docs.voipcube.io/user-manual/customer-service-api/user-status-logs.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
