# InterestsApi

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

|Method | HTTP request | Description|
|------------- | ------------- | -------------|
|[**createInterest**](#createinterest) | **POST** /interests | Create or fetch an interest|
|[**deleteInterest**](#deleteinterest) | **DELETE** /interests/{interestId} | Delete an interest|
|[**getInterest**](#getinterest) | **GET** /interests/{interestId} | Get an interest|
|[**getInterestAccounts**](#getinterestaccounts) | **GET** /interests/{interestId}/accounts | List accounts tagged with an interest|
|[**getInterestActivities**](#getinterestactivities) | **GET** /interests/{interestId}/activities | List activity posts tagged with an interest|
|[**getInterestChannels**](#getinterestchannels) | **GET** /interests/{interestId}/channels | List channels tagged with an interest|
|[**getInterestContents**](#getinterestcontents) | **GET** /interests/{interestId}/contents | List content items tagged with an interest|
|[**getInterestEvents**](#getinterestevents) | **GET** /interests/{interestId}/events | List events tagged with an interest|
|[**getInterestGroups**](#getinterestgroups) | **GET** /interests/{interestId}/groups | List groups tagged with an interest|
|[**getInterests**](#getinterests) | **GET** /interests | List interests|
|[**updateInterest**](#updateinterest) | **PUT** /interests/{interestId} | Update an interest|

# **createInterest**
> CreateInterest200Response createInterest(interestCreateInputs)

Creates a new interest for the organization with the given name, or returns the existing interest if one with that name already exists, and requires the \"create\" permission on interests.

### Example

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

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

let interestCreateInputs: InterestCreateInputs; //

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

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **interestCreateInputs** | **InterestCreateInputs**|  | |


### Return type

**CreateInterest200Response**

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

# **deleteInterest**
> CreateAccountInvitations200Response deleteInterest()

Permanently deletes the specified interest from the organization and requires the \"del\" permission on interests.

### Example

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

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

let interestId: string; //The interest identifier (default to undefined)

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

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **interestId** | [**string**] | The interest identifier | defaults to undefined|


### Return type

**CreateAccountInvitations200Response**

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

# **getInterest**
> CreateInterest200Response getInterest()

Retrieves a single interest by ID or name for the organization, requiring the \"read\" permission on interests.

### Example

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

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

let interestId: string; //The interest identifier (default to undefined)

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

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **interestId** | [**string**] | The interest identifier | defaults to undefined|


### Return type

**CreateInterest200Response**

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

# **getInterestAccounts**
> GetAccounts200Response getInterestAccounts()

Returns a paginated, searchable list of accounts associated with the given interest, filterable by name, email, or ID, and requires the \"read\" permission on both interests and accounts.

### Example

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

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

let interestId: string; //The interest identifier (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.getInterestAccounts(
    interestId,
    page,
    pageSize,
    orderBy,
    search
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **interestId** | [**string**] | The interest identifier | 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

**GetAccounts200Response**

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

# **getInterestActivities**
> GetAccountActivities200Response getInterestActivities()

Returns a paginated, searchable list of activity feed posts associated with the given interest, optionally filtered by activity status, and requires the \"read\" permission on both interests and activities.

### Example

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

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

let interestId: string; //The interest identifier (default to undefined)
let status: ActivityStatus; //Filter by status (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.getInterestActivities(
    interestId,
    status,
    page,
    pageSize,
    orderBy,
    search
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **interestId** | [**string**] | The interest identifier | defaults to undefined|
| **status** | **ActivityStatus** | Filter by status | (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

**GetAccountActivities200Response**

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

# **getInterestChannels**
> GetChannels200Response getInterestChannels()

Returns a paginated, searchable list of channels associated with the given interest, filterable by name, description, or ID, and requires the \"read\" permission on both interests and channels.

### Example

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

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

let interestId: string; //The interest identifier (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.getInterestChannels(
    interestId,
    page,
    pageSize,
    orderBy,
    search
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **interestId** | [**string**] | The interest identifier | 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

**GetChannels200Response**

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

# **getInterestContents**
> GetChannelContents200Response getInterestContents()

Returns a paginated, searchable list of content records associated with the given interest, filterable by title, body, or description, and requires the \"read\" permission on both interests and contents.

### Example

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

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

let interestId: string; //The interest identifier (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.getInterestContents(
    interestId,
    page,
    pageSize,
    orderBy,
    search
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **interestId** | [**string**] | The interest identifier | 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

**GetChannelContents200Response**

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

# **getInterestEvents**
> GetAccountEvents200Response getInterestEvents()

Returns a paginated, searchable list of non-template events associated with the given interest, and requires the \"read\" permission on both interests and events.

### Example

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

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

let interestId: string; //The interest identifier (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.getInterestEvents(
    interestId,
    page,
    pageSize,
    orderBy,
    search
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **interestId** | [**string**] | The interest identifier | 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

**GetAccountEvents200Response**

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

# **getInterestGroups**
> GetGroups200Response getInterestGroups()

Returns a paginated, searchable list of groups associated with the given interest, filterable by name or ID, and requires the \"read\" permission on both interests and groups.

### Example

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

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

let interestId: string; //The interest identifier (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.getInterestGroups(
    interestId,
    page,
    pageSize,
    orderBy,
    search
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **interestId** | [**string**] | The interest identifier | 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

**GetGroups200Response**

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

# **getInterests**
> GetAccountInterests200Response getInterests()

Returns a paginated, searchable list of interests defined for the organization, filterable by name, and requires the \"read\" permission on interests.

### Example

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

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

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.getInterests(
    page,
    pageSize,
    orderBy,
    search
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **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

**GetAccountInterests200Response**

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

# **updateInterest**
> CreateInterest200Response updateInterest(interestUpdateInputs)

Updates the details of an existing interest identified by interestId and requires the \"update\" permission on interests.

### Example

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

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

let interestId: string; //The interest identifier (default to undefined)
let interestUpdateInputs: InterestUpdateInputs; //

const { status, data } = await apiInstance.updateInterest(
    interestId,
    interestUpdateInputs
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **interestUpdateInputs** | **InterestUpdateInputs**|  | |
| **interestId** | [**string**] | The interest identifier | defaults to undefined|


### Return type

**CreateInterest200Response**

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

