Questionnaire

Save or update an answer to a question

Changed on
post/api/questionnaire/answer

Request

  • Base URL
    https://api.rewritelifestyle.ai (the document declares no server; this is the origin it was published from)
  • URL
    https://api.rewritelifestyle.ai/api/questionnaire/answer
  • Auth
    HTTP bearer

Request body

questionIdnumber required

ID of the question being answered

selectedOptionIdobject

Single selected option ID (for single_choice questions)

selectedOptionIdsobject

Array of selected option IDs (for multi_choice questions)

customAnswerobject

Custom text answer (for free_text, numeric, date, or "Other" specify)

customAnswerListobject

Array answer (for repeatable_list questions)

Example request

{
  "questionId": 5
}

Response

Answer saved or updated (upsert)

Changes