# GroupsSponsorsApi

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

|Method | HTTP request | Description|
|------------- | ------------- | -------------|
|[**addGroupSponsor**](#addgroupsponsor) | **POST** /groups/{groupId}/sponsors/{accountId} | Add a sponsor account to a group|
|[**getGroupSponsors**](#getgroupsponsors) | **GET** /groups/{groupId}/sponsors | List a group\&#39;s sponsor accounts|
|[**removeGroupSponsor**](#removegroupsponsor) | **DELETE** /groups/{groupId}/sponsors/{accountId} | Remove a sponsor account from a group|

# **addGroupSponsor**
> CreateGroup200Response addGroupSponsor()

Connects the specified account as a sponsor of the given group; requires read and update permissions on both groups and accounts.

### Example

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

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

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

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

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **groupId** | [**string**] | The group identifier | defaults to undefined|
| **accountId** | [**string**] | The account 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)

# **getGroupSponsors**
> GetAccounts200Response getGroupSponsors()

Returns a paginated list of accounts sponsoring the given group, searchable by account name, email, or ID; requires read access to groups and accounts.

### Example

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

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

let groupId: string; //The group 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.getGroupSponsors(
    groupId,
    page,
    pageSize,
    orderBy,
    search
);
```

### Parameters

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

# **removeGroupSponsor**
> CreateGroup200Response removeGroupSponsor()

Disconnects the specified account as a sponsor of the given group; requires read and update permissions on both groups and accounts.

### Example

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

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

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

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

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **groupId** | [**string**] | The group identifier | defaults to undefined|
| **accountId** | [**string**] | The account 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)

