Create Question
create question
Authorizations
AuthorizationstringRequired
Query parameters
formIdstringOptional
id of form
categoryIdintegerOptional
id of category, 0 if no category
Body
audiostringOptional
audio url to embed in question
filestringOptional
document url to embed in question (e.g. pdf)
fileExtensionstringOptional
accepted file extension for file type question, separate with comma (e.g. jpg,jpeg,png)
imagestringOptional
image url to embed in question
requiredbooleanOptional
indicates that question must be answered or not
typestring · enumOptionalPossible values:
question type
defaultValuestringOptional
default value for answers
questionstringOptional
question text
timerintegerOptional
timer to answer question in minute
videostringOptional
video url to embed in question
Responses
200
Response
application/json
post
/v1/form/question/addPOST /v1/form/question/add HTTP/1.1
Host: services.alkamedia.id
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 228
{
"audio": "text",
"file": "text",
"fileExtension": "text",
"image": "text",
"required": true,
"type": "short_text",
"choices": [
{
"correct": true,
"image": "text",
"value": "text"
}
],
"defaultValue": "text",
"question": "text",
"timer": 1,
"video": "text"
}200
Response
{
"data": {
"description": "text",
"updated_at": "text",
"id": "text",
"questions": [
{
"audio": "text",
"defaultValue": "text",
"id": "text",
"video": "text",
"timer": 1,
"type": "short_text",
"category": {
"created_at": "text",
"id": 1,
"name": "text",
"score": 1,
"updated_at": "text",
"uuid": "text"
},
"file": "text",
"question": "text",
"required": true,
"fileExtension": "text",
"choices": [
{
"correct": true,
"id": "text",
"image": "text",
"value": "text"
}
],
"image": "text"
}
],
"release": true,
"totalQuestions": 1,
"userId": 1,
"created_at": "text",
"formType": "basic",
"kind": "form",
"timer": 1,
"cover": "text",
"randomize": {
"<category-id>": 1
},
"title": "text"
},
"message": "success",
"status": true
}Last updated