> 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/vote.md).

# Vote

## GET /api/v1/employee/vote/{employeeId}

> Get the vote results

```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":[{"employeeAPISessionId":[]}],"components":{"securitySchemes":{},"schemas":{"BaseStatsResultDTO":{"type":"object","description":"Base stats result: date range, total comments, total votes, hierarchy name.","properties":{"from":{"type":"string","format":"date-time","description":"Start date of the period"},"to":{"type":"string","format":"date-time","description":"End date of the period"},"totalComments":{"type":"integer","format":"int64","description":"Total number of comments"},"totalVotes":{"type":"integer","format":"int64","description":"Total number of votes"},"hierarchyName":{"type":"string","description":"Name of the hierarchy (area) this result applies to"},"companyEmployeeQuestion":{"$ref":"#/components/schemas/QuestionInfoDTO"},"questionType":{"type":"string"}}},"QuestionInfoDTO":{"type":"object","description":"Question info (summary): id, title, type, values, date range, representation, feedback mode, max comment length, feedback types.","properties":{"id":{"type":"string","description":"Question identifier"},"title":{"type":"string","description":"Question title"},"questionType":{"$ref":"#/components/schemas/QuestionType","description":"Question type (e.g. HI, CHECK_IN)"},"values":{"type":"array","description":"Available values/options","items":{"$ref":"#/components/schemas/QuestionValueDTO"},"uniqueItems":true},"from":{"type":"string","format":"date-time","description":"Start date of the question period"},"to":{"type":"string","format":"date-time","description":"End date of the question period"},"representation":{"type":"string","description":"How the question is represented (e.g. scale, list)","enum":["IMAGES","OPTIONS","MULTIPLE_OPTIONS","FEEDBACK","SCALE","GRADIENT_SLIDE"]},"feedbackMode":{"$ref":"#/components/schemas/FeedbackMode","description":"Feedback mode for comments"},"maxCommentLength":{"type":"integer","format":"int32","description":"Maximum comment length"},"feedbackTypes":{"type":"array","description":"Feedback types available for this question","items":{"$ref":"#/components/schemas/QuestionFeedbackDTO"},"uniqueItems":true}}},"QuestionType":{"type":"string","description":"Type of question used in company surveys or questionnaires","enum":["GENERAL","TOPIC","OPEN","RANGE"]},"QuestionValueDTO":{"type":"object","description":"Option or value for a question (e.g. scale value, choice): id, score, value, image, color.","properties":{"id":{"type":"integer","format":"int32","description":"Value identifier"},"score":{"type":"integer","format":"int32","description":"Numeric score when applicable (e.g. for scales)"},"value":{"type":"string","description":"Display value (label)"},"imageUrl":{"type":"string","description":"URL of the image for this value"},"color":{"type":"string","description":"Color code for this value (e.g. for UI)"},"reflectionPrompt":{"type":"string","description":"Reflection prompt, in case the question has an additional comment option enabled"}}},"FeedbackMode":{"type":"string","enum":["ON_VOTE","AFTER_VOTE","ON_AND_AFTER_VOTE","NO_FEEDBACK","INLINE"]},"QuestionFeedbackDTO":{"type":"object","description":"Feedback type configuration for a question: type, privacy, signature, max length, target, image.","properties":{"feedbackType":{"$ref":"#/components/schemas/FeedbackType","description":"Feedback type (e.g. SUGGESTION, RECOGNITION)"},"privateEnabled":{"type":"boolean","description":"Whether private comments are enabled"},"nonAnonymousEnabled":{"type":"boolean","description":"Whether non-anonymous (signed) comments are enabled"},"maxCommentLength":{"type":"integer","format":"int32","description":"Maximum comment length (default 3000)"},"targeted":{"type":"boolean","description":"Whether comments can be targeted (e.g. to a person or area)"},"imageURL":{"type":"string","description":"URL of the image for this feedback type"}}},"FeedbackType":{"type":"string","description":"Type of feedback","enum":["RECOGNITION","CONGRATULATION","SUGGESTION","INFORMATION","CRITICISM","OTHER","SCORE","ENPS","CLASSIFICATION_FOLLOWUP","QUESTION","SURVEY","ANNOUNCEMENT_COMMENT"]}}},"paths":{"/api/v1/employee/vote/{employeeId}":{"get":{"tags":["Vote"],"description":"Get the vote results","operationId":"getVoteResults","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BaseStatsResultDTO"}}}}}},"deprecated":true}}}}
```

