Create a question
POST/v5/questions
Create a new question owned by the caller’s account.
The question is one of six types selected by the required question_type
discriminator (categorical, rating, number, free_text, form, or timestamp),
and each type carries its own configuration block; name and prompt
are required for every type. Questions are the reusable units that are grouped
into question sets and referenced by rubrics, so create them before assembling
a question set. The created question is scoped to the caller’s account and
records the creating identity. The question type and its configuration are set
at creation time and cannot be changed afterward through the update endpoint.
Create a question
curl https://api.egp.scale.com/v5/questions \
-H 'Content-Type: application/json' \
-H "x-api-key: $SGP_API_KEY" \
-d '{
"configuration": {
"choices": [
"string"
],
"dropdown": true,
"multi": true
},
"name": "name",
"prompt": "prompt",
"conditions": [
{
"foo": "bar"
}
],
"question_type": "categorical"
}'{
"id": "id",
"configuration": {
"choices": [
"string"
],
"dropdown": true,
"multi": true
},
"created_at": "2019-12-27T18:11:19.117Z",
"created_by": {
"id": "id",
"type": "user",
"object": "identity"
},
"name": "name",
"prompt": "prompt",
"archived_at": "2019-12-27T18:11:19.117Z",
"conditions": [
{
"foo": "bar"
}
],
"object": "question",
"question_type": "categorical"
}Returns Examples
{
"id": "id",
"configuration": {
"choices": [
"string"
],
"dropdown": true,
"multi": true
},
"created_at": "2019-12-27T18:11:19.117Z",
"created_by": {
"id": "id",
"type": "user",
"object": "identity"
},
"name": "name",
"prompt": "prompt",
"archived_at": "2019-12-27T18:11:19.117Z",
"conditions": [
{
"foo": "bar"
}
],
"object": "question",
"question_type": "categorical"
}