# ChatSessionsApi

All URIs are relative to *https://api.chatkitty.com*

|Method | HTTP request | Description|
|------------- | ------------- | -------------|
|[**listChatSessions**](#listchatsessions) | **GET** /chat-sessions | List chat sessions|

# **listChatSessions**
> PagedModelChatSessionResource listChatSessions()

Returns a page of chat sessions belonging to this application

### Example

```typescript
import {
    ChatSessionsApi,
    Configuration
} from 'chatkitty';

const configuration = new Configuration();
const apiInstance = new ChatSessionsApi(configuration);

let page: number; //Zero-based page index (0..N) (optional) (default to 0)
let size: number; //The size of the page to be returned (optional) (default to 25)
let sort: Array<string>; //Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported. (optional) (default to undefined)
let state: 'ACTIVE' | 'ENDED'; //Filters by state (optional) (default to undefined)

const { status, data } = await apiInstance.listChatSessions(
    page,
    size,
    sort,
    state
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **page** | [**number**] | Zero-based page index (0..N) | (optional) defaults to 0|
| **size** | [**number**] | The size of the page to be returned | (optional) defaults to 25|
| **sort** | **Array&lt;string&gt;** | Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported. | (optional) defaults to undefined|
| **state** | [**&#39;ACTIVE&#39; | &#39;ENDED&#39;**]**Array<&#39;ACTIVE&#39; &#124; &#39;ENDED&#39;>** | Filters by state | (optional) defaults to undefined|


### Return type

**PagedModelChatSessionResource**

### Authorization

[application_authorization](../README.md#application_authorization)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json, application/vnd.chatkitty+json, application/vnd.chatkitty.v1+json, application/vnd.hal+json, application/hal+json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**404** | Resource not found |  -  |
|**403** | Access is denied |  -  |
|**400** | Client error |  -  |
|**401** | Unauthorized: Full authentication is required to access this resource |  -  |
|**200** | OK |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

