# GroupsApi

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

|Method | HTTP request | Description|
|------------- | ------------- | -------------|
|[**createGroup**](#creategroup) | **POST** /groups | Create a group|
|[**deleteGroup**](#deletegroup) | **DELETE** /groups/{groupId} | Delete a group|
|[**getGroup**](#getgroup) | **GET** /groups/{groupId} | Get a single group|
|[**getGroupActivities**](#getgroupactivities) | **GET** /groups/{groupId}/activities | List a group\&#39;s activity feed|
|[**getGroups**](#getgroups) | **GET** /groups | List groups in the organization|
|[**updateGroup**](#updategroup) | **PUT** /groups/{groupId} | Update a group|

# **createGroup**
> CreateGroup200Response createGroup(groupCreateInputs)

Creates a new group for the organization from the supplied group details and requires the \"create\" permission on groups.

### Example

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

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

let groupCreateInputs: GroupCreateInputs; //

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

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **groupCreateInputs** | **GroupCreateInputs**|  | |


### Return type

**CreateGroup200Response**

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

# **deleteGroup**
> CreateAccountInvitations200Response deleteGroup()

Permanently deletes the specified group from the organization and requires the \"del\" permission on groups.

### Example

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

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

let groupId: string; //The group identifier (default to undefined)

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

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **groupId** | [**string**] | The group 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)

# **getGroup**
> CreateGroup200Response getGroup()

Returns the details of a single group by its ID or slug, including its configuration and metadata; requires read access to groups.

### Example

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

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

let groupId: string; //The group identifier (default to undefined)

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

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **groupId** | [**string**] | The group identifier | defaults to undefined|


### Return type

**CreateGroup200Response**

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

# **getGroupActivities**
> GetAccountActivities200Response getGroupActivities()

Returns a paginated list of activity posts belonging to the given group, filterable by moderation status and whether the activity is featured, and searchable by message text; requires read access to groups and activities.

### Example

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

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

let groupId: string; //The group identifier (default to undefined)
let featured: object; //Filter by featured (optional) (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.getGroupActivities(
    groupId,
    featured,
    status,
    page,
    pageSize,
    orderBy,
    search
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **groupId** | [**string**] | The group identifier | defaults to undefined|
| **featured** | **object** | Filter by featured | (optional) 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)

# **getGroups**
> GetGroups200Response getGroups()

Returns a paginated list of groups for the organization, filterable by access level (public or private) and whether the group is featured, with optional search and ordering; requires read access to groups.

### Example

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

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

let access: 'public' | 'private'; //Filter by access (optional) (default to undefined)
let featured: boolean; //Filter by featured (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.getGroups(
    access,
    featured,
    page,
    pageSize,
    orderBy,
    search
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **access** | [**&#39;public&#39; | &#39;private&#39;**]**Array<&#39;public&#39; &#124; &#39;private&#39;>** | Filter by access | (optional) defaults to undefined|
| **featured** | [**boolean**] | Filter by featured | (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

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

# **updateGroup**
> CreateGroup200Response updateGroup(groupUpdateInputs)

Updates the details of an existing group identified by groupId and requires the \"update\" permission on groups.

### Example

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

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

let groupId: string; //The group identifier (default to undefined)
let groupUpdateInputs: GroupUpdateInputs; //

const { status, data } = await apiInstance.updateGroup(
    groupId,
    groupUpdateInputs
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **groupUpdateInputs** | **GroupUpdateInputs**|  | |
| **groupId** | [**string**] | The group identifier | defaults to undefined|


### Return type

**CreateGroup200Response**

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

