> For the complete documentation index, see [llms.txt](https://api-docs.myhappyforce.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://api-docs.myhappyforce.com/docs/api-reference/survey-resource.md).

# Survey Resource

## GET /api/v1/company/surveys/{surveyId}

>

```json
{"openapi":"3.1.0","info":{"title":"Happyforce API","version":"v1"},"tags":[],"servers":[{"url":"{url}","description":"API URL","variables":{"url":{"description":"API Environment","enum":["https://api.happyforce.com","https://staging.happyforce.com","http://localhost:9000"],"default":"https://api.happyforce.com"}}}],"security":[{"companyAPISessionId":[]}],"components":{"securitySchemes":{"companyAPISessionId":{"type":"apiKey","description":"SessionId","name":"SessionId","in":"header"}},"schemas":{"SurveyDTO":{"type":"object","description":"The details of the survey to be created","properties":{"id":{"type":"string"},"companyId":{"type":"string"},"createdOn":{"type":"string","format":"date-time"},"createdBy":{"type":"string"},"updatedBy":{"type":"string"},"updatedOn":{"type":"string","format":"date-time"},"managerAccessEnabled":{"type":"boolean"},"allowedViewerIds":{"type":"array","description":"Per-survey viewer allow-list: ids of the managers allowed to view this survey's results. Null/empty means every manager of the targeted area may view the results; when populated, only these managers (plus admins/advisors and the creator) may. Serialized as an array of person id strings.","items":{"type":"string"},"uniqueItems":true},"notAnonymous":{"type":"boolean"},"canUpdate":{"type":"boolean"},"canViewResults":{"type":"boolean"},"title":{"$ref":"#/components/schemas/MultiLanguage"},"description":{"$ref":"#/components/schemas/MultiLanguage"},"schedulePlan":{"$ref":"#/components/schemas/SurveySchedulePlanDTO"},"rounds":{"type":"array","items":{"$ref":"#/components/schemas/SurveyRoundDTO"}},"blocks":{"type":"array","items":{"$ref":"#/components/schemas/SurveyBlockDTOAbstractSurveyQuestion"},"minItems":1},"status":{"$ref":"#/components/schemas/SurveyStatus"},"hasReports":{"type":"boolean"}},"required":["blocks","title"]},"MultiLanguage":{"type":"object","description":"A translatable text value: a required default value plus optional per-language overrides keyed by language tag (e.g. \"es\", \"en\", \"pt-BR\"). Consumers resolve the user's language from langValues (falling back to the base language, then to defaultValue).","properties":{"defaultValue":{"type":"string","description":"Fallback text used when there is no entry in langValues for the requested language.","minLength":1},"langValues":{"type":"object","additionalProperties":{"type":"string"},"description":"Per-language overrides keyed by language tag (e.g. \"es\", \"en\", \"pt-BR\")."},"valid":{"type":"boolean"}},"required":["defaultValue"]},"SurveySchedulePlanDTO":{"type":"object","description":"The details of the schedule to be updated","properties":{"roundTitle":{"$ref":"#/components/schemas/MultiLanguage"},"appSurvey":{"type":"boolean"},"mailSurvey":{"type":"boolean"},"communicationTitle":{"$ref":"#/components/schemas/MultiLanguage"},"communicationDescription":{"$ref":"#/components/schemas/MultiLanguage"},"activationRule":{"$ref":"#/components/schemas/ActivationRule"},"hierarchyIds":{"type":"array","items":{"type":"string"},"uniqueItems":true},"characteristics":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/EmployeeCharacteristicValueBoolean"},{"$ref":"#/components/schemas/EmployeeCharacteristicValueDate"},{"$ref":"#/components/schemas/EmployeeCharacteristicValueList"},{"$ref":"#/components/schemas/EmployeeCharacteristicValueTree"}]},"uniqueItems":true},"groupIds":{"type":"array","items":{"type":"string"},"uniqueItems":true},"paused":{"type":"boolean"},"archived":{"type":"boolean"},"mandatory":{"type":"boolean"},"status":{"$ref":"#/components/schemas/SurveyStatus"}},"required":["activationRule"]},"ActivationRule":{"type":"object","description":"Base class for all activation rule types","discriminator":{"propertyName":"ruleType","mapping":{"CALENDAR":"#/components/schemas/ActivationCalendarRule","RECURRENT":"#/components/schemas/ActivationRecurrentRule","SINGLE":"#/components/schemas/ActivationSingleRule","CONTINUOUS":"#/components/schemas/ContinuousActivationRule"}},"oneOf":[{"$ref":"#/components/schemas/ActivationCalendarRule"},{"$ref":"#/components/schemas/ActivationRecurrentRule"},{"$ref":"#/components/schemas/ActivationSingleRule"},{"$ref":"#/components/schemas/ContinuousActivationRule"}],"properties":{"ruleType":{"$ref":"#/components/schemas/ActivationRuleType"}},"required":["ruleType"]},"ActivationCalendarRule":{"type":"object","allOf":[{"$ref":"#/components/schemas/ActivationRule"},{"type":"object","properties":{"ruleExpression":{"type":"string","minLength":1},"startAt":{"type":"string","format":"date-time"},"endAt":{"type":"string","format":"date-time"},"duration":{"type":"integer","format":"int32","minimum":1}}}],"description":"ActivationCalendarRule","required":["ruleExpression","ruleType","startAt"]},"ActivationRecurrentRule":{"type":"object","allOf":[{"$ref":"#/components/schemas/ActivationRule"},{"type":"object","properties":{"cronExpression":{"type":"string","minLength":1},"startAt":{"type":"string","format":"date-time"},"endAt":{"type":"string","format":"date-time"},"duration":{"type":"integer","format":"int32","minimum":1}}}],"description":"ActivationRecurrentRule","required":["cronExpression","ruleType","startAt"]},"ActivationSingleRule":{"type":"object","allOf":[{"$ref":"#/components/schemas/ActivationRule"},{"type":"object","properties":{"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"}}}],"description":"ActivationSingleRule","required":["ruleType"]},"ContinuousActivationRule":{"type":"object","allOf":[{"$ref":"#/components/schemas/ActivationRule"}],"description":"ContinuousActivationRule","required":["ruleType"]},"ActivationRuleType":{"type":"string","description":"Type of activation rule for a survey or questionnaire","enum":["SINGLE","RECURRENT","CALENDAR","CONTINUOUS"]},"EmployeeCharacteristicValueBoolean":{"allOf":[{"$ref":"#/components/schemas/EmployeeCharacteristicValueBase"},{"type":"object","properties":{"value":{"type":"boolean"}}}]},"EmployeeCharacteristicValueBase":{"type":"object","description":"Base class for employee characteristic values","discriminator":{"propertyName":"questionType","mapping":{"LIST":"#/components/schemas/EmployeeCharacteristicValueList","DATE":"#/components/schemas/EmployeeCharacteristicValueDate","BOOLEAN":"#/components/schemas/EmployeeCharacteristicValueBoolean","TREE":"#/components/schemas/EmployeeCharacteristicValueTree"}},"properties":{"characteristicId":{"type":"string"},"id":{"type":"string"},"questionType":{"$ref":"#/components/schemas/CharacteristicType"}}},"CharacteristicType":{"type":"string","description":"Type of segmentation characteristic","enum":["DATE","LIST","BOOLEAN","TREE"]},"EmployeeCharacteristicValueDate":{"allOf":[{"$ref":"#/components/schemas/EmployeeCharacteristicValueBase"},{"type":"object","properties":{"date":{"type":"string","format":"date-time"},"value":{"type":"string"}}}]},"EmployeeCharacteristicValueList":{"allOf":[{"$ref":"#/components/schemas/EmployeeCharacteristicValueBase"},{"type":"object","properties":{"value":{"type":"string"}}}]},"EmployeeCharacteristicValueTree":{"allOf":[{"$ref":"#/components/schemas/EmployeeCharacteristicValueBase"},{"type":"object","properties":{"value":{"type":"string"},"assignedPath":{"type":"array","items":{"type":"string"}},"assignedOn":{"type":"string","format":"date-time"}}}]},"SurveyStatus":{"type":"string","description":"Status of a survey or questionnaire","enum":["PAUSED","EXPIRED","FUTURE","NOW","ARCHIVED","DRAFT"]},"SurveyRoundDTO":{"type":"object","description":"Survey Round Data Transfer Object","properties":{"id":{"type":"string"},"title":{"$ref":"#/components/schemas/MultiLanguage"},"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"}}},"SurveyBlockDTOAbstractSurveyQuestion":{"type":"object","description":"A survey block containing a list of questions","properties":{"blockId":{"type":"string"},"title":{"$ref":"#/components/schemas/MultiLanguage"},"description":{"$ref":"#/components/schemas/MultiLanguage"},"questions":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/OpenSurveyQuestion"},{"$ref":"#/components/schemas/OptionsSurveyQuestion"},{"$ref":"#/components/schemas/ScaleSurveyQuestion"}]}}}},"OpenSurveyQuestion":{"allOf":[{"$ref":"#/components/schemas/AbstractSurveyQuestion"},{"type":"object","properties":{"requireNotEmpty":{"type":"boolean"}}}],"required":["questionType","representation","title","voteMode"]},"AbstractSurveyQuestion":{"type":"object","description":"Base class for survey questions","discriminator":{"propertyName":"questionType","mapping":{"OPEN":"#/components/schemas/OpenSurveyQuestion","TOPIC":"#/components/schemas/OptionsSurveyQuestion","RANGE":"#/components/schemas/ScaleSurveyQuestion"}},"properties":{"id":{"type":"string"},"title":{"$ref":"#/components/schemas/MultiLanguage"},"questionType":{"$ref":"#/components/schemas/QuestionType"},"order":{"type":"integer","format":"int32"},"visible":{"type":"boolean"},"computeInBlock":{"type":"boolean"},"feedbackEnabled":{"type":"boolean"},"mandatory":{"type":"boolean","deprecated":true},"voteMode":{"$ref":"#/components/schemas/QuestionVoteMode"},"representation":{"type":"string","enum":["IMAGES","OPTIONS","MULTIPLE_OPTIONS","FEEDBACK","SCALE","GRADIENT_SLIDE"]},"values":{"type":"array","items":{"$ref":"#/components/schemas/QuestionValue"},"uniqueItems":true}},"required":["questionType","representation","title","voteMode"]},"QuestionType":{"type":"string","description":"Type of question used in company surveys or questionnaires","enum":["GENERAL","TOPIC","OPEN","RANGE"]},"QuestionVoteMode":{"type":"string","description":"Modes of question voting in a survey or feedback form. Defines whether a question is mandatory, optional, or deferred.","enum":["MANDATORY","OPTIONAL","DEFERRED"]},"QuestionValue":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"score":{"type":"integer","format":"int32"},"label":{"$ref":"#/components/schemas/MultiLanguage"},"imageUrl":{"type":"string"},"color":{"type":"string"}},"required":["id","label","score"]},"OptionsSurveyQuestion":{"allOf":[{"$ref":"#/components/schemas/AbstractSurveyQuestion"},{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/QuestionValue"},"maxItems":2147483647,"minItems":2,"uniqueItems":true},"minSelection":{"type":"integer","format":"int32"},"maxSelection":{"type":"integer","format":"int32"},"multipleChoice":{"type":"boolean"},"minValue":{"$ref":"#/components/schemas/QuestionValue"},"maxValue":{"$ref":"#/components/schemas/QuestionValue"}}}],"required":["questionType","representation","title","voteMode"]},"ScaleSurveyQuestion":{"allOf":[{"$ref":"#/components/schemas/AbstractSurveyQuestion"},{"type":"object","properties":{"firstValue":{"$ref":"#/components/schemas/QuestionValue"},"lastValue":{"$ref":"#/components/schemas/QuestionValue"},"inverted":{"type":"boolean"}}}],"required":["firstValue","lastValue","questionType","representation","title","voteMode"]}}},"paths":{"/api/v1/company/surveys/{surveyId}":{"get":{"tags":["survey-resource"],"operationId":"getSurvey","parameters":[{"name":"surveyId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SurveyDTO"}}}}}}}}}
```

## PUT /api/v1/company/surveys/{surveyId}

>

```json
{"openapi":"3.1.0","info":{"title":"Happyforce API","version":"v1"},"tags":[],"servers":[{"url":"{url}","description":"API URL","variables":{"url":{"description":"API Environment","enum":["https://api.happyforce.com","https://staging.happyforce.com","http://localhost:9000"],"default":"https://api.happyforce.com"}}}],"security":[{"companyAPISessionId":[]}],"components":{"securitySchemes":{"companyAPISessionId":{"type":"apiKey","description":"SessionId","name":"SessionId","in":"header"}},"schemas":{"SurveyDTO":{"type":"object","description":"The details of the survey to be created","properties":{"id":{"type":"string"},"companyId":{"type":"string"},"createdOn":{"type":"string","format":"date-time"},"createdBy":{"type":"string"},"updatedBy":{"type":"string"},"updatedOn":{"type":"string","format":"date-time"},"managerAccessEnabled":{"type":"boolean"},"allowedViewerIds":{"type":"array","description":"Per-survey viewer allow-list: ids of the managers allowed to view this survey's results. Null/empty means every manager of the targeted area may view the results; when populated, only these managers (plus admins/advisors and the creator) may. Serialized as an array of person id strings.","items":{"type":"string"},"uniqueItems":true},"notAnonymous":{"type":"boolean"},"canUpdate":{"type":"boolean"},"canViewResults":{"type":"boolean"},"title":{"$ref":"#/components/schemas/MultiLanguage"},"description":{"$ref":"#/components/schemas/MultiLanguage"},"schedulePlan":{"$ref":"#/components/schemas/SurveySchedulePlanDTO"},"rounds":{"type":"array","items":{"$ref":"#/components/schemas/SurveyRoundDTO"}},"blocks":{"type":"array","items":{"$ref":"#/components/schemas/SurveyBlockDTOAbstractSurveyQuestion"},"minItems":1},"status":{"$ref":"#/components/schemas/SurveyStatus"},"hasReports":{"type":"boolean"}},"required":["blocks","title"]},"MultiLanguage":{"type":"object","description":"A translatable text value: a required default value plus optional per-language overrides keyed by language tag (e.g. \"es\", \"en\", \"pt-BR\"). Consumers resolve the user's language from langValues (falling back to the base language, then to defaultValue).","properties":{"defaultValue":{"type":"string","description":"Fallback text used when there is no entry in langValues for the requested language.","minLength":1},"langValues":{"type":"object","additionalProperties":{"type":"string"},"description":"Per-language overrides keyed by language tag (e.g. \"es\", \"en\", \"pt-BR\")."},"valid":{"type":"boolean"}},"required":["defaultValue"]},"SurveySchedulePlanDTO":{"type":"object","description":"The details of the schedule to be updated","properties":{"roundTitle":{"$ref":"#/components/schemas/MultiLanguage"},"appSurvey":{"type":"boolean"},"mailSurvey":{"type":"boolean"},"communicationTitle":{"$ref":"#/components/schemas/MultiLanguage"},"communicationDescription":{"$ref":"#/components/schemas/MultiLanguage"},"activationRule":{"$ref":"#/components/schemas/ActivationRule"},"hierarchyIds":{"type":"array","items":{"type":"string"},"uniqueItems":true},"characteristics":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/EmployeeCharacteristicValueBoolean"},{"$ref":"#/components/schemas/EmployeeCharacteristicValueDate"},{"$ref":"#/components/schemas/EmployeeCharacteristicValueList"},{"$ref":"#/components/schemas/EmployeeCharacteristicValueTree"}]},"uniqueItems":true},"groupIds":{"type":"array","items":{"type":"string"},"uniqueItems":true},"paused":{"type":"boolean"},"archived":{"type":"boolean"},"mandatory":{"type":"boolean"},"status":{"$ref":"#/components/schemas/SurveyStatus"}},"required":["activationRule"]},"ActivationRule":{"type":"object","description":"Base class for all activation rule types","discriminator":{"propertyName":"ruleType","mapping":{"CALENDAR":"#/components/schemas/ActivationCalendarRule","RECURRENT":"#/components/schemas/ActivationRecurrentRule","SINGLE":"#/components/schemas/ActivationSingleRule","CONTINUOUS":"#/components/schemas/ContinuousActivationRule"}},"oneOf":[{"$ref":"#/components/schemas/ActivationCalendarRule"},{"$ref":"#/components/schemas/ActivationRecurrentRule"},{"$ref":"#/components/schemas/ActivationSingleRule"},{"$ref":"#/components/schemas/ContinuousActivationRule"}],"properties":{"ruleType":{"$ref":"#/components/schemas/ActivationRuleType"}},"required":["ruleType"]},"ActivationCalendarRule":{"type":"object","allOf":[{"$ref":"#/components/schemas/ActivationRule"},{"type":"object","properties":{"ruleExpression":{"type":"string","minLength":1},"startAt":{"type":"string","format":"date-time"},"endAt":{"type":"string","format":"date-time"},"duration":{"type":"integer","format":"int32","minimum":1}}}],"description":"ActivationCalendarRule","required":["ruleExpression","ruleType","startAt"]},"ActivationRecurrentRule":{"type":"object","allOf":[{"$ref":"#/components/schemas/ActivationRule"},{"type":"object","properties":{"cronExpression":{"type":"string","minLength":1},"startAt":{"type":"string","format":"date-time"},"endAt":{"type":"string","format":"date-time"},"duration":{"type":"integer","format":"int32","minimum":1}}}],"description":"ActivationRecurrentRule","required":["cronExpression","ruleType","startAt"]},"ActivationSingleRule":{"type":"object","allOf":[{"$ref":"#/components/schemas/ActivationRule"},{"type":"object","properties":{"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"}}}],"description":"ActivationSingleRule","required":["ruleType"]},"ContinuousActivationRule":{"type":"object","allOf":[{"$ref":"#/components/schemas/ActivationRule"}],"description":"ContinuousActivationRule","required":["ruleType"]},"ActivationRuleType":{"type":"string","description":"Type of activation rule for a survey or questionnaire","enum":["SINGLE","RECURRENT","CALENDAR","CONTINUOUS"]},"EmployeeCharacteristicValueBoolean":{"allOf":[{"$ref":"#/components/schemas/EmployeeCharacteristicValueBase"},{"type":"object","properties":{"value":{"type":"boolean"}}}]},"EmployeeCharacteristicValueBase":{"type":"object","description":"Base class for employee characteristic values","discriminator":{"propertyName":"questionType","mapping":{"LIST":"#/components/schemas/EmployeeCharacteristicValueList","DATE":"#/components/schemas/EmployeeCharacteristicValueDate","BOOLEAN":"#/components/schemas/EmployeeCharacteristicValueBoolean","TREE":"#/components/schemas/EmployeeCharacteristicValueTree"}},"properties":{"characteristicId":{"type":"string"},"id":{"type":"string"},"questionType":{"$ref":"#/components/schemas/CharacteristicType"}}},"CharacteristicType":{"type":"string","description":"Type of segmentation characteristic","enum":["DATE","LIST","BOOLEAN","TREE"]},"EmployeeCharacteristicValueDate":{"allOf":[{"$ref":"#/components/schemas/EmployeeCharacteristicValueBase"},{"type":"object","properties":{"date":{"type":"string","format":"date-time"},"value":{"type":"string"}}}]},"EmployeeCharacteristicValueList":{"allOf":[{"$ref":"#/components/schemas/EmployeeCharacteristicValueBase"},{"type":"object","properties":{"value":{"type":"string"}}}]},"EmployeeCharacteristicValueTree":{"allOf":[{"$ref":"#/components/schemas/EmployeeCharacteristicValueBase"},{"type":"object","properties":{"value":{"type":"string"},"assignedPath":{"type":"array","items":{"type":"string"}},"assignedOn":{"type":"string","format":"date-time"}}}]},"SurveyStatus":{"type":"string","description":"Status of a survey or questionnaire","enum":["PAUSED","EXPIRED","FUTURE","NOW","ARCHIVED","DRAFT"]},"SurveyRoundDTO":{"type":"object","description":"Survey Round Data Transfer Object","properties":{"id":{"type":"string"},"title":{"$ref":"#/components/schemas/MultiLanguage"},"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"}}},"SurveyBlockDTOAbstractSurveyQuestion":{"type":"object","description":"A survey block containing a list of questions","properties":{"blockId":{"type":"string"},"title":{"$ref":"#/components/schemas/MultiLanguage"},"description":{"$ref":"#/components/schemas/MultiLanguage"},"questions":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/OpenSurveyQuestion"},{"$ref":"#/components/schemas/OptionsSurveyQuestion"},{"$ref":"#/components/schemas/ScaleSurveyQuestion"}]}}}},"OpenSurveyQuestion":{"allOf":[{"$ref":"#/components/schemas/AbstractSurveyQuestion"},{"type":"object","properties":{"requireNotEmpty":{"type":"boolean"}}}],"required":["questionType","representation","title","voteMode"]},"AbstractSurveyQuestion":{"type":"object","description":"Base class for survey questions","discriminator":{"propertyName":"questionType","mapping":{"OPEN":"#/components/schemas/OpenSurveyQuestion","TOPIC":"#/components/schemas/OptionsSurveyQuestion","RANGE":"#/components/schemas/ScaleSurveyQuestion"}},"properties":{"id":{"type":"string"},"title":{"$ref":"#/components/schemas/MultiLanguage"},"questionType":{"$ref":"#/components/schemas/QuestionType"},"order":{"type":"integer","format":"int32"},"visible":{"type":"boolean"},"computeInBlock":{"type":"boolean"},"feedbackEnabled":{"type":"boolean"},"mandatory":{"type":"boolean","deprecated":true},"voteMode":{"$ref":"#/components/schemas/QuestionVoteMode"},"representation":{"type":"string","enum":["IMAGES","OPTIONS","MULTIPLE_OPTIONS","FEEDBACK","SCALE","GRADIENT_SLIDE"]},"values":{"type":"array","items":{"$ref":"#/components/schemas/QuestionValue"},"uniqueItems":true}},"required":["questionType","representation","title","voteMode"]},"QuestionType":{"type":"string","description":"Type of question used in company surveys or questionnaires","enum":["GENERAL","TOPIC","OPEN","RANGE"]},"QuestionVoteMode":{"type":"string","description":"Modes of question voting in a survey or feedback form. Defines whether a question is mandatory, optional, or deferred.","enum":["MANDATORY","OPTIONAL","DEFERRED"]},"QuestionValue":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"score":{"type":"integer","format":"int32"},"label":{"$ref":"#/components/schemas/MultiLanguage"},"imageUrl":{"type":"string"},"color":{"type":"string"}},"required":["id","label","score"]},"OptionsSurveyQuestion":{"allOf":[{"$ref":"#/components/schemas/AbstractSurveyQuestion"},{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/QuestionValue"},"maxItems":2147483647,"minItems":2,"uniqueItems":true},"minSelection":{"type":"integer","format":"int32"},"maxSelection":{"type":"integer","format":"int32"},"multipleChoice":{"type":"boolean"},"minValue":{"$ref":"#/components/schemas/QuestionValue"},"maxValue":{"$ref":"#/components/schemas/QuestionValue"}}}],"required":["questionType","representation","title","voteMode"]},"ScaleSurveyQuestion":{"allOf":[{"$ref":"#/components/schemas/AbstractSurveyQuestion"},{"type":"object","properties":{"firstValue":{"$ref":"#/components/schemas/QuestionValue"},"lastValue":{"$ref":"#/components/schemas/QuestionValue"},"inverted":{"type":"boolean"}}}],"required":["firstValue","lastValue","questionType","representation","title","voteMode"]}}},"paths":{"/api/v1/company/surveys/{surveyId}":{"put":{"tags":["survey-resource"],"operationId":"updateSurveyTemplate","parameters":[{"name":"surveyId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"*/*":{"schema":{"$ref":"#/components/schemas/SurveyDTO"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SurveyDTO"}}}}}}}}}
```

## DELETE /api/v1/company/surveys/{surveyId}

>

```json
{"openapi":"3.1.0","info":{"title":"Happyforce API","version":"v1"},"tags":[],"servers":[{"url":"{url}","description":"API URL","variables":{"url":{"description":"API Environment","enum":["https://api.happyforce.com","https://staging.happyforce.com","http://localhost:9000"],"default":"https://api.happyforce.com"}}}],"security":[{"companyAPISessionId":[]}],"components":{"securitySchemes":{"companyAPISessionId":{"type":"apiKey","description":"SessionId","name":"SessionId","in":"header"}},"schemas":{"SurveyDTO":{"type":"object","description":"The details of the survey to be created","properties":{"id":{"type":"string"},"companyId":{"type":"string"},"createdOn":{"type":"string","format":"date-time"},"createdBy":{"type":"string"},"updatedBy":{"type":"string"},"updatedOn":{"type":"string","format":"date-time"},"managerAccessEnabled":{"type":"boolean"},"allowedViewerIds":{"type":"array","description":"Per-survey viewer allow-list: ids of the managers allowed to view this survey's results. Null/empty means every manager of the targeted area may view the results; when populated, only these managers (plus admins/advisors and the creator) may. Serialized as an array of person id strings.","items":{"type":"string"},"uniqueItems":true},"notAnonymous":{"type":"boolean"},"canUpdate":{"type":"boolean"},"canViewResults":{"type":"boolean"},"title":{"$ref":"#/components/schemas/MultiLanguage"},"description":{"$ref":"#/components/schemas/MultiLanguage"},"schedulePlan":{"$ref":"#/components/schemas/SurveySchedulePlanDTO"},"rounds":{"type":"array","items":{"$ref":"#/components/schemas/SurveyRoundDTO"}},"blocks":{"type":"array","items":{"$ref":"#/components/schemas/SurveyBlockDTOAbstractSurveyQuestion"},"minItems":1},"status":{"$ref":"#/components/schemas/SurveyStatus"},"hasReports":{"type":"boolean"}},"required":["blocks","title"]},"MultiLanguage":{"type":"object","description":"A translatable text value: a required default value plus optional per-language overrides keyed by language tag (e.g. \"es\", \"en\", \"pt-BR\"). Consumers resolve the user's language from langValues (falling back to the base language, then to defaultValue).","properties":{"defaultValue":{"type":"string","description":"Fallback text used when there is no entry in langValues for the requested language.","minLength":1},"langValues":{"type":"object","additionalProperties":{"type":"string"},"description":"Per-language overrides keyed by language tag (e.g. \"es\", \"en\", \"pt-BR\")."},"valid":{"type":"boolean"}},"required":["defaultValue"]},"SurveySchedulePlanDTO":{"type":"object","description":"The details of the schedule to be updated","properties":{"roundTitle":{"$ref":"#/components/schemas/MultiLanguage"},"appSurvey":{"type":"boolean"},"mailSurvey":{"type":"boolean"},"communicationTitle":{"$ref":"#/components/schemas/MultiLanguage"},"communicationDescription":{"$ref":"#/components/schemas/MultiLanguage"},"activationRule":{"$ref":"#/components/schemas/ActivationRule"},"hierarchyIds":{"type":"array","items":{"type":"string"},"uniqueItems":true},"characteristics":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/EmployeeCharacteristicValueBoolean"},{"$ref":"#/components/schemas/EmployeeCharacteristicValueDate"},{"$ref":"#/components/schemas/EmployeeCharacteristicValueList"},{"$ref":"#/components/schemas/EmployeeCharacteristicValueTree"}]},"uniqueItems":true},"groupIds":{"type":"array","items":{"type":"string"},"uniqueItems":true},"paused":{"type":"boolean"},"archived":{"type":"boolean"},"mandatory":{"type":"boolean"},"status":{"$ref":"#/components/schemas/SurveyStatus"}},"required":["activationRule"]},"ActivationRule":{"type":"object","description":"Base class for all activation rule types","discriminator":{"propertyName":"ruleType","mapping":{"CALENDAR":"#/components/schemas/ActivationCalendarRule","RECURRENT":"#/components/schemas/ActivationRecurrentRule","SINGLE":"#/components/schemas/ActivationSingleRule","CONTINUOUS":"#/components/schemas/ContinuousActivationRule"}},"oneOf":[{"$ref":"#/components/schemas/ActivationCalendarRule"},{"$ref":"#/components/schemas/ActivationRecurrentRule"},{"$ref":"#/components/schemas/ActivationSingleRule"},{"$ref":"#/components/schemas/ContinuousActivationRule"}],"properties":{"ruleType":{"$ref":"#/components/schemas/ActivationRuleType"}},"required":["ruleType"]},"ActivationCalendarRule":{"type":"object","allOf":[{"$ref":"#/components/schemas/ActivationRule"},{"type":"object","properties":{"ruleExpression":{"type":"string","minLength":1},"startAt":{"type":"string","format":"date-time"},"endAt":{"type":"string","format":"date-time"},"duration":{"type":"integer","format":"int32","minimum":1}}}],"description":"ActivationCalendarRule","required":["ruleExpression","ruleType","startAt"]},"ActivationRecurrentRule":{"type":"object","allOf":[{"$ref":"#/components/schemas/ActivationRule"},{"type":"object","properties":{"cronExpression":{"type":"string","minLength":1},"startAt":{"type":"string","format":"date-time"},"endAt":{"type":"string","format":"date-time"},"duration":{"type":"integer","format":"int32","minimum":1}}}],"description":"ActivationRecurrentRule","required":["cronExpression","ruleType","startAt"]},"ActivationSingleRule":{"type":"object","allOf":[{"$ref":"#/components/schemas/ActivationRule"},{"type":"object","properties":{"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"}}}],"description":"ActivationSingleRule","required":["ruleType"]},"ContinuousActivationRule":{"type":"object","allOf":[{"$ref":"#/components/schemas/ActivationRule"}],"description":"ContinuousActivationRule","required":["ruleType"]},"ActivationRuleType":{"type":"string","description":"Type of activation rule for a survey or questionnaire","enum":["SINGLE","RECURRENT","CALENDAR","CONTINUOUS"]},"EmployeeCharacteristicValueBoolean":{"allOf":[{"$ref":"#/components/schemas/EmployeeCharacteristicValueBase"},{"type":"object","properties":{"value":{"type":"boolean"}}}]},"EmployeeCharacteristicValueBase":{"type":"object","description":"Base class for employee characteristic values","discriminator":{"propertyName":"questionType","mapping":{"LIST":"#/components/schemas/EmployeeCharacteristicValueList","DATE":"#/components/schemas/EmployeeCharacteristicValueDate","BOOLEAN":"#/components/schemas/EmployeeCharacteristicValueBoolean","TREE":"#/components/schemas/EmployeeCharacteristicValueTree"}},"properties":{"characteristicId":{"type":"string"},"id":{"type":"string"},"questionType":{"$ref":"#/components/schemas/CharacteristicType"}}},"CharacteristicType":{"type":"string","description":"Type of segmentation characteristic","enum":["DATE","LIST","BOOLEAN","TREE"]},"EmployeeCharacteristicValueDate":{"allOf":[{"$ref":"#/components/schemas/EmployeeCharacteristicValueBase"},{"type":"object","properties":{"date":{"type":"string","format":"date-time"},"value":{"type":"string"}}}]},"EmployeeCharacteristicValueList":{"allOf":[{"$ref":"#/components/schemas/EmployeeCharacteristicValueBase"},{"type":"object","properties":{"value":{"type":"string"}}}]},"EmployeeCharacteristicValueTree":{"allOf":[{"$ref":"#/components/schemas/EmployeeCharacteristicValueBase"},{"type":"object","properties":{"value":{"type":"string"},"assignedPath":{"type":"array","items":{"type":"string"}},"assignedOn":{"type":"string","format":"date-time"}}}]},"SurveyStatus":{"type":"string","description":"Status of a survey or questionnaire","enum":["PAUSED","EXPIRED","FUTURE","NOW","ARCHIVED","DRAFT"]},"SurveyRoundDTO":{"type":"object","description":"Survey Round Data Transfer Object","properties":{"id":{"type":"string"},"title":{"$ref":"#/components/schemas/MultiLanguage"},"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"}}},"SurveyBlockDTOAbstractSurveyQuestion":{"type":"object","description":"A survey block containing a list of questions","properties":{"blockId":{"type":"string"},"title":{"$ref":"#/components/schemas/MultiLanguage"},"description":{"$ref":"#/components/schemas/MultiLanguage"},"questions":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/OpenSurveyQuestion"},{"$ref":"#/components/schemas/OptionsSurveyQuestion"},{"$ref":"#/components/schemas/ScaleSurveyQuestion"}]}}}},"OpenSurveyQuestion":{"allOf":[{"$ref":"#/components/schemas/AbstractSurveyQuestion"},{"type":"object","properties":{"requireNotEmpty":{"type":"boolean"}}}],"required":["questionType","representation","title","voteMode"]},"AbstractSurveyQuestion":{"type":"object","description":"Base class for survey questions","discriminator":{"propertyName":"questionType","mapping":{"OPEN":"#/components/schemas/OpenSurveyQuestion","TOPIC":"#/components/schemas/OptionsSurveyQuestion","RANGE":"#/components/schemas/ScaleSurveyQuestion"}},"properties":{"id":{"type":"string"},"title":{"$ref":"#/components/schemas/MultiLanguage"},"questionType":{"$ref":"#/components/schemas/QuestionType"},"order":{"type":"integer","format":"int32"},"visible":{"type":"boolean"},"computeInBlock":{"type":"boolean"},"feedbackEnabled":{"type":"boolean"},"mandatory":{"type":"boolean","deprecated":true},"voteMode":{"$ref":"#/components/schemas/QuestionVoteMode"},"representation":{"type":"string","enum":["IMAGES","OPTIONS","MULTIPLE_OPTIONS","FEEDBACK","SCALE","GRADIENT_SLIDE"]},"values":{"type":"array","items":{"$ref":"#/components/schemas/QuestionValue"},"uniqueItems":true}},"required":["questionType","representation","title","voteMode"]},"QuestionType":{"type":"string","description":"Type of question used in company surveys or questionnaires","enum":["GENERAL","TOPIC","OPEN","RANGE"]},"QuestionVoteMode":{"type":"string","description":"Modes of question voting in a survey or feedback form. Defines whether a question is mandatory, optional, or deferred.","enum":["MANDATORY","OPTIONAL","DEFERRED"]},"QuestionValue":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"score":{"type":"integer","format":"int32"},"label":{"$ref":"#/components/schemas/MultiLanguage"},"imageUrl":{"type":"string"},"color":{"type":"string"}},"required":["id","label","score"]},"OptionsSurveyQuestion":{"allOf":[{"$ref":"#/components/schemas/AbstractSurveyQuestion"},{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/QuestionValue"},"maxItems":2147483647,"minItems":2,"uniqueItems":true},"minSelection":{"type":"integer","format":"int32"},"maxSelection":{"type":"integer","format":"int32"},"multipleChoice":{"type":"boolean"},"minValue":{"$ref":"#/components/schemas/QuestionValue"},"maxValue":{"$ref":"#/components/schemas/QuestionValue"}}}],"required":["questionType","representation","title","voteMode"]},"ScaleSurveyQuestion":{"allOf":[{"$ref":"#/components/schemas/AbstractSurveyQuestion"},{"type":"object","properties":{"firstValue":{"$ref":"#/components/schemas/QuestionValue"},"lastValue":{"$ref":"#/components/schemas/QuestionValue"},"inverted":{"type":"boolean"}}}],"required":["firstValue","lastValue","questionType","representation","title","voteMode"]}}},"paths":{"/api/v1/company/surveys/{surveyId}":{"delete":{"tags":["survey-resource"],"operationId":"removeSurvey","parameters":[{"name":"surveyId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SurveyDTO"}}}}}}}}}
```

## GET /api/v1/company/surveys/{surveyId}/plan

>

```json
{"openapi":"3.1.0","info":{"title":"Happyforce API","version":"v1"},"tags":[],"servers":[{"url":"{url}","description":"API URL","variables":{"url":{"description":"API Environment","enum":["https://api.happyforce.com","https://staging.happyforce.com","http://localhost:9000"],"default":"https://api.happyforce.com"}}}],"security":[{"companyAPISessionId":[]}],"components":{"securitySchemes":{"companyAPISessionId":{"type":"apiKey","description":"SessionId","name":"SessionId","in":"header"}},"schemas":{"SurveyRoundDTO":{"type":"object","description":"Survey Round Data Transfer Object","properties":{"id":{"type":"string"},"title":{"$ref":"#/components/schemas/MultiLanguage"},"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"}}},"MultiLanguage":{"type":"object","description":"A translatable text value: a required default value plus optional per-language overrides keyed by language tag (e.g. \"es\", \"en\", \"pt-BR\"). Consumers resolve the user's language from langValues (falling back to the base language, then to defaultValue).","properties":{"defaultValue":{"type":"string","description":"Fallback text used when there is no entry in langValues for the requested language.","minLength":1},"langValues":{"type":"object","additionalProperties":{"type":"string"},"description":"Per-language overrides keyed by language tag (e.g. \"es\", \"en\", \"pt-BR\")."},"valid":{"type":"boolean"}},"required":["defaultValue"]}}},"paths":{"/api/v1/company/surveys/{surveyId}/plan":{"get":{"tags":["survey-resource"],"operationId":"getSurveyPlan","parameters":[{"name":"surveyId","in":"path","required":true,"schema":{"type":"string"}},{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SurveyRoundDTO"}}}}}}}}}}
```

## PUT /api/v1/company/surveys/{surveyId}/plan

>

```json
{"openapi":"3.1.0","info":{"title":"Happyforce API","version":"v1"},"tags":[],"servers":[{"url":"{url}","description":"API URL","variables":{"url":{"description":"API Environment","enum":["https://api.happyforce.com","https://staging.happyforce.com","http://localhost:9000"],"default":"https://api.happyforce.com"}}}],"security":[{"companyAPISessionId":[]}],"components":{"securitySchemes":{"companyAPISessionId":{"type":"apiKey","description":"SessionId","name":"SessionId","in":"header"}},"schemas":{"SurveySchedulePlanDTO":{"type":"object","description":"The details of the schedule to be updated","properties":{"roundTitle":{"$ref":"#/components/schemas/MultiLanguage"},"appSurvey":{"type":"boolean"},"mailSurvey":{"type":"boolean"},"communicationTitle":{"$ref":"#/components/schemas/MultiLanguage"},"communicationDescription":{"$ref":"#/components/schemas/MultiLanguage"},"activationRule":{"$ref":"#/components/schemas/ActivationRule"},"hierarchyIds":{"type":"array","items":{"type":"string"},"uniqueItems":true},"characteristics":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/EmployeeCharacteristicValueBoolean"},{"$ref":"#/components/schemas/EmployeeCharacteristicValueDate"},{"$ref":"#/components/schemas/EmployeeCharacteristicValueList"},{"$ref":"#/components/schemas/EmployeeCharacteristicValueTree"}]},"uniqueItems":true},"groupIds":{"type":"array","items":{"type":"string"},"uniqueItems":true},"paused":{"type":"boolean"},"archived":{"type":"boolean"},"mandatory":{"type":"boolean"},"status":{"$ref":"#/components/schemas/SurveyStatus"}},"required":["activationRule"]},"MultiLanguage":{"type":"object","description":"A translatable text value: a required default value plus optional per-language overrides keyed by language tag (e.g. \"es\", \"en\", \"pt-BR\"). Consumers resolve the user's language from langValues (falling back to the base language, then to defaultValue).","properties":{"defaultValue":{"type":"string","description":"Fallback text used when there is no entry in langValues for the requested language.","minLength":1},"langValues":{"type":"object","additionalProperties":{"type":"string"},"description":"Per-language overrides keyed by language tag (e.g. \"es\", \"en\", \"pt-BR\")."},"valid":{"type":"boolean"}},"required":["defaultValue"]},"ActivationRule":{"type":"object","description":"Base class for all activation rule types","discriminator":{"propertyName":"ruleType","mapping":{"CALENDAR":"#/components/schemas/ActivationCalendarRule","RECURRENT":"#/components/schemas/ActivationRecurrentRule","SINGLE":"#/components/schemas/ActivationSingleRule","CONTINUOUS":"#/components/schemas/ContinuousActivationRule"}},"oneOf":[{"$ref":"#/components/schemas/ActivationCalendarRule"},{"$ref":"#/components/schemas/ActivationRecurrentRule"},{"$ref":"#/components/schemas/ActivationSingleRule"},{"$ref":"#/components/schemas/ContinuousActivationRule"}],"properties":{"ruleType":{"$ref":"#/components/schemas/ActivationRuleType"}},"required":["ruleType"]},"ActivationCalendarRule":{"type":"object","allOf":[{"$ref":"#/components/schemas/ActivationRule"},{"type":"object","properties":{"ruleExpression":{"type":"string","minLength":1},"startAt":{"type":"string","format":"date-time"},"endAt":{"type":"string","format":"date-time"},"duration":{"type":"integer","format":"int32","minimum":1}}}],"description":"ActivationCalendarRule","required":["ruleExpression","ruleType","startAt"]},"ActivationRecurrentRule":{"type":"object","allOf":[{"$ref":"#/components/schemas/ActivationRule"},{"type":"object","properties":{"cronExpression":{"type":"string","minLength":1},"startAt":{"type":"string","format":"date-time"},"endAt":{"type":"string","format":"date-time"},"duration":{"type":"integer","format":"int32","minimum":1}}}],"description":"ActivationRecurrentRule","required":["cronExpression","ruleType","startAt"]},"ActivationSingleRule":{"type":"object","allOf":[{"$ref":"#/components/schemas/ActivationRule"},{"type":"object","properties":{"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"}}}],"description":"ActivationSingleRule","required":["ruleType"]},"ContinuousActivationRule":{"type":"object","allOf":[{"$ref":"#/components/schemas/ActivationRule"}],"description":"ContinuousActivationRule","required":["ruleType"]},"ActivationRuleType":{"type":"string","description":"Type of activation rule for a survey or questionnaire","enum":["SINGLE","RECURRENT","CALENDAR","CONTINUOUS"]},"EmployeeCharacteristicValueBoolean":{"allOf":[{"$ref":"#/components/schemas/EmployeeCharacteristicValueBase"},{"type":"object","properties":{"value":{"type":"boolean"}}}]},"EmployeeCharacteristicValueBase":{"type":"object","description":"Base class for employee characteristic values","discriminator":{"propertyName":"questionType","mapping":{"LIST":"#/components/schemas/EmployeeCharacteristicValueList","DATE":"#/components/schemas/EmployeeCharacteristicValueDate","BOOLEAN":"#/components/schemas/EmployeeCharacteristicValueBoolean","TREE":"#/components/schemas/EmployeeCharacteristicValueTree"}},"properties":{"characteristicId":{"type":"string"},"id":{"type":"string"},"questionType":{"$ref":"#/components/schemas/CharacteristicType"}}},"CharacteristicType":{"type":"string","description":"Type of segmentation characteristic","enum":["DATE","LIST","BOOLEAN","TREE"]},"EmployeeCharacteristicValueDate":{"allOf":[{"$ref":"#/components/schemas/EmployeeCharacteristicValueBase"},{"type":"object","properties":{"date":{"type":"string","format":"date-time"},"value":{"type":"string"}}}]},"EmployeeCharacteristicValueList":{"allOf":[{"$ref":"#/components/schemas/EmployeeCharacteristicValueBase"},{"type":"object","properties":{"value":{"type":"string"}}}]},"EmployeeCharacteristicValueTree":{"allOf":[{"$ref":"#/components/schemas/EmployeeCharacteristicValueBase"},{"type":"object","properties":{"value":{"type":"string"},"assignedPath":{"type":"array","items":{"type":"string"}},"assignedOn":{"type":"string","format":"date-time"}}}]},"SurveyStatus":{"type":"string","description":"Status of a survey or questionnaire","enum":["PAUSED","EXPIRED","FUTURE","NOW","ARCHIVED","DRAFT"]},"SurveyDTO":{"type":"object","description":"The details of the survey to be created","properties":{"id":{"type":"string"},"companyId":{"type":"string"},"createdOn":{"type":"string","format":"date-time"},"createdBy":{"type":"string"},"updatedBy":{"type":"string"},"updatedOn":{"type":"string","format":"date-time"},"managerAccessEnabled":{"type":"boolean"},"allowedViewerIds":{"type":"array","description":"Per-survey viewer allow-list: ids of the managers allowed to view this survey's results. Null/empty means every manager of the targeted area may view the results; when populated, only these managers (plus admins/advisors and the creator) may. Serialized as an array of person id strings.","items":{"type":"string"},"uniqueItems":true},"notAnonymous":{"type":"boolean"},"canUpdate":{"type":"boolean"},"canViewResults":{"type":"boolean"},"title":{"$ref":"#/components/schemas/MultiLanguage"},"description":{"$ref":"#/components/schemas/MultiLanguage"},"schedulePlan":{"$ref":"#/components/schemas/SurveySchedulePlanDTO"},"rounds":{"type":"array","items":{"$ref":"#/components/schemas/SurveyRoundDTO"}},"blocks":{"type":"array","items":{"$ref":"#/components/schemas/SurveyBlockDTOAbstractSurveyQuestion"},"minItems":1},"status":{"$ref":"#/components/schemas/SurveyStatus"},"hasReports":{"type":"boolean"}},"required":["blocks","title"]},"SurveyRoundDTO":{"type":"object","description":"Survey Round Data Transfer Object","properties":{"id":{"type":"string"},"title":{"$ref":"#/components/schemas/MultiLanguage"},"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"}}},"SurveyBlockDTOAbstractSurveyQuestion":{"type":"object","description":"A survey block containing a list of questions","properties":{"blockId":{"type":"string"},"title":{"$ref":"#/components/schemas/MultiLanguage"},"description":{"$ref":"#/components/schemas/MultiLanguage"},"questions":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/OpenSurveyQuestion"},{"$ref":"#/components/schemas/OptionsSurveyQuestion"},{"$ref":"#/components/schemas/ScaleSurveyQuestion"}]}}}},"OpenSurveyQuestion":{"allOf":[{"$ref":"#/components/schemas/AbstractSurveyQuestion"},{"type":"object","properties":{"requireNotEmpty":{"type":"boolean"}}}],"required":["questionType","representation","title","voteMode"]},"AbstractSurveyQuestion":{"type":"object","description":"Base class for survey questions","discriminator":{"propertyName":"questionType","mapping":{"OPEN":"#/components/schemas/OpenSurveyQuestion","TOPIC":"#/components/schemas/OptionsSurveyQuestion","RANGE":"#/components/schemas/ScaleSurveyQuestion"}},"properties":{"id":{"type":"string"},"title":{"$ref":"#/components/schemas/MultiLanguage"},"questionType":{"$ref":"#/components/schemas/QuestionType"},"order":{"type":"integer","format":"int32"},"visible":{"type":"boolean"},"computeInBlock":{"type":"boolean"},"feedbackEnabled":{"type":"boolean"},"mandatory":{"type":"boolean","deprecated":true},"voteMode":{"$ref":"#/components/schemas/QuestionVoteMode"},"representation":{"type":"string","enum":["IMAGES","OPTIONS","MULTIPLE_OPTIONS","FEEDBACK","SCALE","GRADIENT_SLIDE"]},"values":{"type":"array","items":{"$ref":"#/components/schemas/QuestionValue"},"uniqueItems":true}},"required":["questionType","representation","title","voteMode"]},"QuestionType":{"type":"string","description":"Type of question used in company surveys or questionnaires","enum":["GENERAL","TOPIC","OPEN","RANGE"]},"QuestionVoteMode":{"type":"string","description":"Modes of question voting in a survey or feedback form. Defines whether a question is mandatory, optional, or deferred.","enum":["MANDATORY","OPTIONAL","DEFERRED"]},"QuestionValue":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"score":{"type":"integer","format":"int32"},"label":{"$ref":"#/components/schemas/MultiLanguage"},"imageUrl":{"type":"string"},"color":{"type":"string"}},"required":["id","label","score"]},"OptionsSurveyQuestion":{"allOf":[{"$ref":"#/components/schemas/AbstractSurveyQuestion"},{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/QuestionValue"},"maxItems":2147483647,"minItems":2,"uniqueItems":true},"minSelection":{"type":"integer","format":"int32"},"maxSelection":{"type":"integer","format":"int32"},"multipleChoice":{"type":"boolean"},"minValue":{"$ref":"#/components/schemas/QuestionValue"},"maxValue":{"$ref":"#/components/schemas/QuestionValue"}}}],"required":["questionType","representation","title","voteMode"]},"ScaleSurveyQuestion":{"allOf":[{"$ref":"#/components/schemas/AbstractSurveyQuestion"},{"type":"object","properties":{"firstValue":{"$ref":"#/components/schemas/QuestionValue"},"lastValue":{"$ref":"#/components/schemas/QuestionValue"},"inverted":{"type":"boolean"}}}],"required":["firstValue","lastValue","questionType","representation","title","voteMode"]}}},"paths":{"/api/v1/company/surveys/{surveyId}/plan":{"put":{"tags":["survey-resource"],"operationId":"setSurveyPlan","parameters":[{"name":"surveyId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"*/*":{"schema":{"$ref":"#/components/schemas/SurveySchedulePlanDTO"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SurveyDTO"}}}}}}}}}
```

## DELETE /api/v1/company/surveys/{surveyId}/plan

>

```json
{"openapi":"3.1.0","info":{"title":"Happyforce API","version":"v1"},"tags":[],"servers":[{"url":"{url}","description":"API URL","variables":{"url":{"description":"API Environment","enum":["https://api.happyforce.com","https://staging.happyforce.com","http://localhost:9000"],"default":"https://api.happyforce.com"}}}],"security":[{"companyAPISessionId":[]}],"components":{"securitySchemes":{"companyAPISessionId":{"type":"apiKey","description":"SessionId","name":"SessionId","in":"header"}},"schemas":{"SurveyDTO":{"type":"object","description":"The details of the survey to be created","properties":{"id":{"type":"string"},"companyId":{"type":"string"},"createdOn":{"type":"string","format":"date-time"},"createdBy":{"type":"string"},"updatedBy":{"type":"string"},"updatedOn":{"type":"string","format":"date-time"},"managerAccessEnabled":{"type":"boolean"},"allowedViewerIds":{"type":"array","description":"Per-survey viewer allow-list: ids of the managers allowed to view this survey's results. Null/empty means every manager of the targeted area may view the results; when populated, only these managers (plus admins/advisors and the creator) may. Serialized as an array of person id strings.","items":{"type":"string"},"uniqueItems":true},"notAnonymous":{"type":"boolean"},"canUpdate":{"type":"boolean"},"canViewResults":{"type":"boolean"},"title":{"$ref":"#/components/schemas/MultiLanguage"},"description":{"$ref":"#/components/schemas/MultiLanguage"},"schedulePlan":{"$ref":"#/components/schemas/SurveySchedulePlanDTO"},"rounds":{"type":"array","items":{"$ref":"#/components/schemas/SurveyRoundDTO"}},"blocks":{"type":"array","items":{"$ref":"#/components/schemas/SurveyBlockDTOAbstractSurveyQuestion"},"minItems":1},"status":{"$ref":"#/components/schemas/SurveyStatus"},"hasReports":{"type":"boolean"}},"required":["blocks","title"]},"MultiLanguage":{"type":"object","description":"A translatable text value: a required default value plus optional per-language overrides keyed by language tag (e.g. \"es\", \"en\", \"pt-BR\"). Consumers resolve the user's language from langValues (falling back to the base language, then to defaultValue).","properties":{"defaultValue":{"type":"string","description":"Fallback text used when there is no entry in langValues for the requested language.","minLength":1},"langValues":{"type":"object","additionalProperties":{"type":"string"},"description":"Per-language overrides keyed by language tag (e.g. \"es\", \"en\", \"pt-BR\")."},"valid":{"type":"boolean"}},"required":["defaultValue"]},"SurveySchedulePlanDTO":{"type":"object","description":"The details of the schedule to be updated","properties":{"roundTitle":{"$ref":"#/components/schemas/MultiLanguage"},"appSurvey":{"type":"boolean"},"mailSurvey":{"type":"boolean"},"communicationTitle":{"$ref":"#/components/schemas/MultiLanguage"},"communicationDescription":{"$ref":"#/components/schemas/MultiLanguage"},"activationRule":{"$ref":"#/components/schemas/ActivationRule"},"hierarchyIds":{"type":"array","items":{"type":"string"},"uniqueItems":true},"characteristics":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/EmployeeCharacteristicValueBoolean"},{"$ref":"#/components/schemas/EmployeeCharacteristicValueDate"},{"$ref":"#/components/schemas/EmployeeCharacteristicValueList"},{"$ref":"#/components/schemas/EmployeeCharacteristicValueTree"}]},"uniqueItems":true},"groupIds":{"type":"array","items":{"type":"string"},"uniqueItems":true},"paused":{"type":"boolean"},"archived":{"type":"boolean"},"mandatory":{"type":"boolean"},"status":{"$ref":"#/components/schemas/SurveyStatus"}},"required":["activationRule"]},"ActivationRule":{"type":"object","description":"Base class for all activation rule types","discriminator":{"propertyName":"ruleType","mapping":{"CALENDAR":"#/components/schemas/ActivationCalendarRule","RECURRENT":"#/components/schemas/ActivationRecurrentRule","SINGLE":"#/components/schemas/ActivationSingleRule","CONTINUOUS":"#/components/schemas/ContinuousActivationRule"}},"oneOf":[{"$ref":"#/components/schemas/ActivationCalendarRule"},{"$ref":"#/components/schemas/ActivationRecurrentRule"},{"$ref":"#/components/schemas/ActivationSingleRule"},{"$ref":"#/components/schemas/ContinuousActivationRule"}],"properties":{"ruleType":{"$ref":"#/components/schemas/ActivationRuleType"}},"required":["ruleType"]},"ActivationCalendarRule":{"type":"object","allOf":[{"$ref":"#/components/schemas/ActivationRule"},{"type":"object","properties":{"ruleExpression":{"type":"string","minLength":1},"startAt":{"type":"string","format":"date-time"},"endAt":{"type":"string","format":"date-time"},"duration":{"type":"integer","format":"int32","minimum":1}}}],"description":"ActivationCalendarRule","required":["ruleExpression","ruleType","startAt"]},"ActivationRecurrentRule":{"type":"object","allOf":[{"$ref":"#/components/schemas/ActivationRule"},{"type":"object","properties":{"cronExpression":{"type":"string","minLength":1},"startAt":{"type":"string","format":"date-time"},"endAt":{"type":"string","format":"date-time"},"duration":{"type":"integer","format":"int32","minimum":1}}}],"description":"ActivationRecurrentRule","required":["cronExpression","ruleType","startAt"]},"ActivationSingleRule":{"type":"object","allOf":[{"$ref":"#/components/schemas/ActivationRule"},{"type":"object","properties":{"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"}}}],"description":"ActivationSingleRule","required":["ruleType"]},"ContinuousActivationRule":{"type":"object","allOf":[{"$ref":"#/components/schemas/ActivationRule"}],"description":"ContinuousActivationRule","required":["ruleType"]},"ActivationRuleType":{"type":"string","description":"Type of activation rule for a survey or questionnaire","enum":["SINGLE","RECURRENT","CALENDAR","CONTINUOUS"]},"EmployeeCharacteristicValueBoolean":{"allOf":[{"$ref":"#/components/schemas/EmployeeCharacteristicValueBase"},{"type":"object","properties":{"value":{"type":"boolean"}}}]},"EmployeeCharacteristicValueBase":{"type":"object","description":"Base class for employee characteristic values","discriminator":{"propertyName":"questionType","mapping":{"LIST":"#/components/schemas/EmployeeCharacteristicValueList","DATE":"#/components/schemas/EmployeeCharacteristicValueDate","BOOLEAN":"#/components/schemas/EmployeeCharacteristicValueBoolean","TREE":"#/components/schemas/EmployeeCharacteristicValueTree"}},"properties":{"characteristicId":{"type":"string"},"id":{"type":"string"},"questionType":{"$ref":"#/components/schemas/CharacteristicType"}}},"CharacteristicType":{"type":"string","description":"Type of segmentation characteristic","enum":["DATE","LIST","BOOLEAN","TREE"]},"EmployeeCharacteristicValueDate":{"allOf":[{"$ref":"#/components/schemas/EmployeeCharacteristicValueBase"},{"type":"object","properties":{"date":{"type":"string","format":"date-time"},"value":{"type":"string"}}}]},"EmployeeCharacteristicValueList":{"allOf":[{"$ref":"#/components/schemas/EmployeeCharacteristicValueBase"},{"type":"object","properties":{"value":{"type":"string"}}}]},"EmployeeCharacteristicValueTree":{"allOf":[{"$ref":"#/components/schemas/EmployeeCharacteristicValueBase"},{"type":"object","properties":{"value":{"type":"string"},"assignedPath":{"type":"array","items":{"type":"string"}},"assignedOn":{"type":"string","format":"date-time"}}}]},"SurveyStatus":{"type":"string","description":"Status of a survey or questionnaire","enum":["PAUSED","EXPIRED","FUTURE","NOW","ARCHIVED","DRAFT"]},"SurveyRoundDTO":{"type":"object","description":"Survey Round Data Transfer Object","properties":{"id":{"type":"string"},"title":{"$ref":"#/components/schemas/MultiLanguage"},"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"}}},"SurveyBlockDTOAbstractSurveyQuestion":{"type":"object","description":"A survey block containing a list of questions","properties":{"blockId":{"type":"string"},"title":{"$ref":"#/components/schemas/MultiLanguage"},"description":{"$ref":"#/components/schemas/MultiLanguage"},"questions":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/OpenSurveyQuestion"},{"$ref":"#/components/schemas/OptionsSurveyQuestion"},{"$ref":"#/components/schemas/ScaleSurveyQuestion"}]}}}},"OpenSurveyQuestion":{"allOf":[{"$ref":"#/components/schemas/AbstractSurveyQuestion"},{"type":"object","properties":{"requireNotEmpty":{"type":"boolean"}}}],"required":["questionType","representation","title","voteMode"]},"AbstractSurveyQuestion":{"type":"object","description":"Base class for survey questions","discriminator":{"propertyName":"questionType","mapping":{"OPEN":"#/components/schemas/OpenSurveyQuestion","TOPIC":"#/components/schemas/OptionsSurveyQuestion","RANGE":"#/components/schemas/ScaleSurveyQuestion"}},"properties":{"id":{"type":"string"},"title":{"$ref":"#/components/schemas/MultiLanguage"},"questionType":{"$ref":"#/components/schemas/QuestionType"},"order":{"type":"integer","format":"int32"},"visible":{"type":"boolean"},"computeInBlock":{"type":"boolean"},"feedbackEnabled":{"type":"boolean"},"mandatory":{"type":"boolean","deprecated":true},"voteMode":{"$ref":"#/components/schemas/QuestionVoteMode"},"representation":{"type":"string","enum":["IMAGES","OPTIONS","MULTIPLE_OPTIONS","FEEDBACK","SCALE","GRADIENT_SLIDE"]},"values":{"type":"array","items":{"$ref":"#/components/schemas/QuestionValue"},"uniqueItems":true}},"required":["questionType","representation","title","voteMode"]},"QuestionType":{"type":"string","description":"Type of question used in company surveys or questionnaires","enum":["GENERAL","TOPIC","OPEN","RANGE"]},"QuestionVoteMode":{"type":"string","description":"Modes of question voting in a survey or feedback form. Defines whether a question is mandatory, optional, or deferred.","enum":["MANDATORY","OPTIONAL","DEFERRED"]},"QuestionValue":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"score":{"type":"integer","format":"int32"},"label":{"$ref":"#/components/schemas/MultiLanguage"},"imageUrl":{"type":"string"},"color":{"type":"string"}},"required":["id","label","score"]},"OptionsSurveyQuestion":{"allOf":[{"$ref":"#/components/schemas/AbstractSurveyQuestion"},{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/QuestionValue"},"maxItems":2147483647,"minItems":2,"uniqueItems":true},"minSelection":{"type":"integer","format":"int32"},"maxSelection":{"type":"integer","format":"int32"},"multipleChoice":{"type":"boolean"},"minValue":{"$ref":"#/components/schemas/QuestionValue"},"maxValue":{"$ref":"#/components/schemas/QuestionValue"}}}],"required":["questionType","representation","title","voteMode"]},"ScaleSurveyQuestion":{"allOf":[{"$ref":"#/components/schemas/AbstractSurveyQuestion"},{"type":"object","properties":{"firstValue":{"$ref":"#/components/schemas/QuestionValue"},"lastValue":{"$ref":"#/components/schemas/QuestionValue"},"inverted":{"type":"boolean"}}}],"required":["firstValue","lastValue","questionType","representation","title","voteMode"]}}},"paths":{"/api/v1/company/surveys/{surveyId}/plan":{"delete":{"tags":["survey-resource"],"operationId":"removeSurveyPlan","parameters":[{"name":"surveyId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SurveyDTO"}}}}}}}}}
```

## GET /api/v1/company/surveys

>

```json
{"openapi":"3.1.0","info":{"title":"Happyforce API","version":"v1"},"tags":[],"servers":[{"url":"{url}","description":"API URL","variables":{"url":{"description":"API Environment","enum":["https://api.happyforce.com","https://staging.happyforce.com","http://localhost:9000"],"default":"https://api.happyforce.com"}}}],"security":[{"companyAPISessionId":[]}],"components":{"securitySchemes":{"companyAPISessionId":{"type":"apiKey","description":"SessionId","name":"SessionId","in":"header"}},"schemas":{"SurveyStatus":{"type":"string","description":"Status of a survey or questionnaire","enum":["PAUSED","EXPIRED","FUTURE","NOW","ARCHIVED","DRAFT"]},"PaginableGenericResultListSurveyDTO":{"type":"object","properties":{"from":{"type":"integer","format":"int32"},"to":{"type":"integer","format":"int64"},"total":{"type":"integer","format":"int64"},"result":{"type":"array","items":{"$ref":"#/components/schemas/SurveyDTO"}}}},"SurveyDTO":{"type":"object","description":"The details of the survey to be created","properties":{"id":{"type":"string"},"companyId":{"type":"string"},"createdOn":{"type":"string","format":"date-time"},"createdBy":{"type":"string"},"updatedBy":{"type":"string"},"updatedOn":{"type":"string","format":"date-time"},"managerAccessEnabled":{"type":"boolean"},"allowedViewerIds":{"type":"array","description":"Per-survey viewer allow-list: ids of the managers allowed to view this survey's results. Null/empty means every manager of the targeted area may view the results; when populated, only these managers (plus admins/advisors and the creator) may. Serialized as an array of person id strings.","items":{"type":"string"},"uniqueItems":true},"notAnonymous":{"type":"boolean"},"canUpdate":{"type":"boolean"},"canViewResults":{"type":"boolean"},"title":{"$ref":"#/components/schemas/MultiLanguage"},"description":{"$ref":"#/components/schemas/MultiLanguage"},"schedulePlan":{"$ref":"#/components/schemas/SurveySchedulePlanDTO"},"rounds":{"type":"array","items":{"$ref":"#/components/schemas/SurveyRoundDTO"}},"blocks":{"type":"array","items":{"$ref":"#/components/schemas/SurveyBlockDTOAbstractSurveyQuestion"},"minItems":1},"status":{"$ref":"#/components/schemas/SurveyStatus"},"hasReports":{"type":"boolean"}},"required":["blocks","title"]},"MultiLanguage":{"type":"object","description":"A translatable text value: a required default value plus optional per-language overrides keyed by language tag (e.g. \"es\", \"en\", \"pt-BR\"). Consumers resolve the user's language from langValues (falling back to the base language, then to defaultValue).","properties":{"defaultValue":{"type":"string","description":"Fallback text used when there is no entry in langValues for the requested language.","minLength":1},"langValues":{"type":"object","additionalProperties":{"type":"string"},"description":"Per-language overrides keyed by language tag (e.g. \"es\", \"en\", \"pt-BR\")."},"valid":{"type":"boolean"}},"required":["defaultValue"]},"SurveySchedulePlanDTO":{"type":"object","description":"The details of the schedule to be updated","properties":{"roundTitle":{"$ref":"#/components/schemas/MultiLanguage"},"appSurvey":{"type":"boolean"},"mailSurvey":{"type":"boolean"},"communicationTitle":{"$ref":"#/components/schemas/MultiLanguage"},"communicationDescription":{"$ref":"#/components/schemas/MultiLanguage"},"activationRule":{"$ref":"#/components/schemas/ActivationRule"},"hierarchyIds":{"type":"array","items":{"type":"string"},"uniqueItems":true},"characteristics":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/EmployeeCharacteristicValueBoolean"},{"$ref":"#/components/schemas/EmployeeCharacteristicValueDate"},{"$ref":"#/components/schemas/EmployeeCharacteristicValueList"},{"$ref":"#/components/schemas/EmployeeCharacteristicValueTree"}]},"uniqueItems":true},"groupIds":{"type":"array","items":{"type":"string"},"uniqueItems":true},"paused":{"type":"boolean"},"archived":{"type":"boolean"},"mandatory":{"type":"boolean"},"status":{"$ref":"#/components/schemas/SurveyStatus"}},"required":["activationRule"]},"ActivationRule":{"type":"object","description":"Base class for all activation rule types","discriminator":{"propertyName":"ruleType","mapping":{"CALENDAR":"#/components/schemas/ActivationCalendarRule","RECURRENT":"#/components/schemas/ActivationRecurrentRule","SINGLE":"#/components/schemas/ActivationSingleRule","CONTINUOUS":"#/components/schemas/ContinuousActivationRule"}},"oneOf":[{"$ref":"#/components/schemas/ActivationCalendarRule"},{"$ref":"#/components/schemas/ActivationRecurrentRule"},{"$ref":"#/components/schemas/ActivationSingleRule"},{"$ref":"#/components/schemas/ContinuousActivationRule"}],"properties":{"ruleType":{"$ref":"#/components/schemas/ActivationRuleType"}},"required":["ruleType"]},"ActivationCalendarRule":{"type":"object","allOf":[{"$ref":"#/components/schemas/ActivationRule"},{"type":"object","properties":{"ruleExpression":{"type":"string","minLength":1},"startAt":{"type":"string","format":"date-time"},"endAt":{"type":"string","format":"date-time"},"duration":{"type":"integer","format":"int32","minimum":1}}}],"description":"ActivationCalendarRule","required":["ruleExpression","ruleType","startAt"]},"ActivationRecurrentRule":{"type":"object","allOf":[{"$ref":"#/components/schemas/ActivationRule"},{"type":"object","properties":{"cronExpression":{"type":"string","minLength":1},"startAt":{"type":"string","format":"date-time"},"endAt":{"type":"string","format":"date-time"},"duration":{"type":"integer","format":"int32","minimum":1}}}],"description":"ActivationRecurrentRule","required":["cronExpression","ruleType","startAt"]},"ActivationSingleRule":{"type":"object","allOf":[{"$ref":"#/components/schemas/ActivationRule"},{"type":"object","properties":{"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"}}}],"description":"ActivationSingleRule","required":["ruleType"]},"ContinuousActivationRule":{"type":"object","allOf":[{"$ref":"#/components/schemas/ActivationRule"}],"description":"ContinuousActivationRule","required":["ruleType"]},"ActivationRuleType":{"type":"string","description":"Type of activation rule for a survey or questionnaire","enum":["SINGLE","RECURRENT","CALENDAR","CONTINUOUS"]},"EmployeeCharacteristicValueBoolean":{"allOf":[{"$ref":"#/components/schemas/EmployeeCharacteristicValueBase"},{"type":"object","properties":{"value":{"type":"boolean"}}}]},"EmployeeCharacteristicValueBase":{"type":"object","description":"Base class for employee characteristic values","discriminator":{"propertyName":"questionType","mapping":{"LIST":"#/components/schemas/EmployeeCharacteristicValueList","DATE":"#/components/schemas/EmployeeCharacteristicValueDate","BOOLEAN":"#/components/schemas/EmployeeCharacteristicValueBoolean","TREE":"#/components/schemas/EmployeeCharacteristicValueTree"}},"properties":{"characteristicId":{"type":"string"},"id":{"type":"string"},"questionType":{"$ref":"#/components/schemas/CharacteristicType"}}},"CharacteristicType":{"type":"string","description":"Type of segmentation characteristic","enum":["DATE","LIST","BOOLEAN","TREE"]},"EmployeeCharacteristicValueDate":{"allOf":[{"$ref":"#/components/schemas/EmployeeCharacteristicValueBase"},{"type":"object","properties":{"date":{"type":"string","format":"date-time"},"value":{"type":"string"}}}]},"EmployeeCharacteristicValueList":{"allOf":[{"$ref":"#/components/schemas/EmployeeCharacteristicValueBase"},{"type":"object","properties":{"value":{"type":"string"}}}]},"EmployeeCharacteristicValueTree":{"allOf":[{"$ref":"#/components/schemas/EmployeeCharacteristicValueBase"},{"type":"object","properties":{"value":{"type":"string"},"assignedPath":{"type":"array","items":{"type":"string"}},"assignedOn":{"type":"string","format":"date-time"}}}]},"SurveyRoundDTO":{"type":"object","description":"Survey Round Data Transfer Object","properties":{"id":{"type":"string"},"title":{"$ref":"#/components/schemas/MultiLanguage"},"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"}}},"SurveyBlockDTOAbstractSurveyQuestion":{"type":"object","description":"A survey block containing a list of questions","properties":{"blockId":{"type":"string"},"title":{"$ref":"#/components/schemas/MultiLanguage"},"description":{"$ref":"#/components/schemas/MultiLanguage"},"questions":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/OpenSurveyQuestion"},{"$ref":"#/components/schemas/OptionsSurveyQuestion"},{"$ref":"#/components/schemas/ScaleSurveyQuestion"}]}}}},"OpenSurveyQuestion":{"allOf":[{"$ref":"#/components/schemas/AbstractSurveyQuestion"},{"type":"object","properties":{"requireNotEmpty":{"type":"boolean"}}}],"required":["questionType","representation","title","voteMode"]},"AbstractSurveyQuestion":{"type":"object","description":"Base class for survey questions","discriminator":{"propertyName":"questionType","mapping":{"OPEN":"#/components/schemas/OpenSurveyQuestion","TOPIC":"#/components/schemas/OptionsSurveyQuestion","RANGE":"#/components/schemas/ScaleSurveyQuestion"}},"properties":{"id":{"type":"string"},"title":{"$ref":"#/components/schemas/MultiLanguage"},"questionType":{"$ref":"#/components/schemas/QuestionType"},"order":{"type":"integer","format":"int32"},"visible":{"type":"boolean"},"computeInBlock":{"type":"boolean"},"feedbackEnabled":{"type":"boolean"},"mandatory":{"type":"boolean","deprecated":true},"voteMode":{"$ref":"#/components/schemas/QuestionVoteMode"},"representation":{"type":"string","enum":["IMAGES","OPTIONS","MULTIPLE_OPTIONS","FEEDBACK","SCALE","GRADIENT_SLIDE"]},"values":{"type":"array","items":{"$ref":"#/components/schemas/QuestionValue"},"uniqueItems":true}},"required":["questionType","representation","title","voteMode"]},"QuestionType":{"type":"string","description":"Type of question used in company surveys or questionnaires","enum":["GENERAL","TOPIC","OPEN","RANGE"]},"QuestionVoteMode":{"type":"string","description":"Modes of question voting in a survey or feedback form. Defines whether a question is mandatory, optional, or deferred.","enum":["MANDATORY","OPTIONAL","DEFERRED"]},"QuestionValue":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"score":{"type":"integer","format":"int32"},"label":{"$ref":"#/components/schemas/MultiLanguage"},"imageUrl":{"type":"string"},"color":{"type":"string"}},"required":["id","label","score"]},"OptionsSurveyQuestion":{"allOf":[{"$ref":"#/components/schemas/AbstractSurveyQuestion"},{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/QuestionValue"},"maxItems":2147483647,"minItems":2,"uniqueItems":true},"minSelection":{"type":"integer","format":"int32"},"maxSelection":{"type":"integer","format":"int32"},"multipleChoice":{"type":"boolean"},"minValue":{"$ref":"#/components/schemas/QuestionValue"},"maxValue":{"$ref":"#/components/schemas/QuestionValue"}}}],"required":["questionType","representation","title","voteMode"]},"ScaleSurveyQuestion":{"allOf":[{"$ref":"#/components/schemas/AbstractSurveyQuestion"},{"type":"object","properties":{"firstValue":{"$ref":"#/components/schemas/QuestionValue"},"lastValue":{"$ref":"#/components/schemas/QuestionValue"},"inverted":{"type":"boolean"}}}],"required":["firstValue","lastValue","questionType","representation","title","voteMode"]}}},"paths":{"/api/v1/company/surveys":{"get":{"tags":["survey-resource"],"operationId":"getSurveys","parameters":[{"name":"status","in":"query","required":false,"schema":{"$ref":"#/components/schemas/SurveyStatus"}},{"name":"from","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":0}},{"name":"to","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":10}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PaginableGenericResultListSurveyDTO"}}}}}}}}}
```

## POST /api/v1/company/surveys

>

```json
{"openapi":"3.1.0","info":{"title":"Happyforce API","version":"v1"},"tags":[],"servers":[{"url":"{url}","description":"API URL","variables":{"url":{"description":"API Environment","enum":["https://api.happyforce.com","https://staging.happyforce.com","http://localhost:9000"],"default":"https://api.happyforce.com"}}}],"security":[{"companyAPISessionId":[]}],"components":{"securitySchemes":{"companyAPISessionId":{"type":"apiKey","description":"SessionId","name":"SessionId","in":"header"}},"schemas":{"SurveyDTO":{"type":"object","description":"The details of the survey to be created","properties":{"id":{"type":"string"},"companyId":{"type":"string"},"createdOn":{"type":"string","format":"date-time"},"createdBy":{"type":"string"},"updatedBy":{"type":"string"},"updatedOn":{"type":"string","format":"date-time"},"managerAccessEnabled":{"type":"boolean"},"allowedViewerIds":{"type":"array","description":"Per-survey viewer allow-list: ids of the managers allowed to view this survey's results. Null/empty means every manager of the targeted area may view the results; when populated, only these managers (plus admins/advisors and the creator) may. Serialized as an array of person id strings.","items":{"type":"string"},"uniqueItems":true},"notAnonymous":{"type":"boolean"},"canUpdate":{"type":"boolean"},"canViewResults":{"type":"boolean"},"title":{"$ref":"#/components/schemas/MultiLanguage"},"description":{"$ref":"#/components/schemas/MultiLanguage"},"schedulePlan":{"$ref":"#/components/schemas/SurveySchedulePlanDTO"},"rounds":{"type":"array","items":{"$ref":"#/components/schemas/SurveyRoundDTO"}},"blocks":{"type":"array","items":{"$ref":"#/components/schemas/SurveyBlockDTOAbstractSurveyQuestion"},"minItems":1},"status":{"$ref":"#/components/schemas/SurveyStatus"},"hasReports":{"type":"boolean"}},"required":["blocks","title"]},"MultiLanguage":{"type":"object","description":"A translatable text value: a required default value plus optional per-language overrides keyed by language tag (e.g. \"es\", \"en\", \"pt-BR\"). Consumers resolve the user's language from langValues (falling back to the base language, then to defaultValue).","properties":{"defaultValue":{"type":"string","description":"Fallback text used when there is no entry in langValues for the requested language.","minLength":1},"langValues":{"type":"object","additionalProperties":{"type":"string"},"description":"Per-language overrides keyed by language tag (e.g. \"es\", \"en\", \"pt-BR\")."},"valid":{"type":"boolean"}},"required":["defaultValue"]},"SurveySchedulePlanDTO":{"type":"object","description":"The details of the schedule to be updated","properties":{"roundTitle":{"$ref":"#/components/schemas/MultiLanguage"},"appSurvey":{"type":"boolean"},"mailSurvey":{"type":"boolean"},"communicationTitle":{"$ref":"#/components/schemas/MultiLanguage"},"communicationDescription":{"$ref":"#/components/schemas/MultiLanguage"},"activationRule":{"$ref":"#/components/schemas/ActivationRule"},"hierarchyIds":{"type":"array","items":{"type":"string"},"uniqueItems":true},"characteristics":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/EmployeeCharacteristicValueBoolean"},{"$ref":"#/components/schemas/EmployeeCharacteristicValueDate"},{"$ref":"#/components/schemas/EmployeeCharacteristicValueList"},{"$ref":"#/components/schemas/EmployeeCharacteristicValueTree"}]},"uniqueItems":true},"groupIds":{"type":"array","items":{"type":"string"},"uniqueItems":true},"paused":{"type":"boolean"},"archived":{"type":"boolean"},"mandatory":{"type":"boolean"},"status":{"$ref":"#/components/schemas/SurveyStatus"}},"required":["activationRule"]},"ActivationRule":{"type":"object","description":"Base class for all activation rule types","discriminator":{"propertyName":"ruleType","mapping":{"CALENDAR":"#/components/schemas/ActivationCalendarRule","RECURRENT":"#/components/schemas/ActivationRecurrentRule","SINGLE":"#/components/schemas/ActivationSingleRule","CONTINUOUS":"#/components/schemas/ContinuousActivationRule"}},"oneOf":[{"$ref":"#/components/schemas/ActivationCalendarRule"},{"$ref":"#/components/schemas/ActivationRecurrentRule"},{"$ref":"#/components/schemas/ActivationSingleRule"},{"$ref":"#/components/schemas/ContinuousActivationRule"}],"properties":{"ruleType":{"$ref":"#/components/schemas/ActivationRuleType"}},"required":["ruleType"]},"ActivationCalendarRule":{"type":"object","allOf":[{"$ref":"#/components/schemas/ActivationRule"},{"type":"object","properties":{"ruleExpression":{"type":"string","minLength":1},"startAt":{"type":"string","format":"date-time"},"endAt":{"type":"string","format":"date-time"},"duration":{"type":"integer","format":"int32","minimum":1}}}],"description":"ActivationCalendarRule","required":["ruleExpression","ruleType","startAt"]},"ActivationRecurrentRule":{"type":"object","allOf":[{"$ref":"#/components/schemas/ActivationRule"},{"type":"object","properties":{"cronExpression":{"type":"string","minLength":1},"startAt":{"type":"string","format":"date-time"},"endAt":{"type":"string","format":"date-time"},"duration":{"type":"integer","format":"int32","minimum":1}}}],"description":"ActivationRecurrentRule","required":["cronExpression","ruleType","startAt"]},"ActivationSingleRule":{"type":"object","allOf":[{"$ref":"#/components/schemas/ActivationRule"},{"type":"object","properties":{"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"}}}],"description":"ActivationSingleRule","required":["ruleType"]},"ContinuousActivationRule":{"type":"object","allOf":[{"$ref":"#/components/schemas/ActivationRule"}],"description":"ContinuousActivationRule","required":["ruleType"]},"ActivationRuleType":{"type":"string","description":"Type of activation rule for a survey or questionnaire","enum":["SINGLE","RECURRENT","CALENDAR","CONTINUOUS"]},"EmployeeCharacteristicValueBoolean":{"allOf":[{"$ref":"#/components/schemas/EmployeeCharacteristicValueBase"},{"type":"object","properties":{"value":{"type":"boolean"}}}]},"EmployeeCharacteristicValueBase":{"type":"object","description":"Base class for employee characteristic values","discriminator":{"propertyName":"questionType","mapping":{"LIST":"#/components/schemas/EmployeeCharacteristicValueList","DATE":"#/components/schemas/EmployeeCharacteristicValueDate","BOOLEAN":"#/components/schemas/EmployeeCharacteristicValueBoolean","TREE":"#/components/schemas/EmployeeCharacteristicValueTree"}},"properties":{"characteristicId":{"type":"string"},"id":{"type":"string"},"questionType":{"$ref":"#/components/schemas/CharacteristicType"}}},"CharacteristicType":{"type":"string","description":"Type of segmentation characteristic","enum":["DATE","LIST","BOOLEAN","TREE"]},"EmployeeCharacteristicValueDate":{"allOf":[{"$ref":"#/components/schemas/EmployeeCharacteristicValueBase"},{"type":"object","properties":{"date":{"type":"string","format":"date-time"},"value":{"type":"string"}}}]},"EmployeeCharacteristicValueList":{"allOf":[{"$ref":"#/components/schemas/EmployeeCharacteristicValueBase"},{"type":"object","properties":{"value":{"type":"string"}}}]},"EmployeeCharacteristicValueTree":{"allOf":[{"$ref":"#/components/schemas/EmployeeCharacteristicValueBase"},{"type":"object","properties":{"value":{"type":"string"},"assignedPath":{"type":"array","items":{"type":"string"}},"assignedOn":{"type":"string","format":"date-time"}}}]},"SurveyStatus":{"type":"string","description":"Status of a survey or questionnaire","enum":["PAUSED","EXPIRED","FUTURE","NOW","ARCHIVED","DRAFT"]},"SurveyRoundDTO":{"type":"object","description":"Survey Round Data Transfer Object","properties":{"id":{"type":"string"},"title":{"$ref":"#/components/schemas/MultiLanguage"},"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"}}},"SurveyBlockDTOAbstractSurveyQuestion":{"type":"object","description":"A survey block containing a list of questions","properties":{"blockId":{"type":"string"},"title":{"$ref":"#/components/schemas/MultiLanguage"},"description":{"$ref":"#/components/schemas/MultiLanguage"},"questions":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/OpenSurveyQuestion"},{"$ref":"#/components/schemas/OptionsSurveyQuestion"},{"$ref":"#/components/schemas/ScaleSurveyQuestion"}]}}}},"OpenSurveyQuestion":{"allOf":[{"$ref":"#/components/schemas/AbstractSurveyQuestion"},{"type":"object","properties":{"requireNotEmpty":{"type":"boolean"}}}],"required":["questionType","representation","title","voteMode"]},"AbstractSurveyQuestion":{"type":"object","description":"Base class for survey questions","discriminator":{"propertyName":"questionType","mapping":{"OPEN":"#/components/schemas/OpenSurveyQuestion","TOPIC":"#/components/schemas/OptionsSurveyQuestion","RANGE":"#/components/schemas/ScaleSurveyQuestion"}},"properties":{"id":{"type":"string"},"title":{"$ref":"#/components/schemas/MultiLanguage"},"questionType":{"$ref":"#/components/schemas/QuestionType"},"order":{"type":"integer","format":"int32"},"visible":{"type":"boolean"},"computeInBlock":{"type":"boolean"},"feedbackEnabled":{"type":"boolean"},"mandatory":{"type":"boolean","deprecated":true},"voteMode":{"$ref":"#/components/schemas/QuestionVoteMode"},"representation":{"type":"string","enum":["IMAGES","OPTIONS","MULTIPLE_OPTIONS","FEEDBACK","SCALE","GRADIENT_SLIDE"]},"values":{"type":"array","items":{"$ref":"#/components/schemas/QuestionValue"},"uniqueItems":true}},"required":["questionType","representation","title","voteMode"]},"QuestionType":{"type":"string","description":"Type of question used in company surveys or questionnaires","enum":["GENERAL","TOPIC","OPEN","RANGE"]},"QuestionVoteMode":{"type":"string","description":"Modes of question voting in a survey or feedback form. Defines whether a question is mandatory, optional, or deferred.","enum":["MANDATORY","OPTIONAL","DEFERRED"]},"QuestionValue":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"score":{"type":"integer","format":"int32"},"label":{"$ref":"#/components/schemas/MultiLanguage"},"imageUrl":{"type":"string"},"color":{"type":"string"}},"required":["id","label","score"]},"OptionsSurveyQuestion":{"allOf":[{"$ref":"#/components/schemas/AbstractSurveyQuestion"},{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/QuestionValue"},"maxItems":2147483647,"minItems":2,"uniqueItems":true},"minSelection":{"type":"integer","format":"int32"},"maxSelection":{"type":"integer","format":"int32"},"multipleChoice":{"type":"boolean"},"minValue":{"$ref":"#/components/schemas/QuestionValue"},"maxValue":{"$ref":"#/components/schemas/QuestionValue"}}}],"required":["questionType","representation","title","voteMode"]},"ScaleSurveyQuestion":{"allOf":[{"$ref":"#/components/schemas/AbstractSurveyQuestion"},{"type":"object","properties":{"firstValue":{"$ref":"#/components/schemas/QuestionValue"},"lastValue":{"$ref":"#/components/schemas/QuestionValue"},"inverted":{"type":"boolean"}}}],"required":["firstValue","lastValue","questionType","representation","title","voteMode"]}}},"paths":{"/api/v1/company/surveys":{"post":{"tags":["survey-resource"],"operationId":"createSurvey","requestBody":{"content":{"*/*":{"schema":{"$ref":"#/components/schemas/SurveyDTO"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SurveyDTO"}}}}}}}}}
```

## POST /api/v1/company/surveys/{surveyId}/reminder

>

```json
{"openapi":"3.1.0","info":{"title":"Happyforce API","version":"v1"},"tags":[],"servers":[{"url":"{url}","description":"API URL","variables":{"url":{"description":"API Environment","enum":["https://api.happyforce.com","https://staging.happyforce.com","http://localhost:9000"],"default":"https://api.happyforce.com"}}}],"security":[{"companyAPISessionId":[]}],"components":{"securitySchemes":{"companyAPISessionId":{"type":"apiKey","description":"SessionId","name":"SessionId","in":"header"}},"schemas":{"SurveyRemindRequestDTO":{"type":"object","description":"The details of the reminder to be created","properties":{"message":{"$ref":"#/components/schemas/MultiLanguage"},"header":{"$ref":"#/components/schemas/MultiLanguage"},"appReminder":{"type":"boolean"},"mailReminder":{"type":"boolean"}},"required":["header","message"]},"MultiLanguage":{"type":"object","description":"A translatable text value: a required default value plus optional per-language overrides keyed by language tag (e.g. \"es\", \"en\", \"pt-BR\"). Consumers resolve the user's language from langValues (falling back to the base language, then to defaultValue).","properties":{"defaultValue":{"type":"string","description":"Fallback text used when there is no entry in langValues for the requested language.","minLength":1},"langValues":{"type":"object","additionalProperties":{"type":"string"},"description":"Per-language overrides keyed by language tag (e.g. \"es\", \"en\", \"pt-BR\")."},"valid":{"type":"boolean"}},"required":["defaultValue"]},"SurveyDTO":{"type":"object","description":"The details of the survey to be created","properties":{"id":{"type":"string"},"companyId":{"type":"string"},"createdOn":{"type":"string","format":"date-time"},"createdBy":{"type":"string"},"updatedBy":{"type":"string"},"updatedOn":{"type":"string","format":"date-time"},"managerAccessEnabled":{"type":"boolean"},"allowedViewerIds":{"type":"array","description":"Per-survey viewer allow-list: ids of the managers allowed to view this survey's results. Null/empty means every manager of the targeted area may view the results; when populated, only these managers (plus admins/advisors and the creator) may. Serialized as an array of person id strings.","items":{"type":"string"},"uniqueItems":true},"notAnonymous":{"type":"boolean"},"canUpdate":{"type":"boolean"},"canViewResults":{"type":"boolean"},"title":{"$ref":"#/components/schemas/MultiLanguage"},"description":{"$ref":"#/components/schemas/MultiLanguage"},"schedulePlan":{"$ref":"#/components/schemas/SurveySchedulePlanDTO"},"rounds":{"type":"array","items":{"$ref":"#/components/schemas/SurveyRoundDTO"}},"blocks":{"type":"array","items":{"$ref":"#/components/schemas/SurveyBlockDTOAbstractSurveyQuestion"},"minItems":1},"status":{"$ref":"#/components/schemas/SurveyStatus"},"hasReports":{"type":"boolean"}},"required":["blocks","title"]},"SurveySchedulePlanDTO":{"type":"object","description":"The details of the schedule to be updated","properties":{"roundTitle":{"$ref":"#/components/schemas/MultiLanguage"},"appSurvey":{"type":"boolean"},"mailSurvey":{"type":"boolean"},"communicationTitle":{"$ref":"#/components/schemas/MultiLanguage"},"communicationDescription":{"$ref":"#/components/schemas/MultiLanguage"},"activationRule":{"$ref":"#/components/schemas/ActivationRule"},"hierarchyIds":{"type":"array","items":{"type":"string"},"uniqueItems":true},"characteristics":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/EmployeeCharacteristicValueBoolean"},{"$ref":"#/components/schemas/EmployeeCharacteristicValueDate"},{"$ref":"#/components/schemas/EmployeeCharacteristicValueList"},{"$ref":"#/components/schemas/EmployeeCharacteristicValueTree"}]},"uniqueItems":true},"groupIds":{"type":"array","items":{"type":"string"},"uniqueItems":true},"paused":{"type":"boolean"},"archived":{"type":"boolean"},"mandatory":{"type":"boolean"},"status":{"$ref":"#/components/schemas/SurveyStatus"}},"required":["activationRule"]},"ActivationRule":{"type":"object","description":"Base class for all activation rule types","discriminator":{"propertyName":"ruleType","mapping":{"CALENDAR":"#/components/schemas/ActivationCalendarRule","RECURRENT":"#/components/schemas/ActivationRecurrentRule","SINGLE":"#/components/schemas/ActivationSingleRule","CONTINUOUS":"#/components/schemas/ContinuousActivationRule"}},"oneOf":[{"$ref":"#/components/schemas/ActivationCalendarRule"},{"$ref":"#/components/schemas/ActivationRecurrentRule"},{"$ref":"#/components/schemas/ActivationSingleRule"},{"$ref":"#/components/schemas/ContinuousActivationRule"}],"properties":{"ruleType":{"$ref":"#/components/schemas/ActivationRuleType"}},"required":["ruleType"]},"ActivationCalendarRule":{"type":"object","allOf":[{"$ref":"#/components/schemas/ActivationRule"},{"type":"object","properties":{"ruleExpression":{"type":"string","minLength":1},"startAt":{"type":"string","format":"date-time"},"endAt":{"type":"string","format":"date-time"},"duration":{"type":"integer","format":"int32","minimum":1}}}],"description":"ActivationCalendarRule","required":["ruleExpression","ruleType","startAt"]},"ActivationRecurrentRule":{"type":"object","allOf":[{"$ref":"#/components/schemas/ActivationRule"},{"type":"object","properties":{"cronExpression":{"type":"string","minLength":1},"startAt":{"type":"string","format":"date-time"},"endAt":{"type":"string","format":"date-time"},"duration":{"type":"integer","format":"int32","minimum":1}}}],"description":"ActivationRecurrentRule","required":["cronExpression","ruleType","startAt"]},"ActivationSingleRule":{"type":"object","allOf":[{"$ref":"#/components/schemas/ActivationRule"},{"type":"object","properties":{"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"}}}],"description":"ActivationSingleRule","required":["ruleType"]},"ContinuousActivationRule":{"type":"object","allOf":[{"$ref":"#/components/schemas/ActivationRule"}],"description":"ContinuousActivationRule","required":["ruleType"]},"ActivationRuleType":{"type":"string","description":"Type of activation rule for a survey or questionnaire","enum":["SINGLE","RECURRENT","CALENDAR","CONTINUOUS"]},"EmployeeCharacteristicValueBoolean":{"allOf":[{"$ref":"#/components/schemas/EmployeeCharacteristicValueBase"},{"type":"object","properties":{"value":{"type":"boolean"}}}]},"EmployeeCharacteristicValueBase":{"type":"object","description":"Base class for employee characteristic values","discriminator":{"propertyName":"questionType","mapping":{"LIST":"#/components/schemas/EmployeeCharacteristicValueList","DATE":"#/components/schemas/EmployeeCharacteristicValueDate","BOOLEAN":"#/components/schemas/EmployeeCharacteristicValueBoolean","TREE":"#/components/schemas/EmployeeCharacteristicValueTree"}},"properties":{"characteristicId":{"type":"string"},"id":{"type":"string"},"questionType":{"$ref":"#/components/schemas/CharacteristicType"}}},"CharacteristicType":{"type":"string","description":"Type of segmentation characteristic","enum":["DATE","LIST","BOOLEAN","TREE"]},"EmployeeCharacteristicValueDate":{"allOf":[{"$ref":"#/components/schemas/EmployeeCharacteristicValueBase"},{"type":"object","properties":{"date":{"type":"string","format":"date-time"},"value":{"type":"string"}}}]},"EmployeeCharacteristicValueList":{"allOf":[{"$ref":"#/components/schemas/EmployeeCharacteristicValueBase"},{"type":"object","properties":{"value":{"type":"string"}}}]},"EmployeeCharacteristicValueTree":{"allOf":[{"$ref":"#/components/schemas/EmployeeCharacteristicValueBase"},{"type":"object","properties":{"value":{"type":"string"},"assignedPath":{"type":"array","items":{"type":"string"}},"assignedOn":{"type":"string","format":"date-time"}}}]},"SurveyStatus":{"type":"string","description":"Status of a survey or questionnaire","enum":["PAUSED","EXPIRED","FUTURE","NOW","ARCHIVED","DRAFT"]},"SurveyRoundDTO":{"type":"object","description":"Survey Round Data Transfer Object","properties":{"id":{"type":"string"},"title":{"$ref":"#/components/schemas/MultiLanguage"},"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"}}},"SurveyBlockDTOAbstractSurveyQuestion":{"type":"object","description":"A survey block containing a list of questions","properties":{"blockId":{"type":"string"},"title":{"$ref":"#/components/schemas/MultiLanguage"},"description":{"$ref":"#/components/schemas/MultiLanguage"},"questions":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/OpenSurveyQuestion"},{"$ref":"#/components/schemas/OptionsSurveyQuestion"},{"$ref":"#/components/schemas/ScaleSurveyQuestion"}]}}}},"OpenSurveyQuestion":{"allOf":[{"$ref":"#/components/schemas/AbstractSurveyQuestion"},{"type":"object","properties":{"requireNotEmpty":{"type":"boolean"}}}],"required":["questionType","representation","title","voteMode"]},"AbstractSurveyQuestion":{"type":"object","description":"Base class for survey questions","discriminator":{"propertyName":"questionType","mapping":{"OPEN":"#/components/schemas/OpenSurveyQuestion","TOPIC":"#/components/schemas/OptionsSurveyQuestion","RANGE":"#/components/schemas/ScaleSurveyQuestion"}},"properties":{"id":{"type":"string"},"title":{"$ref":"#/components/schemas/MultiLanguage"},"questionType":{"$ref":"#/components/schemas/QuestionType"},"order":{"type":"integer","format":"int32"},"visible":{"type":"boolean"},"computeInBlock":{"type":"boolean"},"feedbackEnabled":{"type":"boolean"},"mandatory":{"type":"boolean","deprecated":true},"voteMode":{"$ref":"#/components/schemas/QuestionVoteMode"},"representation":{"type":"string","enum":["IMAGES","OPTIONS","MULTIPLE_OPTIONS","FEEDBACK","SCALE","GRADIENT_SLIDE"]},"values":{"type":"array","items":{"$ref":"#/components/schemas/QuestionValue"},"uniqueItems":true}},"required":["questionType","representation","title","voteMode"]},"QuestionType":{"type":"string","description":"Type of question used in company surveys or questionnaires","enum":["GENERAL","TOPIC","OPEN","RANGE"]},"QuestionVoteMode":{"type":"string","description":"Modes of question voting in a survey or feedback form. Defines whether a question is mandatory, optional, or deferred.","enum":["MANDATORY","OPTIONAL","DEFERRED"]},"QuestionValue":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"score":{"type":"integer","format":"int32"},"label":{"$ref":"#/components/schemas/MultiLanguage"},"imageUrl":{"type":"string"},"color":{"type":"string"}},"required":["id","label","score"]},"OptionsSurveyQuestion":{"allOf":[{"$ref":"#/components/schemas/AbstractSurveyQuestion"},{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/QuestionValue"},"maxItems":2147483647,"minItems":2,"uniqueItems":true},"minSelection":{"type":"integer","format":"int32"},"maxSelection":{"type":"integer","format":"int32"},"multipleChoice":{"type":"boolean"},"minValue":{"$ref":"#/components/schemas/QuestionValue"},"maxValue":{"$ref":"#/components/schemas/QuestionValue"}}}],"required":["questionType","representation","title","voteMode"]},"ScaleSurveyQuestion":{"allOf":[{"$ref":"#/components/schemas/AbstractSurveyQuestion"},{"type":"object","properties":{"firstValue":{"$ref":"#/components/schemas/QuestionValue"},"lastValue":{"$ref":"#/components/schemas/QuestionValue"},"inverted":{"type":"boolean"}}}],"required":["firstValue","lastValue","questionType","representation","title","voteMode"]}}},"paths":{"/api/v1/company/surveys/{surveyId}/reminder":{"post":{"tags":["survey-resource"],"operationId":"surveyRemind","parameters":[{"name":"surveyId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"*/*":{"schema":{"$ref":"#/components/schemas/SurveyRemindRequestDTO"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SurveyDTO"}}}}}}}}}
```

## POST /api/v1/company/surveys/export

>

```json
{"openapi":"3.1.0","info":{"title":"Happyforce API","version":"v1"},"tags":[],"servers":[{"url":"{url}","description":"API URL","variables":{"url":{"description":"API Environment","enum":["https://api.happyforce.com","https://staging.happyforce.com","http://localhost:9000"],"default":"https://api.happyforce.com"}}}],"security":[{"companyAPISessionId":[]}],"components":{"securitySchemes":{"companyAPISessionId":{"type":"apiKey","description":"SessionId","name":"SessionId","in":"header"}},"schemas":{"SurveyDTO":{"type":"object","description":"The details of the survey to be created","properties":{"id":{"type":"string"},"companyId":{"type":"string"},"createdOn":{"type":"string","format":"date-time"},"createdBy":{"type":"string"},"updatedBy":{"type":"string"},"updatedOn":{"type":"string","format":"date-time"},"managerAccessEnabled":{"type":"boolean"},"allowedViewerIds":{"type":"array","description":"Per-survey viewer allow-list: ids of the managers allowed to view this survey's results. Null/empty means every manager of the targeted area may view the results; when populated, only these managers (plus admins/advisors and the creator) may. Serialized as an array of person id strings.","items":{"type":"string"},"uniqueItems":true},"notAnonymous":{"type":"boolean"},"canUpdate":{"type":"boolean"},"canViewResults":{"type":"boolean"},"title":{"$ref":"#/components/schemas/MultiLanguage"},"description":{"$ref":"#/components/schemas/MultiLanguage"},"schedulePlan":{"$ref":"#/components/schemas/SurveySchedulePlanDTO"},"rounds":{"type":"array","items":{"$ref":"#/components/schemas/SurveyRoundDTO"}},"blocks":{"type":"array","items":{"$ref":"#/components/schemas/SurveyBlockDTOAbstractSurveyQuestion"},"minItems":1},"status":{"$ref":"#/components/schemas/SurveyStatus"},"hasReports":{"type":"boolean"}},"required":["blocks","title"]},"MultiLanguage":{"type":"object","description":"A translatable text value: a required default value plus optional per-language overrides keyed by language tag (e.g. \"es\", \"en\", \"pt-BR\"). Consumers resolve the user's language from langValues (falling back to the base language, then to defaultValue).","properties":{"defaultValue":{"type":"string","description":"Fallback text used when there is no entry in langValues for the requested language.","minLength":1},"langValues":{"type":"object","additionalProperties":{"type":"string"},"description":"Per-language overrides keyed by language tag (e.g. \"es\", \"en\", \"pt-BR\")."},"valid":{"type":"boolean"}},"required":["defaultValue"]},"SurveySchedulePlanDTO":{"type":"object","description":"The details of the schedule to be updated","properties":{"roundTitle":{"$ref":"#/components/schemas/MultiLanguage"},"appSurvey":{"type":"boolean"},"mailSurvey":{"type":"boolean"},"communicationTitle":{"$ref":"#/components/schemas/MultiLanguage"},"communicationDescription":{"$ref":"#/components/schemas/MultiLanguage"},"activationRule":{"$ref":"#/components/schemas/ActivationRule"},"hierarchyIds":{"type":"array","items":{"type":"string"},"uniqueItems":true},"characteristics":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/EmployeeCharacteristicValueBoolean"},{"$ref":"#/components/schemas/EmployeeCharacteristicValueDate"},{"$ref":"#/components/schemas/EmployeeCharacteristicValueList"},{"$ref":"#/components/schemas/EmployeeCharacteristicValueTree"}]},"uniqueItems":true},"groupIds":{"type":"array","items":{"type":"string"},"uniqueItems":true},"paused":{"type":"boolean"},"archived":{"type":"boolean"},"mandatory":{"type":"boolean"},"status":{"$ref":"#/components/schemas/SurveyStatus"}},"required":["activationRule"]},"ActivationRule":{"type":"object","description":"Base class for all activation rule types","discriminator":{"propertyName":"ruleType","mapping":{"CALENDAR":"#/components/schemas/ActivationCalendarRule","RECURRENT":"#/components/schemas/ActivationRecurrentRule","SINGLE":"#/components/schemas/ActivationSingleRule","CONTINUOUS":"#/components/schemas/ContinuousActivationRule"}},"oneOf":[{"$ref":"#/components/schemas/ActivationCalendarRule"},{"$ref":"#/components/schemas/ActivationRecurrentRule"},{"$ref":"#/components/schemas/ActivationSingleRule"},{"$ref":"#/components/schemas/ContinuousActivationRule"}],"properties":{"ruleType":{"$ref":"#/components/schemas/ActivationRuleType"}},"required":["ruleType"]},"ActivationCalendarRule":{"type":"object","allOf":[{"$ref":"#/components/schemas/ActivationRule"},{"type":"object","properties":{"ruleExpression":{"type":"string","minLength":1},"startAt":{"type":"string","format":"date-time"},"endAt":{"type":"string","format":"date-time"},"duration":{"type":"integer","format":"int32","minimum":1}}}],"description":"ActivationCalendarRule","required":["ruleExpression","ruleType","startAt"]},"ActivationRecurrentRule":{"type":"object","allOf":[{"$ref":"#/components/schemas/ActivationRule"},{"type":"object","properties":{"cronExpression":{"type":"string","minLength":1},"startAt":{"type":"string","format":"date-time"},"endAt":{"type":"string","format":"date-time"},"duration":{"type":"integer","format":"int32","minimum":1}}}],"description":"ActivationRecurrentRule","required":["cronExpression","ruleType","startAt"]},"ActivationSingleRule":{"type":"object","allOf":[{"$ref":"#/components/schemas/ActivationRule"},{"type":"object","properties":{"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"}}}],"description":"ActivationSingleRule","required":["ruleType"]},"ContinuousActivationRule":{"type":"object","allOf":[{"$ref":"#/components/schemas/ActivationRule"}],"description":"ContinuousActivationRule","required":["ruleType"]},"ActivationRuleType":{"type":"string","description":"Type of activation rule for a survey or questionnaire","enum":["SINGLE","RECURRENT","CALENDAR","CONTINUOUS"]},"EmployeeCharacteristicValueBoolean":{"allOf":[{"$ref":"#/components/schemas/EmployeeCharacteristicValueBase"},{"type":"object","properties":{"value":{"type":"boolean"}}}]},"EmployeeCharacteristicValueBase":{"type":"object","description":"Base class for employee characteristic values","discriminator":{"propertyName":"questionType","mapping":{"LIST":"#/components/schemas/EmployeeCharacteristicValueList","DATE":"#/components/schemas/EmployeeCharacteristicValueDate","BOOLEAN":"#/components/schemas/EmployeeCharacteristicValueBoolean","TREE":"#/components/schemas/EmployeeCharacteristicValueTree"}},"properties":{"characteristicId":{"type":"string"},"id":{"type":"string"},"questionType":{"$ref":"#/components/schemas/CharacteristicType"}}},"CharacteristicType":{"type":"string","description":"Type of segmentation characteristic","enum":["DATE","LIST","BOOLEAN","TREE"]},"EmployeeCharacteristicValueDate":{"allOf":[{"$ref":"#/components/schemas/EmployeeCharacteristicValueBase"},{"type":"object","properties":{"date":{"type":"string","format":"date-time"},"value":{"type":"string"}}}]},"EmployeeCharacteristicValueList":{"allOf":[{"$ref":"#/components/schemas/EmployeeCharacteristicValueBase"},{"type":"object","properties":{"value":{"type":"string"}}}]},"EmployeeCharacteristicValueTree":{"allOf":[{"$ref":"#/components/schemas/EmployeeCharacteristicValueBase"},{"type":"object","properties":{"value":{"type":"string"},"assignedPath":{"type":"array","items":{"type":"string"}},"assignedOn":{"type":"string","format":"date-time"}}}]},"SurveyStatus":{"type":"string","description":"Status of a survey or questionnaire","enum":["PAUSED","EXPIRED","FUTURE","NOW","ARCHIVED","DRAFT"]},"SurveyRoundDTO":{"type":"object","description":"Survey Round Data Transfer Object","properties":{"id":{"type":"string"},"title":{"$ref":"#/components/schemas/MultiLanguage"},"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"}}},"SurveyBlockDTOAbstractSurveyQuestion":{"type":"object","description":"A survey block containing a list of questions","properties":{"blockId":{"type":"string"},"title":{"$ref":"#/components/schemas/MultiLanguage"},"description":{"$ref":"#/components/schemas/MultiLanguage"},"questions":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/OpenSurveyQuestion"},{"$ref":"#/components/schemas/OptionsSurveyQuestion"},{"$ref":"#/components/schemas/ScaleSurveyQuestion"}]}}}},"OpenSurveyQuestion":{"allOf":[{"$ref":"#/components/schemas/AbstractSurveyQuestion"},{"type":"object","properties":{"requireNotEmpty":{"type":"boolean"}}}],"required":["questionType","representation","title","voteMode"]},"AbstractSurveyQuestion":{"type":"object","description":"Base class for survey questions","discriminator":{"propertyName":"questionType","mapping":{"OPEN":"#/components/schemas/OpenSurveyQuestion","TOPIC":"#/components/schemas/OptionsSurveyQuestion","RANGE":"#/components/schemas/ScaleSurveyQuestion"}},"properties":{"id":{"type":"string"},"title":{"$ref":"#/components/schemas/MultiLanguage"},"questionType":{"$ref":"#/components/schemas/QuestionType"},"order":{"type":"integer","format":"int32"},"visible":{"type":"boolean"},"computeInBlock":{"type":"boolean"},"feedbackEnabled":{"type":"boolean"},"mandatory":{"type":"boolean","deprecated":true},"voteMode":{"$ref":"#/components/schemas/QuestionVoteMode"},"representation":{"type":"string","enum":["IMAGES","OPTIONS","MULTIPLE_OPTIONS","FEEDBACK","SCALE","GRADIENT_SLIDE"]},"values":{"type":"array","items":{"$ref":"#/components/schemas/QuestionValue"},"uniqueItems":true}},"required":["questionType","representation","title","voteMode"]},"QuestionType":{"type":"string","description":"Type of question used in company surveys or questionnaires","enum":["GENERAL","TOPIC","OPEN","RANGE"]},"QuestionVoteMode":{"type":"string","description":"Modes of question voting in a survey or feedback form. Defines whether a question is mandatory, optional, or deferred.","enum":["MANDATORY","OPTIONAL","DEFERRED"]},"QuestionValue":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"score":{"type":"integer","format":"int32"},"label":{"$ref":"#/components/schemas/MultiLanguage"},"imageUrl":{"type":"string"},"color":{"type":"string"}},"required":["id","label","score"]},"OptionsSurveyQuestion":{"allOf":[{"$ref":"#/components/schemas/AbstractSurveyQuestion"},{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/QuestionValue"},"maxItems":2147483647,"minItems":2,"uniqueItems":true},"minSelection":{"type":"integer","format":"int32"},"maxSelection":{"type":"integer","format":"int32"},"multipleChoice":{"type":"boolean"},"minValue":{"$ref":"#/components/schemas/QuestionValue"},"maxValue":{"$ref":"#/components/schemas/QuestionValue"}}}],"required":["questionType","representation","title","voteMode"]},"ScaleSurveyQuestion":{"allOf":[{"$ref":"#/components/schemas/AbstractSurveyQuestion"},{"type":"object","properties":{"firstValue":{"$ref":"#/components/schemas/QuestionValue"},"lastValue":{"$ref":"#/components/schemas/QuestionValue"},"inverted":{"type":"boolean"}}}],"required":["firstValue","lastValue","questionType","representation","title","voteMode"]}}},"paths":{"/api/v1/company/surveys/export":{"post":{"tags":["survey-resource"],"operationId":"exportSurveyToXLS","requestBody":{"content":{"*/*":{"schema":{"$ref":"#/components/schemas/SurveyDTO"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{"schema":{"type":"string","format":"binary"}},"*/*":{"schema":{"type":"string","format":"binary"}}}}}}}}}
```

## GET /api/v1/company/surveys/templates

>

```json
{"openapi":"3.1.0","info":{"title":"Happyforce API","version":"v1"},"tags":[],"servers":[{"url":"{url}","description":"API URL","variables":{"url":{"description":"API Environment","enum":["https://api.happyforce.com","https://staging.happyforce.com","http://localhost:9000"],"default":"https://api.happyforce.com"}}}],"security":[{"companyAPISessionId":[]}],"components":{"securitySchemes":{"companyAPISessionId":{"type":"apiKey","description":"SessionId","name":"SessionId","in":"header"}},"schemas":{"SurveyTemplateDTO":{"type":"object","properties":{"id":{"type":"string"},"categoryId":{"type":"string"},"active":{"type":"boolean"},"restrictedToCompanies":{"type":"array","items":{"type":"string"},"uniqueItems":true},"restrictedToIndustries":{"type":"array","items":{"type":"string","enum":["ACCOMMODATION_AND_FOOT_SERVICES","ARTS_ENTERTAINMENT_RECREATION","COMPUTER_SOFTWARE_IT_SERVICES","CONSTRUCTION","EDUCATIONAL_SERVICES","FINANCIAL_SERVICES_INSURANCE","HEALTH_CARE_SOCIAL_ASSISTANCE","MANAGEMENT_CONSULTING","MANUFACTURING","MARKETING_ADVERTISING","NATURAL_RESOURCES","NON_PROFIT_ORGANIZATION","PROFESSIONAL_SCIENTIFIC_AND_TECHNICAL_SERVICES","PUBLIC_AND_GOVERMENT_ADMINISTRATION","REAL_ESTATE_RENTAL_AND_LEASING","TRANSPORTATION_AND_WAREHOUSING","UTILITIES_AND_SERVICES","WHOLESALE_AND_RETAIL_TRADE","OTHER"]},"uniqueItems":true},"title":{"$ref":"#/components/schemas/MultiLanguage"},"description":{"$ref":"#/components/schemas/MultiLanguage"},"catalogTitle":{"$ref":"#/components/schemas/MultiLanguage"},"catalogDescription":{"$ref":"#/components/schemas/MultiLanguage"},"imagePath":{"type":"string"},"blocks":{"type":"array","items":{"$ref":"#/components/schemas/SurveyBlock"}},"usedIn":{"type":"array","items":{"type":"string"},"uniqueItems":true}}},"MultiLanguage":{"type":"object","description":"A translatable text value: a required default value plus optional per-language overrides keyed by language tag (e.g. \"es\", \"en\", \"pt-BR\"). Consumers resolve the user's language from langValues (falling back to the base language, then to defaultValue).","properties":{"defaultValue":{"type":"string","description":"Fallback text used when there is no entry in langValues for the requested language.","minLength":1},"langValues":{"type":"object","additionalProperties":{"type":"string"},"description":"Per-language overrides keyed by language tag (e.g. \"es\", \"en\", \"pt-BR\")."},"valid":{"type":"boolean"}},"required":["defaultValue"]},"SurveyBlock":{"type":"object","properties":{"id":{"type":"string"},"order":{"type":"integer","format":"int32"},"title":{"$ref":"#/components/schemas/MultiLanguage"},"description":{"$ref":"#/components/schemas/MultiLanguage"},"questions":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/OpenSurveyQuestion"},{"$ref":"#/components/schemas/OptionsSurveyQuestion"},{"$ref":"#/components/schemas/ScaleSurveyQuestion"}]},"minItems":1}},"required":["questions","title"]},"OpenSurveyQuestion":{"allOf":[{"$ref":"#/components/schemas/AbstractSurveyQuestion"},{"type":"object","properties":{"requireNotEmpty":{"type":"boolean"}}}],"required":["questionType","representation","title","voteMode"]},"AbstractSurveyQuestion":{"type":"object","description":"Base class for survey questions","discriminator":{"propertyName":"questionType","mapping":{"OPEN":"#/components/schemas/OpenSurveyQuestion","TOPIC":"#/components/schemas/OptionsSurveyQuestion","RANGE":"#/components/schemas/ScaleSurveyQuestion"}},"properties":{"id":{"type":"string"},"title":{"$ref":"#/components/schemas/MultiLanguage"},"questionType":{"$ref":"#/components/schemas/QuestionType"},"order":{"type":"integer","format":"int32"},"visible":{"type":"boolean"},"computeInBlock":{"type":"boolean"},"feedbackEnabled":{"type":"boolean"},"mandatory":{"type":"boolean","deprecated":true},"voteMode":{"$ref":"#/components/schemas/QuestionVoteMode"},"representation":{"type":"string","enum":["IMAGES","OPTIONS","MULTIPLE_OPTIONS","FEEDBACK","SCALE","GRADIENT_SLIDE"]},"values":{"type":"array","items":{"$ref":"#/components/schemas/QuestionValue"},"uniqueItems":true}},"required":["questionType","representation","title","voteMode"]},"QuestionType":{"type":"string","description":"Type of question used in company surveys or questionnaires","enum":["GENERAL","TOPIC","OPEN","RANGE"]},"QuestionVoteMode":{"type":"string","description":"Modes of question voting in a survey or feedback form. Defines whether a question is mandatory, optional, or deferred.","enum":["MANDATORY","OPTIONAL","DEFERRED"]},"QuestionValue":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"score":{"type":"integer","format":"int32"},"label":{"$ref":"#/components/schemas/MultiLanguage"},"imageUrl":{"type":"string"},"color":{"type":"string"}},"required":["id","label","score"]},"OptionsSurveyQuestion":{"allOf":[{"$ref":"#/components/schemas/AbstractSurveyQuestion"},{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/QuestionValue"},"maxItems":2147483647,"minItems":2,"uniqueItems":true},"minSelection":{"type":"integer","format":"int32"},"maxSelection":{"type":"integer","format":"int32"},"multipleChoice":{"type":"boolean"},"minValue":{"$ref":"#/components/schemas/QuestionValue"},"maxValue":{"$ref":"#/components/schemas/QuestionValue"}}}],"required":["questionType","representation","title","voteMode"]},"ScaleSurveyQuestion":{"allOf":[{"$ref":"#/components/schemas/AbstractSurveyQuestion"},{"type":"object","properties":{"firstValue":{"$ref":"#/components/schemas/QuestionValue"},"lastValue":{"$ref":"#/components/schemas/QuestionValue"},"inverted":{"type":"boolean"}}}],"required":["firstValue","lastValue","questionType","representation","title","voteMode"]}}},"paths":{"/api/v1/company/surveys/templates":{"get":{"tags":["survey-resource"],"operationId":"getSurveyTemplates_1","parameters":[{"name":"categoryId","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SurveyTemplateDTO"}}}}}}}}}}
```

## GET /api/v1/company/surveys/templates/{templateId}

>

```json
{"openapi":"3.1.0","info":{"title":"Happyforce API","version":"v1"},"tags":[],"servers":[{"url":"{url}","description":"API URL","variables":{"url":{"description":"API Environment","enum":["https://api.happyforce.com","https://staging.happyforce.com","http://localhost:9000"],"default":"https://api.happyforce.com"}}}],"security":[{"companyAPISessionId":[]}],"components":{"securitySchemes":{"companyAPISessionId":{"type":"apiKey","description":"SessionId","name":"SessionId","in":"header"}},"schemas":{"SurveyTemplateDTO":{"type":"object","properties":{"id":{"type":"string"},"categoryId":{"type":"string"},"active":{"type":"boolean"},"restrictedToCompanies":{"type":"array","items":{"type":"string"},"uniqueItems":true},"restrictedToIndustries":{"type":"array","items":{"type":"string","enum":["ACCOMMODATION_AND_FOOT_SERVICES","ARTS_ENTERTAINMENT_RECREATION","COMPUTER_SOFTWARE_IT_SERVICES","CONSTRUCTION","EDUCATIONAL_SERVICES","FINANCIAL_SERVICES_INSURANCE","HEALTH_CARE_SOCIAL_ASSISTANCE","MANAGEMENT_CONSULTING","MANUFACTURING","MARKETING_ADVERTISING","NATURAL_RESOURCES","NON_PROFIT_ORGANIZATION","PROFESSIONAL_SCIENTIFIC_AND_TECHNICAL_SERVICES","PUBLIC_AND_GOVERMENT_ADMINISTRATION","REAL_ESTATE_RENTAL_AND_LEASING","TRANSPORTATION_AND_WAREHOUSING","UTILITIES_AND_SERVICES","WHOLESALE_AND_RETAIL_TRADE","OTHER"]},"uniqueItems":true},"title":{"$ref":"#/components/schemas/MultiLanguage"},"description":{"$ref":"#/components/schemas/MultiLanguage"},"catalogTitle":{"$ref":"#/components/schemas/MultiLanguage"},"catalogDescription":{"$ref":"#/components/schemas/MultiLanguage"},"imagePath":{"type":"string"},"blocks":{"type":"array","items":{"$ref":"#/components/schemas/SurveyBlock"}},"usedIn":{"type":"array","items":{"type":"string"},"uniqueItems":true}}},"MultiLanguage":{"type":"object","description":"A translatable text value: a required default value plus optional per-language overrides keyed by language tag (e.g. \"es\", \"en\", \"pt-BR\"). Consumers resolve the user's language from langValues (falling back to the base language, then to defaultValue).","properties":{"defaultValue":{"type":"string","description":"Fallback text used when there is no entry in langValues for the requested language.","minLength":1},"langValues":{"type":"object","additionalProperties":{"type":"string"},"description":"Per-language overrides keyed by language tag (e.g. \"es\", \"en\", \"pt-BR\")."},"valid":{"type":"boolean"}},"required":["defaultValue"]},"SurveyBlock":{"type":"object","properties":{"id":{"type":"string"},"order":{"type":"integer","format":"int32"},"title":{"$ref":"#/components/schemas/MultiLanguage"},"description":{"$ref":"#/components/schemas/MultiLanguage"},"questions":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/OpenSurveyQuestion"},{"$ref":"#/components/schemas/OptionsSurveyQuestion"},{"$ref":"#/components/schemas/ScaleSurveyQuestion"}]},"minItems":1}},"required":["questions","title"]},"OpenSurveyQuestion":{"allOf":[{"$ref":"#/components/schemas/AbstractSurveyQuestion"},{"type":"object","properties":{"requireNotEmpty":{"type":"boolean"}}}],"required":["questionType","representation","title","voteMode"]},"AbstractSurveyQuestion":{"type":"object","description":"Base class for survey questions","discriminator":{"propertyName":"questionType","mapping":{"OPEN":"#/components/schemas/OpenSurveyQuestion","TOPIC":"#/components/schemas/OptionsSurveyQuestion","RANGE":"#/components/schemas/ScaleSurveyQuestion"}},"properties":{"id":{"type":"string"},"title":{"$ref":"#/components/schemas/MultiLanguage"},"questionType":{"$ref":"#/components/schemas/QuestionType"},"order":{"type":"integer","format":"int32"},"visible":{"type":"boolean"},"computeInBlock":{"type":"boolean"},"feedbackEnabled":{"type":"boolean"},"mandatory":{"type":"boolean","deprecated":true},"voteMode":{"$ref":"#/components/schemas/QuestionVoteMode"},"representation":{"type":"string","enum":["IMAGES","OPTIONS","MULTIPLE_OPTIONS","FEEDBACK","SCALE","GRADIENT_SLIDE"]},"values":{"type":"array","items":{"$ref":"#/components/schemas/QuestionValue"},"uniqueItems":true}},"required":["questionType","representation","title","voteMode"]},"QuestionType":{"type":"string","description":"Type of question used in company surveys or questionnaires","enum":["GENERAL","TOPIC","OPEN","RANGE"]},"QuestionVoteMode":{"type":"string","description":"Modes of question voting in a survey or feedback form. Defines whether a question is mandatory, optional, or deferred.","enum":["MANDATORY","OPTIONAL","DEFERRED"]},"QuestionValue":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"score":{"type":"integer","format":"int32"},"label":{"$ref":"#/components/schemas/MultiLanguage"},"imageUrl":{"type":"string"},"color":{"type":"string"}},"required":["id","label","score"]},"OptionsSurveyQuestion":{"allOf":[{"$ref":"#/components/schemas/AbstractSurveyQuestion"},{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/QuestionValue"},"maxItems":2147483647,"minItems":2,"uniqueItems":true},"minSelection":{"type":"integer","format":"int32"},"maxSelection":{"type":"integer","format":"int32"},"multipleChoice":{"type":"boolean"},"minValue":{"$ref":"#/components/schemas/QuestionValue"},"maxValue":{"$ref":"#/components/schemas/QuestionValue"}}}],"required":["questionType","representation","title","voteMode"]},"ScaleSurveyQuestion":{"allOf":[{"$ref":"#/components/schemas/AbstractSurveyQuestion"},{"type":"object","properties":{"firstValue":{"$ref":"#/components/schemas/QuestionValue"},"lastValue":{"$ref":"#/components/schemas/QuestionValue"},"inverted":{"type":"boolean"}}}],"required":["firstValue","lastValue","questionType","representation","title","voteMode"]}}},"paths":{"/api/v1/company/surveys/templates/{templateId}":{"get":{"tags":["survey-resource"],"operationId":"getSurveyTemplate_1","parameters":[{"name":"templateId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SurveyTemplateDTO"}}}}}}}}}
```

## GET /api/v1/company/surveys/templates/categories

>

```json
{"openapi":"3.1.0","info":{"title":"Happyforce API","version":"v1"},"tags":[],"servers":[{"url":"{url}","description":"API URL","variables":{"url":{"description":"API Environment","enum":["https://api.happyforce.com","https://staging.happyforce.com","http://localhost:9000"],"default":"https://api.happyforce.com"}}}],"security":[{"companyAPISessionId":[]}],"components":{"securitySchemes":{"companyAPISessionId":{"type":"apiKey","description":"SessionId","name":"SessionId","in":"header"}},"schemas":{"SurveyTemplateCategoryDTO":{"type":"object","properties":{"id":{"type":"string"},"name":{"$ref":"#/components/schemas/MultiLanguage"},"description":{"$ref":"#/components/schemas/MultiLanguage"},"color":{"type":"string"},"iconPath":{"type":"string"}}},"MultiLanguage":{"type":"object","description":"A translatable text value: a required default value plus optional per-language overrides keyed by language tag (e.g. \"es\", \"en\", \"pt-BR\"). Consumers resolve the user's language from langValues (falling back to the base language, then to defaultValue).","properties":{"defaultValue":{"type":"string","description":"Fallback text used when there is no entry in langValues for the requested language.","minLength":1},"langValues":{"type":"object","additionalProperties":{"type":"string"},"description":"Per-language overrides keyed by language tag (e.g. \"es\", \"en\", \"pt-BR\")."},"valid":{"type":"boolean"}},"required":["defaultValue"]}}},"paths":{"/api/v1/company/surveys/templates/categories":{"get":{"tags":["survey-resource"],"operationId":"getTemplateSurveyCategories","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SurveyTemplateCategoryDTO"}}}}}}}}}}
```
