Get a SurveyOL token, use OpenClaw to create a survey, and distribute invitations by email. See the workflow

Question Types

This page reflects validation and defaults from Scripts/custom/shared/question/question.*.js.

requireAnswer defaults to false when omitted.

Star Rating

Required properties:

  • title (string)

Optional properties:

  • length (number, default from defaultStar)
  • color (string, default first star color)
  • half (boolean, default: false)
  • requireAnswer (boolean, default: false)

Example properties:

{
  "title": "How would you rate us?",
  "length": 5,
  "color": "#F5A623",
  "half": false,
  "requireAnswer": true
}

Multiple Choice

Required properties:

  • title (string)
  • choices (array of strings)

Validation rules:

  • If multiSelect = true, at least 1 choice is required.
  • If multiSelect = false, at least 2 choices are required unless addOtherAnswerOption or addNoneOfAboveOption is enabled.
  • Duplicate choices are rejected.

Optional properties:

  • multiSelect (boolean)
  • requireAnswer (boolean, default: false)

Example properties:

{
  "title": "Who is your favorite trainer?",
  "choices": ["Jeff", "Tom", "Cindy", "Jennifer"],
  "multiSelect": false,
  "requireAnswer": false
}

Comment Box

Required properties:

  • title (string)

Optional properties:

  • requireAnswer (boolean, default: false)

Example properties:

{
  "title": "Please leave us your feedback.",
  "requireAnswer": false
}

Dropdown

Required properties:

  • title (string)
  • choices (array of strings)

Validation rules:

  • At least 2 choices unless addOtherAnswerOption is enabled.

Example properties:

{
  "title": "Select your department",
  "choices": ["HR", "Finance", "Operations"],
  "requireAnswer": false
}

Image Choice

Required properties:

  • title (string)
  • urls (array)

Validation rules:

  • At least 1 image when multiSelect = true.
  • At least 2 images when multiSelect = false.

Example properties:

{
  "title": "Pick your preferred office setup",
  "multiSelect": false,
  "urls": [
    { "url": "https://cdn.example.com/a.png" },
    { "url": "https://cdn.example.com/b.png" }
  ]
}

Grid - Multiple Choice

Required properties:

  • title (string)
  • rows (array)
  • cols (array)

Validation rules:

  • At least 1 row.
  • If multiSelect = true, at least 1 column.
  • If multiSelect = false, at least 2 columns.

Example properties:

{
  "title": "Rate each area",
  "multiSelect": false,
  "rows": ["Benefits", "Manager Support"],
  "cols": ["Poor", "Good", "Excellent"]
}

Grid - Dropdown

Required properties:

  • title (string)
  • choices (array)
  • rows (array)
  • cols (array)

Validation rules:

  • At least 2 choices, 1 row, and 1 column.

Example properties:

{
  "title": "Select skill level by team",
  "choices": ["Beginner", "Intermediate", "Advanced"],
  "rows": ["Engineering", "HR"],
  "cols": ["Current Level"]
}

Textbox

Required properties:

  • title (string)

Optional properties:

  • answerFormat (object)
  • requireAnswer (boolean, default: false)

Example properties:

{
  "title": "Work email",
  "requireAnswer": true,
  "answerFormat": {
    "type": "E",
    "message": "Please enter a valid email"
  }
}

Textbox List

Required properties:

  • title (string)
  • elements (array)

Validation rules:

  • At least 1 element.

Example properties:

{
  "title": "Emergency contacts",
  "elements": [
    { "label": "Name", "type": "Text" },
    { "label": "Phone", "type": "Phone" }
  ]
}

File Upload

Required properties:

  • title (string)
  • fileTypes (array)
  • invalidFileTypeMessage (string)

Example properties:

{
  "title": "Upload supporting document",
  "fileTypes": ["PDF", "DOCX"],
  "invalidFileTypeMessage": "Only PDF or DOCX files are allowed."
}

Slider

