Create Question

​

Create a question in a questionnaire.

  • Automatically assigns the next question_order within the specified questionnaire.
  • Forces is_system=false for created questions.

Args: question: Question payload (questionnaireId is required). user: Authenticated user context.

Returns: SCOQuestionExtendedOutput: Created question object.

Body·

required
application/json
  • Is question mandatory

  • Is success criteria

  • Questionnaire ID

  • Question order

  • Question text

  • Response type

    Properties: 1
  • Deal ID

  • Autofill config (DreamerFlow JSON)

    Properties: 1
  • Field name

  • Dreamer autofill enabled

  • Draft (hidden until published)

  • Is custom

Responses

  • application/json
  • application/json
Request Example for post/questionnaires/questions
curl https://crm.dreamhub.ai/api/v1/settings/questionnaires/questions \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "questionText": "",
  "questionnaireId": "",
  "responseType": {
    "additionalProperty": "anything"
  },
  "questionOrder": 1,
  "isMandatory": true,
  "isSuccessCriteria": true,
  "section": 1,
  "tooltipText": "",
  "fieldName": "",
  "isSystem": true,
  "relatedQuestionId": "",
  "dealId": "",
  "isDraft": false,
  "filledByDreamer": true,
  "dreamerFlow": {
    "additionalProperty": "anything"
  }
}'
{
  "id": "string",
  "questionText": "string",
  "questionnaireId": "string",
  "responseType": {
    "additionalProperty": "anything"
  },
  "questionOrder": 1,
  "isMandatory": true,
  "isSuccessCriteria": true,
  "section": 1,
  "tooltipText": "string",
  "fieldName": "string",
  "isSystem": true,
  "relatedQuestionId": "string",
  "dealId": "string",
  "filledByDreamer": true,
  "dreamerFlow": {
    "additionalProperty": "anything"
  },
  "isDraft": true
}