# GroupsRequestsApi

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

|Method | HTTP request | Description|
|------------- | ------------- | -------------|
|[**acceptGroupRequest**](#acceptgrouprequest) | **PUT** /groups/{groupId}/requests/{requestId}/accept | Accept a group join request|
|[**deleteGroupRequest**](#deletegrouprequest) | **DELETE** /groups/{groupId}/requests/{requestId} | Delete a group join request|
|[**getGroupRequest**](#getgrouprequest) | **GET** /groups/{groupId}/requests/{requestId} | Get a single group join request|
|[**getGroupRequests**](#getgrouprequests) | **GET** /groups/{groupId}/requests | List a group\&#39;s join requests|
|[**rejectGroupRequest**](#rejectgrouprequest) | **PUT** /groups/{groupId}/requests/{requestId}/reject | Reject a group join request|

# **acceptGroupRequest**
> GetGroupRequest200Response acceptGroupRequest()

Accepts the specified pending join request for the given group, deleting the request and any related invitation, and creating a membership for the requesting account; requires read and update permissions on groups.

### Example

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

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

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

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

### Parameters

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


### Return type

**GetGroupRequest200Response**

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

# **deleteGroupRequest**
> CreateAccountInvitations200Response deleteGroupRequest()

Permanently deletes the specified join request for the given group, regardless of its status; requires read and update permissions on groups.

### Example

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

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

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

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

### Parameters

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

# **getGroupRequest**
> GetGroupRequest200Response getGroupRequest()

Returns the details of a single request to join the given group by its request ID, including its status (pending, accepted, or rejected); requires \"read\" permission on groups.

### Example

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

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

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

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

### Parameters

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


### Return type

**GetGroupRequest200Response**

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

# **getGroupRequests**
> GetGroupRequests200Response getGroupRequests()

Returns a paginated list of join requests for the given group, filterable by request status (e.g. requested, accepted, rejected) and searchable by requester name or username; requires read access to groups.

### Example

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

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

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

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **groupId** | [**string**] | The group identifier | defaults to undefined|
| **status** | **GroupRequestStatus** | Filter by status | 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

**GetGroupRequests200Response**

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

# **rejectGroupRequest**
> GetGroupRequest200Response rejectGroupRequest()

Marks the specified pending join request for the given group as rejected without deleting it or creating a membership; requires read and update permissions on groups.

### Example

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

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

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

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

### Parameters

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


### Return type

**GetGroupRequest200Response**

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

