# NotificationsApi

All URIs are relative to *https://admin-api.connected.dev*

|Method | HTTP request | Description|
|------------- | ------------- | -------------|
|[**getNotificationCount**](#getnotificationcount) | **GET** /notifications/count | Count the caller\&#39;s notifications|
|[**getNotificationStats**](#getnotificationstats) | **GET** /notifications/stats | Get notification statistics|
|[**getNotifications**](#getnotifications) | **GET** /notifications | List the current member\&#39;s notifications|
|[**markNotificationsRead**](#marknotificationsread) | **PUT** /notifications/read | Mark notifications as read|

# **getNotificationCount**
> SyncAccounts200Response getNotificationCount()

Returns the number of notifications for the current organization member, optionally filtered by read/unread status, source, or notification type, no special permission is required beyond authentication since results are scoped to the caller.

### Example

```typescript
import {
    NotificationsApi,
    Configuration,
    NotificationFilters
} from '@connectedxm/admin-sdk';

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

let filters: NotificationFilters; //Filter by filters (optional) (default to undefined)

const { status, data } = await apiInstance.getNotificationCount(
    filters
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **filters** | **NotificationFilters** | Filter by filters | (optional) defaults to undefined|


### Return type

**SyncAccounts200Response**

### Authorization

[ApiKeyAuth](../README.md#ApiKeyAuth), [OrganizationId](../README.md#OrganizationId)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Successful response |  -  |

[[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)

# **getNotificationStats**
> GetNotificationStats200Response getNotificationStats()

Returns aggregate notification statistics for the authenticated organization member, including total and unread counts broken down by notification type and source; available to any authenticated organization member for their own notifications.

### Example

```typescript
import {
    NotificationsApi,
    Configuration
} from '@connectedxm/admin-sdk';

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

const { status, data } = await apiInstance.getNotificationStats();
```

### Parameters
This endpoint does not have any parameters.


### Return type

**GetNotificationStats200Response**

### Authorization

[ApiKeyAuth](../README.md#ApiKeyAuth), [OrganizationId](../README.md#OrganizationId)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Successful response |  -  |

[[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)

# **getNotifications**
> GetNotifications200Response getNotifications()

Returns a paginated list of notifications for the authenticated organization member, filterable by read status, source, type, and search term; available to any authenticated organization member for their own notifications.

### Example

```typescript
import {
    NotificationsApi,
    Configuration,
    NotificationFilters
} from '@connectedxm/admin-sdk';

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

let filters: NotificationFilters; //Filter by filters (optional) (default to undefined)
let page: number; //Page number (optional) (default to 1)
let pageSize: number; //Number of items per page (optional) (default to 25)
let orderBy: string; //Field to order by (optional) (default to undefined)
let search: string; //Search query (optional) (default to undefined)

const { status, data } = await apiInstance.getNotifications(
    filters,
    page,
    pageSize,
    orderBy,
    search
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **filters** | **NotificationFilters** | Filter by filters | (optional) defaults to undefined|
| **page** | [**number**] | Page number | (optional) defaults to 1|
| **pageSize** | [**number**] | Number of items per page | (optional) defaults to 25|
| **orderBy** | [**string**] | Field to order by | (optional) defaults to undefined|
| **search** | [**string**] | Search query | (optional) defaults to undefined|


### Return type

**GetNotifications200Response**

### Authorization

[ApiKeyAuth](../README.md#ApiKeyAuth), [OrganizationId](../README.md#OrganizationId)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Successful response |  -  |

[[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)

# **markNotificationsRead**
> SyncAccounts200Response markNotificationsRead(markNotificationsReadRequest)

Marks the given list of notification IDs as read for the current organization member and returns the count of notifications updated.

### Example

```typescript
import {
    NotificationsApi,
    Configuration,
    MarkNotificationsReadRequest
} from '@connectedxm/admin-sdk';

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

let markNotificationsReadRequest: MarkNotificationsReadRequest; //

const { status, data } = await apiInstance.markNotificationsRead(
    markNotificationsReadRequest
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **markNotificationsReadRequest** | **MarkNotificationsReadRequest**|  | |


### Return type

**SyncAccounts200Response**

### Authorization

[ApiKeyAuth](../README.md#ApiKeyAuth), [OrganizationId](../README.md#OrganizationId)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Successful response |  -  |

[[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)

