> ## Documentation Index
> Fetch the complete documentation index at: https://apidocs.sesametime.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Answer a candidate recruitment evaluation

> Submit answers for a candidate recruitment evaluation. Each answer must include either 'questionOptionIds' for choice-based questions or 'answer' for text-based questions, but not both. The required field depends on the question type:

**Choice-based questions** (require questionOptionIds):
- radio: Single choice selection
- check: Multiple choice selection
- faces: Emoji/face rating selection
- range: Numeric range selection
- ranking: Order-based selection
- stars: Star rating selection
- organization_chart: Organizational hierarchy selection

**Text-based questions** (require answer):
- text: Free text response
- float: Numeric value input



## OpenAPI

````yaml POST /poll/v1/evaluations/candidate-recruitment/{evaluationId}
openapi: 3.0.0
info:
  description: ''
  version: 3.0.0
  title: Sesame Public API
servers:
  - url: https://api-{region}.sesametime.com
    variables:
      region:
        default: eu1
security: []
tags: []
paths:
  /poll/v1/evaluations/candidate-recruitment/{evaluationId}:
    post:
      tags:
        - Polls
      summary: Answer a candidate recruitment evaluation
      description: >-
        Submit answers for a candidate recruitment evaluation. Each answer must
        include either 'questionOptionIds' for choice-based questions or
        'answer' for text-based questions, but not both. The required field
        depends on the question type:


        **Choice-based questions** (require questionOptionIds):

        - radio: Single choice selection

        - check: Multiple choice selection

        - faces: Emoji/face rating selection

        - range: Numeric range selection

        - ranking: Order-based selection

        - stars: Star rating selection

        - organization_chart: Organizational hierarchy selection


        **Text-based questions** (require answer):

        - text: Free text response

        - float: Numeric value input
      operationId: AnswerCandidateRecruitmentEvaluation
      parameters:
        - in: path
          name: evaluationId
          description: Evaluation ID
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        description: Recruitment evaluation that needs to be answered
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                answers:
                  type: array
                  description: Array of answers for the evaluation questions
                  items:
                    type: object
                    properties:
                      questionId:
                        type: string
                        format: uuid
                        description: Unique identifier of the question being answered
                      questionOptionIds:
                        type: array
                        items:
                          type: string
                          format: uuid
                        description: >-
                          Array of selected option IDs. Required for
                          choice-based question types: radio, check, faces,
                          range, ranking, stars, organization_chart. Should be
                          null or empty for text-based questions.
                      answer:
                        type: string
                        description: >-
                          Free text response. Required for text-based question
                          types: text, float. Should be null or empty for
                          choice-based questions.
                        example: The response of a text question
                    required:
                      - questionId
                    anyOf:
                      - description: >-
                          For choice-based questions (radio, check, faces,
                          range, ranking, stars, organization_chart):
                          questionOptionIds is required
                        required:
                          - questionOptionIds
                        properties:
                          questionOptionIds:
                            minItems: 1
                      - description: >-
                          For text-based questions (text, float): answer is
                          required
                        required:
                          - answer
                        properties:
                          answer:
                            minLength: 1
                candidateId:
                  type: string
                  format: uuid
            examples:
              mixed_question_types:
                summary: Mixed question types example
                description: >-
                  Example showing different question types with proper field
                  usage
                value:
                  candidateId: 123e4567-e89b-12d3-a456-426614174000
                  answers:
                    - questionId: 123e4567-e89b-12d3-a456-426614174001
                      questionOptionIds:
                        - 123e4567-e89b-12d3-a456-426614174010
                      comment: Answer for radio question - single choice
                    - questionId: 123e4567-e89b-12d3-a456-426614174002
                      questionOptionIds:
                        - 123e4567-e89b-12d3-a456-426614174011
                        - 123e4567-e89b-12d3-a456-426614174012
                      comment: Answer for check question - multiple choices
                    - questionId: 123e4567-e89b-12d3-a456-426614174003
                      answer: >-
                        The candidate demonstrates excellent communication
                        skills and works well in team environments.
                      comment: Answer for text question - free text response
                    - questionId: 123e4567-e89b-12d3-a456-426614174004
                      answer: '8.5'
                      comment: Answer for float question - numeric value
                    - questionId: 123e4567-e89b-12d3-a456-426614174005
                      questionOptionIds:
                        - 123e4567-e89b-12d3-a456-426614174015
                      comment: Answer for stars question - star rating
              text_questions_only:
                summary: Text-based questions only
                description: Example with only text and float questions
                value:
                  candidateId: 123e4567-e89b-12d3-a456-426614174000
                  answers:
                    - questionId: 123e4567-e89b-12d3-a456-426614174006
                      answer: >-
                        I have 5 years of experience in software development,
                        primarily working with JavaScript and React.
                    - questionId: 123e4567-e89b-12d3-a456-426614174007
                      answer: '7.5'
              choice_questions_only:
                summary: Choice-based questions only
                description: Example with only choice-based questions
                value:
                  candidateId: 123e4567-e89b-12d3-a456-426614174000
                  answers:
                    - questionId: 123e4567-e89b-12d3-a456-426614174008
                      questionOptionIds:
                        - 123e4567-e89b-12d3-a456-426614174020
                    - questionId: 123e4567-e89b-12d3-a456-426614174009
                      questionOptionIds:
                        - 123e4567-e89b-12d3-a456-426614174021
                        - 123e4567-e89b-12d3-a456-426614174022
      responses:
        '204':
          description: No Content
          content: {}
        '400':
          description: Bad Request - The request was invalid or cannot be served
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message describing what went wrong
                    example: Validation failed for the provided data
                  errors:
                    type: array
                    description: List of specific validation errors
                    items:
                      type: object
                      properties:
                        field:
                          type: string
                          description: The field that caused the error
                          example: questionId
                        message:
                          type: string
                          description: Specific error message for the field
                          example: This value is not a valid UUID.
              example:
                message: Validation failed
                errors:
                  - field: questionId
                    message: This value is not a valid UUID.
                  - field: answer
                    message: This field is required for text-based questions.
        '404':
          description: Not Found - The requested resource could not be found
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message indicating the resource was not found
                    example: Evaluation not found
                  code:
                    type: string
                    description: Error code for programmatic handling
                    example: EVALUATION_NOT_FOUND
              example:
                message: >-
                  Evaluation with ID 123e4567-e89b-12d3-a456-426614174000 was
                  not found
                code: EVALUATION_NOT_FOUND
        '409':
          description: >-
            Conflict - The request conflicts with the current state of the
            server
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message describing the conflict
                    example: Evaluation has already been completed
                  code:
                    type: string
                    description: Error code for programmatic handling
                    example: EVALUATION_ALREADY_COMPLETED
                  conflictDetails:
                    type: object
                    description: Additional details about the conflict
                    properties:
                      currentState:
                        type: string
                        description: Current state that conflicts with the request
                        example: completed
                      completedAt:
                        type: string
                        format: date-time
                        description: When the evaluation was completed
                        example: '2024-01-15T10:30:00Z'
              example:
                message: >-
                  Cannot submit answers for an evaluation that has already been
                  completed
                code: EVALUATION_ALREADY_COMPLETED
                conflictDetails:
                  currentState: completed
                  completedAt: '2024-01-15T10:30:00Z'
      security:
        - Bearer: []
components:
  securitySchemes:
    Bearer:
      type: http
      scheme: bearer
      bearerFormat: JWT

````