# Understanding API Parameters

## Overview of Parameters

<table><thead><tr><th width="201">Parameter</th><th width="187">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>agentid</code></td><td>string</td><td>The ID of the agent you want data for. Omit if you want system-wide data.</td></tr><tr><td><code>results</code></td><td>integer</td><td>Number of results requested starting from <code>skip</code>. Defaults to 20 if not specified.</td></tr><tr><td><code>skip</code></td><td>integer</td><td><p>This value tells the API where in your data to begin. Defaults to 0 if not specified</p><p><code>skip = (pageNumber - 1) * results</code></p></td></tr><tr><td><code>metadatasearch</code></td><td>string</td><td>Keyword filter. Use <code>""</code> (empty string) if not filtering. Also defaults to this value if not specified.</td></tr><tr><td><code>conversationid</code></td><td>string</td><td>The ID of the specific conversation you want data for. </td></tr></tbody></table>

Note: For your own app integrating with our API, it is typical in pagination to first get the total number of query-able items in the not-paginated data source so you are aware of the maximum value.

## Path Parameters vs Query Parameters

Path Parameter: A required value as a part of the URL path. Appears right after the last `/` in the URL path.

Query Parameter: Included in the URL path if default values are not preferred. In these GetConversation(s) APIs they are optional. Appears after path parameters, if included. Set of query parameters always begins with `?` and are conjoined by `&` for any additional ones.

**It is important to note that the query parameters in APIs are optional by default, but this is not true in all cases. For instance, in the API endpoint `GET /api/oauth2` , the query parameters `client_id`  and  `redirect_uri`  are required, while `userid`  is an optional query parameter.**

Example: `GET /api/Chat/GetConversations/abc123?results=25&skip=75&metadatasearch=sales`&#x20;

* Required path parameters:&#x20;
  * `abc123` = required path parameter. In this case, represents `agentid`
* Optional query parameters to override default values:
  * `results` = 25 (int)
  * `skip` = 75 (int)
  * `metadatasearch` = "sales" (string)

## GetConversation(s) API Endpoints

### `/api/Chat/GetConversations/`&#x20;

**Description:** Returns a list of conversations when the  `agentid`  is not known.

**Required Path Parameters:** None

**Optional Query Parameters:**  `agentid` , `results` , `skip` , `metadatasearch`&#x20;

### `/api/Chat/GetConversations/{agentid}/`&#x20;

**Description:** Returns a list of conversations for the user based on the  `agentid` .

**Required Path Parameters:**  `agentid`&#x20;

**Optional Query Parameters:** `results` , `skip` , `metadatasearch`&#x20;

### `/api/Chat/GetConversations/{agentid}/{results}/{skip}/{metadatasearch}/`

**Description:** Returns a list of conversations for the user based on the  `agentid`  with the specified pagination settings.

**Required Path Parameters:**  `agentid` , `results` , `skip` , `metadatasearch`&#x20;

### `/api/Chat/GetConversation/{conversationid}`&#x20;

**Description:** Gets a single conversation with all responses and information.

**Required Path Parameters:** `conversationid`&#x20;