## POST /api/v1/employee/vote/{employeeId}

> Performs an employee vote, and return the results

```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":[{"employeeAPISessionId":[]}],"components":{"securitySchemes":{},"schemas":{"EmployeeVote":{"type":"object","properties":{"questionId":{"type":"string"},"selectedValue":{"type":"integer","format":"int32"},"selectedValues":{"type":"array","items":{"type":"integer","format":"int32"},"uniqueItems":true},"message":{"type":"string"},"date":{"type":"string","format":"date-time"},"feedbackType":{"$ref":"#/components/schemas/FeedbackType"},"additionalFields":{"type":"object","additionalProperties":{}},"privated":{"type":"boolean"},"notAnonymous":{"type":"boolean"}}},"FeedbackType":{"type":"string","description":"Type of feedback","enum":["RECOGNITION","CONGRATULATION","SUGGESTION","INFORMATION","CRITICISM","OTHER","SCORE","ENPS","CLASSIFICATION_FOLLOWUP","QUESTION","SURVEY","ANNOUNCEMENT_COMMENT"]},"VoteResult":{"type":"object","description":"Result of a vote: extra content to show after voting (e.g. quote, celebration).","properties":{"afterVote":{"$ref":"#/components/schemas/ExtraContentType","description":"Type of extra content to display after the vote"}}},"ExtraContentType":{"type":"string","description":"Type of extra content (quote, birthday, work anniversary, etc.)","enum":["HAS_QUOTE","HAS_BIRTHDAY","HAS_WORK_ANNIVERSARY","cookie","NONE","VOTE_STORE"]}}},"paths":{"/api/v1/employee/vote/{employeeId}":{"post":{"tags":["Vote"],"description":"Performs an employee vote, and return the results","operationId":"employeeVote","requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EmployeeVote"}}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoteResult"}}}}}}}}}
```

## DELETE /api/v1/employee/vote/{employeeId}

> Delete the vote results of the current day