Required properties:

  • title (string)
  • startRange (number)
  • endRange (number)
  • rangeStep (number)

Validation rules:

  • startRange < endRange
  • rangeStep > 0

Example properties:

{
  "title": "How stressed are you this week?",
  "startRange": 0,
  "endRange": 10,
  "rangeStep": 1
}

Scale

Required properties:

  • title (string)

Example properties:

{
  "title": "How likely are you to recommend your team?",
  "min": 1,
  "max": 5,
  "labels": ["Not likely", "Very likely"]
}

Date / Time

Required properties:

  • title (string)

Example properties:

{
  "title": "Preferred interview date",
  "date": true,
  "time": false
}

Contact

Required properties:

  • title (string)
  • elements (array)

Validation rules:

  • Each contact element must have a non-empty label.

Example properties:

{
  "title": "Your contact details",
  "elements": [
    { "type": "Email", "label": "Work Email", "required": true },
    { "type": "Phone", "label": "Phone", "required": false }
  ]
}

Cascading Menu

Required properties:

  • title (string)

Example properties:

{
  "title": "Office location",
  "choices": ["US", "Canada", "Germany"],
  "levels": [1, 1, 1]
}

Matching

Required properties:

  • title (string)

Note:

  • Current validator enforces title/length checks; matching-specific validation is minimal.

Example properties:

{
  "title": "Match role to responsibility",
  "prompts": ["HR", "Engineering"],
  "choices": ["Hiring", "Code Review"]
}

Ranking

Required properties:

  • No strict required-field validation in getInvalidMessage.

Typical properties:

  • title (string)
  • choices (array)

Example properties:

{
  "title": "Rank these benefits",
  "choices": ["Healthcare", "Flex Time", "Training Budget"]
}

Net Promoter Score

Required properties:

  • No strict required-field validation in getInvalidMessage.

Typical properties:

  • title (string)

Example properties:

{
  "title": "How likely are you to recommend our workplace to a friend?"
}

Text

Required properties:

  • content (string)

Example properties:

{
  "content": "Please answer all questions honestly."
}

Signature

Required properties:

  • title (string)

Example properties:

{
  "title": "Employee acknowledgment"
}

Image

Required properties:

  • url (string)

Validation rules:

  • url must be a valid image URL/upload source.

Example properties:

{
  "url": "https://cdn.example.com/banner.png",
  "label": "Benefits Overview"
}

Text A/B Test

Required properties:

  • contents (array)

Validation rules:

  • Unique entries.
  • Valid percentages.
  • Total percentage must equal 100.

Example properties:

{
  "contents": [
    { "content": "How do you feel about your work-life balance?", "percentage": 50 },
    { "content": "How satisfied are you with your work-life balance?", "percentage": 50 }
  ]
}

Image A/B Test

Required properties:

  • urls (array)

Validation rules:

  • Unique URLs.
  • Valid URL format.
  • Valid percentages.
  • Total percentage must equal 100.

Example properties:

{
  "urls": [
    { "url": "https://cdn.example.com/a.png", "percentage": 50 },
    { "url": "https://cdn.example.com/b.png", "percentage": 50 }
  ]
}

Audio

Required properties:

  • url (string)

Validation rules:

  • Must be a valid URL on a supported audio host.

Example properties:

{
  "url": "https://audio.com/example-track",
  "label": "Leadership Message"
}

Video

Required properties:

  • url (string)

Validation rules:

  • Must be a valid URL on a supported video host.

Example properties:

{
  "url": "https://www.youtube.com/watch?v=example",
  "label": "Policy Walkthrough"
}

Error Responses

When question type or properties are invalid, the API returns:

{
  "error": "invalid_request"
}

Example invalid question type request:

{
  "type": "Slider",
  "properties": {
    "title": "Rate us"
  }
}

Example invalid properties request:

{
  "type": "Star Rating",
  "properties": {
    "title": "Rate us"
  }
}