# SurveysSessionsApi

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

|Method | HTTP request | Description|
|------------- | ------------- | -------------|
|[**addSurveySession**](#addsurveysession) | **POST** /surveys/{surveyId}/sessions/{sessionId} | Attach a session to a survey|
|[**removeSurveySession**](#removesurveysession) | **DELETE** /surveys/{surveyId}/sessions/{sessionId} | Detach a session from a survey|

# **addSurveySession**
> CreateSurvey200Response addSurveySession()

Associates an event session with a survey so the survey can be restricted to (or offered during) that session; the survey must already be linked to an event, and this requires the update surveys permission.

### Example

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

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

let surveyId: string; //The survey identifier (default to undefined)
let sessionId: string; //The session identifier (default to undefined)

const { status, data } = await apiInstance.addSurveySession(
    surveyId,
    sessionId
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **surveyId** | [**string**] | The survey identifier | defaults to undefined|
| **sessionId** | [**string**] | The session identifier | defaults to undefined|


### Return type

**CreateSurvey200Response**

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

# **removeSurveySession**
> CreateSurvey200Response removeSurveySession()

Removes the association between an event session and a survey, so the survey is no longer restricted to (or offered during) that session; requires the update surveys permission.

### Example

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

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

let surveyId: string; //The survey identifier (default to undefined)
let sessionId: string; //The session identifier (default to undefined)

const { status, data } = await apiInstance.removeSurveySession(
    surveyId,
    sessionId
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **surveyId** | [**string**] | The survey identifier | defaults to undefined|
| **sessionId** | [**string**] | The session identifier | defaults to undefined|


### Return type

**CreateSurvey200Response**

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