```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":[{"employeeAPISessionId":[]}],"components":{"securitySchemes":{},"schemas":{"BaseStatsResultDTO":{"type":"object","description":"Base stats result: date range, total comments, total votes, hierarchy name.","properties":{"from":{"type":"string","format":"date-time","description":"Start date of the period"},"to":{"type":"string","format":"date-time","description":"End date of the period"},"totalComments":{"type":"integer","format":"int64","description":"Total number of comments"},"totalVotes":{"type":"integer","format":"int64","description":"Total number of votes"},"hierarchyName":{"type":"string","description":"Name of the hierarchy (area) this result applies to"},"companyEmployeeQuestion":{"$ref":"#/components/schemas/QuestionInfoDTO"},"questionType":{"type":"string"}}},"QuestionInfoDTO":{"type":"object","description":"Question info (summary): id, title, type, values, date range, representation, feedback mode, max comment length, feedback types.","properties":{"id":{"type":"string","description":"Question identifier"},"title":{"type":"string","description":"Question title"},"questionType":{"$ref":"#/components/schemas/QuestionType","description":"Question type (e.g. HI, CHECK_IN)"},"values":{"type":"array","description":"Available values/options","items":{"$ref":"#/components/schemas/QuestionValueDTO"},"uniqueItems":true},"from":{"type":"string","format":"date-time","description":"Start date of the question period"},"to":{"type":"string","format":"date-time","description":"End date of the question period"},"representation":{"type":"string","description":"How the question is represented (e.g. scale, list)","enum":["IMAGES","OPTIONS","MULTIPLE_OPTIONS","FEEDBACK","SCALE","GRADIENT_SLIDE"]},"feedbackMode":{"$ref":"#/components/schemas/FeedbackMode","description":"Feedback mode for comments"},"maxCommentLength":{"type":"integer","format":"int32","description":"Maximum comment length"},"feedbackTypes":{"type":"array","description":"Feedback types available for this question","items":{"$ref":"#/components/schemas/QuestionFeedbackDTO"},"uniqueItems":true}}},"QuestionType":{"type":"string","description":"Type of question used in company surveys or questionnaires","enum":["GENERAL","TOPIC","OPEN","RANGE"]},"QuestionValueDTO":{"type":"object","description":"Option or value for a question (e.g. scale value, choice): id, score, value, image, color.","properties":{"id":{"type":"integer","format":"int32","description":"Value identifier"},"score":{"type":"integer","format":"int32","description":"Numeric score when applicable (e.g. for scales)"},"value":{"type":"string","description":"Display value (label)"},"imageUrl":{"type":"string","description":"URL of the image for this value"},"color":{"type":"string","description":"Color code for this value (e.g. for UI)"},"reflectionPrompt":{"type":"string","description":"Reflection prompt, in case the question has an additional comment option enabled"}}},"FeedbackMode":{"type":"string","enum":["ON_VOTE","AFTER_VOTE","ON_AND_AFTER_VOTE","NO_FEEDBACK","INLINE"]},"QuestionFeedbackDTO":{"type":"object","description":"Feedback type configuration for a question: type, privacy, signature, max length, target, image.","properties":{"feedbackType":{"$ref":"#/components/schemas/FeedbackType","description":"Feedback type (e.g. SUGGESTION, RECOGNITION)"},"privateEnabled":{"type":"boolean","description":"Whether private comments are enabled"},"nonAnonymousEnabled":{"type":"boolean","description":"Whether non-anonymous (signed) comments are enabled"},"maxCommentLength":{"type":"integer","format":"int32","description":"Maximum comment length (default 3000)"},"targeted":{"type":"boolean","description":"Whether comments can be targeted (e.g. to a person or area)"},"imageURL":{"type":"string","description":"URL of the image for this feedback type"}}},"FeedbackType":{"type":"string","description":"Type of feedback","enum":["RECOGNITION","CONGRATULATION","SUGGESTION","INFORMATION","CRITICISM","OTHER","SCORE","ENPS","CLASSIFICATION_FOLLOWUP","QUESTION","SURVEY","ANNOUNCEMENT_COMMENT"]}}},"paths":{"/api/v1/employee/vote/{employeeId}":{"delete":{"tags":["Vote"],"description":"Delete the vote results of the current day","operationId":"resetTodayVoteResults","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BaseStatsResultDTO"}}}}}}}}}}
```

## POST /api/v1/employee/vote/{employeeId}/verify

> Checks a reply for moderation before posting

```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":[{"employeeAPISessionId":[]}],"components":{"securitySchemes":{},"schemas":{"EmployeeVote":{"type":"object","properties":{"questionId":{"type":"string"},"selectedValue":{"type":"integer","format":"int32"},"selectedValues":{"type":"array","items":{"type":"integer","format":"int32"},"uniqueItems":true},"message":{"type":"string"},"date":{"type":"string","format":"date-time"},"feedbackType":{"$ref":"#/components/schemas/FeedbackType"},"additionalFields":{"type":"object","additionalProperties":{}},"privated":{"type":"boolean"},"notAnonymous":{"type":"boolean"}}},"FeedbackType":{"type":"string","description":"Type of feedback","enum":["RECOGNITION","CONGRATULATION","SUGGESTION","INFORMATION","CRITICISM","OTHER","SCORE","ENPS","CLASSIFICATION_FOLLOWUP","QUESTION","SURVEY","ANNOUNCEMENT_COMMENT"]},"FeedbackVerificationResultDTO":{"type":"object","description":"Result of feedback verification/moderation: result type, moderation action, and optional message/suggestion.","properties":{"result":{"$ref":"#/components/schemas/VerificationResultType","description":"Verification result"},"moderationType":{"$ref":"#/components/schemas/ModerationType","description":"Moderation type applied"},"message":{"type":"string","description":"Optional message (e.g. reason for block)"},"suggestion":{"type":"string","description":"Optional suggestion for the user (e.g. when moderation type is SUGGESTION)"}}},"VerificationResultType":{"type":"string","description":"Verification outcome: VALID, INPROPER_IMAGE, INPROPER_TEXT, OTHER","enum":["VALID","INPROPER_IMAGE","INPROPER_TEXT","OTHER"]},"ModerationType":{"type":"string","description":"Moderation action: SUGGESTION (suggest change) or BLOCK","enum":["SUGGESTION","BLOCK"]}}},"paths":{"/api/v1/employee/vote/{employeeId}/verify":{"post":{"tags":["Vote"],"description":"Checks a reply for moderation before posting","operationId":"verifySurveyComment","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmployeeVote"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedbackVerificationResultDTO"}}}}}}}}}
```

