# SurveysSectionsApi

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

|Method | HTTP request | Description|
|------------- | ------------- | -------------|
|[**addSurveySectionQuestion**](#addsurveysectionquestion) | **POST** /surveys/{surveyId}/sections/{sectionId}/questions/{questionId} | Add a question to a survey section|
|[**createSurveySection**](#createsurveysection) | **POST** /surveys/{surveyId}/sections | Create a survey section|
|[**deleteSurveySection**](#deletesurveysection) | **DELETE** /surveys/{surveyId}/sections/{sectionId} | Delete a survey section|
|[**getSurveySection**](#getsurveysection) | **GET** /surveys/{surveyId}/sections/{sectionId} | Get a survey section|
|[**getSurveySectionQuestions**](#getsurveysectionquestions) | **GET** /surveys/{surveyId}/sections/{sectionId}/questions | List a survey section\&#39;s questions|
|[**getSurveySections**](#getsurveysections) | **GET** /surveys/{surveyId}/sections | List a survey\&#39;s sections|
|[**removeSurveySectionQuestion**](#removesurveysectionquestion) | **DELETE** /surveys/{surveyId}/sections/{sectionId}/questions/{questionId} | Remove a question from a survey section|
|[**reorderSurveySectionQuestions**](#reordersurveysectionquestions) | **PUT** /surveys/{surveyId}/sections/{sectionId}/questions/reorder | Reorder a survey section\&#39;s questions|
|[**updateSurveySection**](#updatesurveysection) | **PUT** /surveys/{surveyId}/sections/{sectionId} | Update a survey section|
|[**updateSurveySectionQuestion**](#updatesurveysectionquestion) | **PUT** /surveys/{surveyId}/sections/{sectionId}/questions/{questionId} | Reorder a question within a survey section|

# **addSurveySectionQuestion**
> CreateSurveySection200Response addSurveySectionQuestion()

Links an existing survey question to a section, appending it to the end of that section\'s question order; requires the update surveys permission.

### Example

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

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

let surveyId: string; //The survey identifier (default to undefined)
let sectionId: string; //The section identifier (default to undefined)
let questionId: string; //The question identifier (default to undefined)

const { status, data } = await apiInstance.addSurveySectionQuestion(
    surveyId,
    sectionId,
    questionId
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **surveyId** | [**string**] | The survey identifier | defaults to undefined|
| **sectionId** | [**string**] | The section identifier | defaults to undefined|
| **questionId** | [**string**] | The question identifier | defaults to undefined|


### Return type

**CreateSurveySection200Response**

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

# **createSurveySection**
> CreateSurveySection200Response createSurveySection(surveySectionCreateInputs)

Creates a new section on the given survey, inserting it at the requested sortOrder position (or at the end if omitted) and shifting the other sections accordingly; requires the update surveys permission.

### Example

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

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

let surveyId: string; //The survey identifier (default to undefined)
let surveySectionCreateInputs: SurveySectionCreateInputs; //

const { status, data } = await apiInstance.createSurveySection(
    surveyId,
    surveySectionCreateInputs
);
```

### Parameters

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


### Return type

**CreateSurveySection200Response**

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

# **deleteSurveySection**
> CreateAccountInvitations200Response deleteSurveySection()

Permanently removes a section from the given survey and re-sorts the remaining sections to close the resulting gap; requires the update surveys permission.

### Example

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

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

let surveyId: string; //The survey identifier (default to undefined)
let sectionId: string; //The section identifier (default to undefined)

const { status, data } = await apiInstance.deleteSurveySection(
    surveyId,
    sectionId
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **surveyId** | [**string**] | The survey identifier | defaults to undefined|
| **sectionId** | [**string**] | The section 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)

# **getSurveySection**
> CreateSurveySection200Response getSurveySection()

Returns the details of a single section within a survey, identified by survey and section ID; requires read access to the surveys module.

### Example

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

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

let surveyId: string; //The survey identifier (default to undefined)
let sectionId: string; //The section identifier (default to undefined)

const { status, data } = await apiInstance.getSurveySection(
    surveyId,
    sectionId
);
```

### Parameters

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


### Return type

**CreateSurveySection200Response**

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

# **getSurveySectionQuestions**
> GetSurveySectionQuestions200Response getSurveySectionQuestions()

Returns a paginated list of questions assigned to a specific section of a survey, with optional search and ordering, requiring read permission on surveys.

### Example

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

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

let surveyId: string; //The survey identifier (default to undefined)
let sectionId: string; //The section 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.getSurveySectionQuestions(
    surveyId,
    sectionId,
    page,
    pageSize,
    orderBy,
    search
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **surveyId** | [**string**] | The survey identifier | defaults to undefined|
| **sectionId** | [**string**] | The section 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

**GetSurveySectionQuestions200Response**

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

# **getSurveySections**
> GetSurveySections200Response getSurveySections()

Returns a paginated list of the sections defined on a survey, ordered by their sort order, with optional search, requiring read permission on surveys.

### Example

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

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

let surveyId: string; //The survey 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.getSurveySections(
    surveyId,
    page,
    pageSize,
    orderBy,
    search
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **surveyId** | [**string**] | The survey 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

**GetSurveySections200Response**

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

# **removeSurveySectionQuestion**
> CreateSurveySection200Response removeSurveySectionQuestion()

Unlinks a question from a survey section without deleting the question itself, removing it from that section\'s ordered question list; requires the update surveys permission.

### Example

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

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

let surveyId: string; //The survey identifier (default to undefined)
let sectionId: string; //The section identifier (default to undefined)
let questionId: string; //The question identifier (default to undefined)

const { status, data } = await apiInstance.removeSurveySectionQuestion(
    surveyId,
    sectionId,
    questionId
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **surveyId** | [**string**] | The survey identifier | defaults to undefined|
| **sectionId** | [**string**] | The section identifier | defaults to undefined|
| **questionId** | [**string**] | The question identifier | defaults to undefined|


### Return type

**CreateSurveySection200Response**

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

# **reorderSurveySectionQuestions**
> ReorderSurveySectionQuestions200Response reorderSurveySectionQuestions(reorderEventFaqSectionQuestionsRequest)

Sets the sort order of all questions within a survey section by applying the given full, complete ordered list of question IDs; requires the update surveys permission.

### Example

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

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

let surveyId: string; //The survey identifier (default to undefined)
let sectionId: string; //The section identifier (default to undefined)
let reorderEventFaqSectionQuestionsRequest: ReorderEventFaqSectionQuestionsRequest; //

const { status, data } = await apiInstance.reorderSurveySectionQuestions(
    surveyId,
    sectionId,
    reorderEventFaqSectionQuestionsRequest
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **reorderEventFaqSectionQuestionsRequest** | **ReorderEventFaqSectionQuestionsRequest**|  | |
| **surveyId** | [**string**] | The survey identifier | defaults to undefined|
| **sectionId** | [**string**] | The section identifier | defaults to undefined|


### Return type

**ReorderSurveySectionQuestions200Response**

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

# **updateSurveySection**
> CreateSurveySection200Response updateSurveySection(surveySectionUpdateInputs)

Updates a section of a survey, such as its title, description, or sort order (reordering it relative to the survey\'s other sections); requires the update surveys permission.

### Example

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

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

let surveyId: string; //The survey identifier (default to undefined)
let sectionId: string; //The section identifier (default to undefined)
let surveySectionUpdateInputs: SurveySectionUpdateInputs; //

const { status, data } = await apiInstance.updateSurveySection(
    surveyId,
    sectionId,
    surveySectionUpdateInputs
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **surveySectionUpdateInputs** | **SurveySectionUpdateInputs**|  | |
| **surveyId** | [**string**] | The survey identifier | defaults to undefined|
| **sectionId** | [**string**] | The section identifier | defaults to undefined|


### Return type

**CreateSurveySection200Response**

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

# **updateSurveySectionQuestion**
> CreateSurveySection200Response updateSurveySectionQuestion(updateEventFollowupQuestionRequest)

Updates the sort order of a question inside a survey section, shifting the other questions in that section to accommodate the new position; requires the update surveys permission.

### Example

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

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

let surveyId: string; //The survey identifier (default to undefined)
let sectionId: string; //The section identifier (default to undefined)
let questionId: string; //The question identifier (default to undefined)
let updateEventFollowupQuestionRequest: UpdateEventFollowupQuestionRequest; //

const { status, data } = await apiInstance.updateSurveySectionQuestion(
    surveyId,
    sectionId,
    questionId,
    updateEventFollowupQuestionRequest
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **updateEventFollowupQuestionRequest** | **UpdateEventFollowupQuestionRequest**|  | |
| **surveyId** | [**string**] | The survey identifier | defaults to undefined|
| **sectionId** | [**string**] | The section identifier | defaults to undefined|
| **questionId** | [**string**] | The question identifier | defaults to undefined|


### Return type

**CreateSurveySection200Response**

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