## POST /api/v1/employee/vote/{employeeId}/comment

> Adds a comment to a vote the employee already cast for a question (two-step flow: vote first, comment after)

```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":[{"employeeAPISessionId":[]}],"components":{"securitySchemes":{},"schemas":{"VoteCommentRequest":{"type":"object","description":"Comment to attach to a vote already cast for a question","properties":{"questionId":{"type":"string","description":"Question the vote (and therefore the comment) belongs to"},"date":{"type":"string","format":"date-time","description":"Emission date of the comment"},"message":{"type":"string","description":"Comment text"}},"required":["message","questionId"]}}},"paths":{"/api/v1/employee/vote/{employeeId}/comment":{"post":{"tags":["Vote"],"description":"Adds a comment to a vote the employee already cast for a question (two-step flow: vote first, comment after)","operationId":"addVoteComment","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoteCommentRequest"}}},"required":true},"responses":{"200":{"description":"OK"}}}}}}
```

## GET /api/v1/employee/vote/{employeeId}/questions

> Get's the pending to answer questions for an employee

```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":[{"employeeAPISessionId":[]}],"components":{"securitySchemes":{},"schemas":{"QuestionDTO":{"type":"object","description":"The details of the question to be created","properties":{"id":{"type":"string"},"title":{"$ref":"#/components/schemas/MultiLanguage"},"primary":{"type":"boolean"},"createdOn":{"type":"string","format":"date-time"},"activationDate":{"type":"string","format":"date-time"},"createdBy":{"type":"string"},"updatedBy":{"type":"string"},"questionType":{"$ref":"#/components/schemas/QuestionType"},"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},"values":{"type":"array","items":{"$ref":"#/components/schemas/QuestionValue"},"uniqueItems":true},"resultValues":{"type":"array","items":{"$ref":"#/components/schemas/QuestionValue"},"uniqueItems":true},"notifyByPush":{"type":"boolean"},"notifyByMail":{"type":"boolean"},"notified":{"type":"boolean"},"privated":{"type":"boolean"},"nonAnonymous":{"type":"boolean"},"requireNotEmpty":{"type":"boolean","deprecated":true},"mandatory":{"type":"boolean","deprecated":true},"voteMode":{"$ref":"#/components/schemas/QuestionVoteMode"},"feedbackEnabled":{"type":"boolean"},"minSelection":{"type":"integer","format":"int32"},"maxSelection":{"type":"integer","format":"int32"},"status":{"$ref":"#/components/schemas/QuestionStatus"},"activationRule":{"$ref":"#/components/schemas/QuestionActivationRuleDTO"},"activations":{"type":"array","items":{"$ref":"#/components/schemas/QuestionActivationDTO"},"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"]},"QuestionType":{"type":"string","description":"Type of question used in company surveys or questionnaires","enum":["GENERAL","TOPIC","OPEN","RANGE"]},"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"}}}]},"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"]},"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"]},"QuestionStatus":{"type":"string","description":"Status of a question in a survey or questionnaire","enum":["ANY","ACTIVE","PENDING","EXPIRED","PAUSED","ARCHIVED"]},"QuestionActivationRuleDTO":{"type":"object","properties":{"ruleType":{"$ref":"#/components/schemas/ActivationRuleType"},"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"},"cronExpression":{"type":"string"},"startAt":{"type":"string","format":"date-time"},"endAt":{"type":"string","format":"date-time"},"duration":{"type":"integer","format":"int32"}}},"ActivationRuleType":{"type":"string","description":"Type of activation rule for a survey or questionnaire","enum":["SINGLE","RECURRENT","CALENDAR","CONTINUOUS"]},"QuestionActivationDTO":{"type":"object","properties":{"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"}}}}},"paths":{"/api/v1/employee/vote/{employeeId}/questions":{"get":{"tags":["Vote"],"description":"Get's the pending to answer questions for an employee","operationId":"getEmployeeQuestions","parameters":[{"name":"applySaturationPolicies","in":"query","required":false,"schema":{"type":"boolean","default":true}},{"name":"surveyId","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/QuestionDTO"}}}}}}}}}}
```
