Create session form
Create a form for a session.
POST
/api/session/{sessionID}/formPath parameters
sessionIDstringrequiredRequest body
requiredapplication/jsonidobject | anyShow propertiesHide properties
Any of:
object
objectany
anytitlestringrequiredmetadataForm.MetadatamodestringrequiredAllowed:
formurlfieldsForm.StringField | Form.NumberField | Form.IntegerField | Form.BooleanField | Form.MultiselectField[] | anyShow propertiesHide properties
Any of:
Form.StringField | Form.NumberField | Form.IntegerField | Form.BooleanField | Form.MultiselectField[]
Array of
Form.StringField | Form.NumberField | Form.IntegerField | Form.BooleanField | Form.MultiselectFieldAny of:
Form.StringField
keystringrequiredtitlestringdescriptionstringrequiredbooleanwhenForm.When[]Show propertiesHide properties
Array of
Form.WhenkeystringrequiredopstringrequiredAllowed:
eqneqvaluestring | number | string | string | booleanrequiredShow propertiesHide properties
Any of:
string
stringnumber | string | string
Any of:
number | string
Any of:
number
numberstring
stringstring
stringstring
stringstring
stringboolean
booleantypestringrequiredAllowed:
stringformatstringAllowed:
emailuridatedate-timeminLengthobjectShow propertiesHide properties
objectmaxLengthobjectShow propertiesHide properties
objectpatternstringplaceholderstringdefaultstringoptionsForm.Option[]Show propertiesHide properties
Array of
Form.OptionvaluestringrequiredlabelstringrequireddescriptionstringcustombooleanForm.NumberField
keystringrequiredtitlestringdescriptionstringrequiredbooleanwhenForm.When[]Show propertiesHide properties
Array of
Form.WhenkeystringrequiredopstringrequiredAllowed:
eqneqvaluestring | number | string | string | booleanrequiredShow propertiesHide properties
Any of:
string
stringnumber | string | string
Any of:
number | string
Any of:
number
numberstring
stringstring
stringstring
stringstring
stringboolean
booleantypestringrequiredAllowed:
numberminimumnumber | string | stringShow propertiesHide properties
Any of:
number | string
Any of:
number
numberstring
stringstring
stringstring
stringstring
stringmaximumnumber | string | stringShow propertiesHide properties
Any of:
number | string
Any of:
number
numberstring
stringstring
stringstring
stringstring
stringdefaultnumber | string | stringShow propertiesHide properties
Any of:
number | string
Any of:
number
numberstring
stringstring
stringstring
stringstring
stringForm.IntegerField
keystringrequiredtitlestringdescriptionstringrequiredbooleanwhenForm.When[]Show propertiesHide properties
Array of
Form.WhenkeystringrequiredopstringrequiredAllowed:
eqneqvaluestring | number | string | string | booleanrequiredShow propertiesHide properties
Any of:
string
stringnumber | string | string
Any of:
number | string
Any of:
number
numberstring
stringstring
stringstring
stringstring
stringboolean
booleantypestringrequiredAllowed:
integerminimumnumber | string | stringShow propertiesHide properties
Any of:
number | string
Any of:
number
numberstring
stringstring
stringstring
stringstring
stringmaximumnumber | string | stringShow propertiesHide properties
Any of:
number | string
Any of:
number
numberstring
stringstring
stringstring
stringstring
stringdefaultnumber | string | stringShow propertiesHide properties
Any of:
number | string
Any of:
number
numberstring
stringstring
stringstring
stringstring
stringForm.BooleanField
keystringrequiredtitlestringdescriptionstringrequiredbooleanwhenForm.When[]Show propertiesHide properties
Array of
Form.WhenkeystringrequiredopstringrequiredAllowed:
eqneqvaluestring | number | string | string | booleanrequiredShow propertiesHide properties
Any of:
string
stringnumber | string | string
Any of:
number | string
Any of:
number
numberstring
stringstring
stringstring
stringstring
stringboolean
booleantypestringrequiredAllowed:
booleandefaultbooleanForm.MultiselectField
keystringrequiredtitlestringdescriptionstringrequiredbooleanwhenForm.When[]Show propertiesHide properties
Array of
Form.WhenkeystringrequiredopstringrequiredAllowed:
eqneqvaluestring | number | string | string | booleanrequiredShow propertiesHide properties
Any of:
string
stringnumber | string | string
Any of:
number | string
Any of:
number
numberstring
stringstring
stringstring
stringstring
stringboolean
booleantypestringrequiredAllowed:
multiselectoptionsForm.Option[]requiredShow propertiesHide properties
Array of
Form.OptionvaluestringrequiredlabelstringrequireddescriptionstringminItemsobjectShow propertiesHide properties
objectmaxItemsobjectShow propertiesHide properties
objectcustombooleandefaultstring[]any
anyurlstring | anyShow propertiesHide properties
Any of:
string
stringany
anyResponses
200Success
dataForm.FormInfo | Form.UrlInforequiredShow propertiesHide properties
Any of:
Form.FormInfo
idobjectrequiredShow propertiesHide properties
objectsessionIDstringrequiredtitlestringrequiredmetadataForm.MetadatamodestringrequiredAllowed:
formfieldsForm.StringField | Form.NumberField | Form.IntegerField | Form.BooleanField | Form.MultiselectField[]requiredShow propertiesHide properties
Array of
Form.StringField | Form.NumberField | Form.IntegerField | Form.BooleanField | Form.MultiselectFieldAny of:
Form.StringField
keystringrequiredtitlestringdescriptionstringrequiredbooleanwhenForm.When[]Show propertiesHide properties
Array of
Form.WhenkeystringrequiredopstringrequiredAllowed:
eqneqvaluestring | number | string | string | booleanrequiredShow propertiesHide properties
Any of:
string
stringnumber | string | string
Any of:
number | string
Any of:
number
numberstring
stringstring
stringstring
stringstring
stringboolean
booleantypestringrequiredAllowed:
stringformatstringAllowed:
emailuridatedate-timeminLengthobjectShow propertiesHide properties
objectmaxLengthobjectShow propertiesHide properties
objectpatternstringplaceholderstringdefaultstringoptionsForm.Option[]Show propertiesHide properties
Array of
Form.OptionvaluestringrequiredlabelstringrequireddescriptionstringcustombooleanForm.NumberField
keystringrequiredtitlestringdescriptionstringrequiredbooleanwhenForm.When[]Show propertiesHide properties
Array of
Form.WhenkeystringrequiredopstringrequiredAllowed:
eqneqvaluestring | number | string | string | booleanrequiredShow propertiesHide properties
Any of:
string
stringnumber | string | string
Any of:
number | string
Any of:
number
numberstring
stringstring
stringstring
stringstring
stringboolean
booleantypestringrequiredAllowed:
numberminimumnumber | string | stringShow propertiesHide properties
Any of:
number | string
Any of:
number
numberstring
stringstring
stringstring
stringstring
stringmaximumnumber | string | stringShow propertiesHide properties
Any of:
number | string
Any of:
number
numberstring
stringstring
stringstring
stringstring
stringdefaultnumber | string | stringShow propertiesHide properties
Any of:
number | string
Any of:
number
numberstring
stringstring
stringstring
stringstring
stringForm.IntegerField
keystringrequiredtitlestringdescriptionstringrequiredbooleanwhenForm.When[]Show propertiesHide properties
Array of
Form.WhenkeystringrequiredopstringrequiredAllowed:
eqneqvaluestring | number | string | string | booleanrequiredShow propertiesHide properties
Any of:
string
stringnumber | string | string
Any of:
number | string
Any of:
number
numberstring
stringstring
stringstring
stringstring
stringboolean
booleantypestringrequiredAllowed:
integerminimumnumber | string | stringShow propertiesHide properties
Any of:
number | string
Any of:
number
numberstring
stringstring
stringstring
stringstring
stringmaximumnumber | string | stringShow propertiesHide properties
Any of:
number | string
Any of:
number
numberstring
stringstring
stringstring
stringstring
stringdefaultnumber | string | stringShow propertiesHide properties
Any of:
number | string
Any of:
number
numberstring
stringstring
stringstring
stringstring
stringForm.BooleanField
keystringrequiredtitlestringdescriptionstringrequiredbooleanwhenForm.When[]Show propertiesHide properties
Array of
Form.WhenkeystringrequiredopstringrequiredAllowed:
eqneqvaluestring | number | string | string | booleanrequiredShow propertiesHide properties
Any of:
string
stringnumber | string | string
Any of:
number | string
Any of:
number
numberstring
stringstring
stringstring
stringstring
stringboolean
booleantypestringrequiredAllowed:
booleandefaultbooleanForm.MultiselectField
keystringrequiredtitlestringdescriptionstringrequiredbooleanwhenForm.When[]Show propertiesHide properties
Array of
Form.WhenkeystringrequiredopstringrequiredAllowed:
eqneqvaluestring | number | string | string | booleanrequiredShow propertiesHide properties
Any of:
string
stringnumber | string | string
Any of:
number | string
Any of:
number
numberstring
stringstring
stringstring
stringstring
stringboolean
booleantypestringrequiredAllowed:
multiselectoptionsForm.Option[]requiredShow propertiesHide properties
Array of
Form.OptionvaluestringrequiredlabelstringrequireddescriptionstringminItemsobjectShow propertiesHide properties
objectmaxItemsobjectShow propertiesHide properties
objectcustombooleandefaultstring[]Form.UrlInfo
idobjectrequiredShow propertiesHide properties
objectsessionIDstringrequiredtitlestringrequiredmetadataForm.MetadatamodestringrequiredAllowed:
urlurlstringrequired400InvalidRequestError
Any of:
InvalidRequestError1
_tagstringrequiredAllowed:
InvalidRequestErrormessagestringrequiredkindstring | anyShow propertiesHide properties
Any of:
string
stringany
anyfieldstring | anyShow propertiesHide properties
Any of:
string
stringany
anyInvalidRequestError
_tagstringrequiredAllowed:
InvalidRequestErrormessagestringrequiredkindstring | anyShow propertiesHide properties
Any of:
string
stringany
anyfieldstring | anyShow propertiesHide properties
Any of:
string
stringany
any401UnauthorizedError
_tagstringrequiredAllowed:
UnauthorizedErrormessagestringrequired404SessionNotFoundError
Any of:
SessionNotFoundError
_tagstringrequiredAllowed:
SessionNotFoundErrorsessionIDstringrequiredmessagestringrequiredSessionNotFoundError
_tagstringrequiredAllowed:
SessionNotFoundErrorsessionIDstringrequiredmessagestringrequired409ConflictError
_tagstringrequiredAllowed:
ConflictErrormessagestringrequiredresourcestring | anyShow propertiesHide properties
Any of:
string
stringany
anyRequest
curl -X POST "/api/session/string/form" \
-H "Content-Type: application/json" \
-d '{
"id": {},
"title": "string",
"metadata": {},
"mode": "form",
"fields": [
{
"key": "string",
"title": "string",
"description": "string",
"required": true,
"when": [
{
"key": "string",
"op": "eq",
"value": "string"
}
],
"type": "string",
"format": "email",
"minLength": {},
"maxLength": {},
"pattern": "string",
"placeholder": "string",
"default": "string",
"options": [
{
"value": "string",
"label": "string",
"description": "string"
}
],
"custom": true
}
],
"url": "string"
}'const response = await fetch("/api/session/string/form", {
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({
"id": {},
"title": "string",
"metadata": {},
"mode": "form",
"fields": [
{
"key": "string",
"title": "string",
"description": "string",
"required": true,
"when": [
{
"key": "string",
"op": "eq",
"value": "string"
}
],
"type": "string",
"format": "email",
"minLength": {},
"maxLength": {},
"pattern": "string",
"placeholder": "string",
"default": "string",
"options": [
{
"value": "string",
"label": "string",
"description": "string"
}
],
"custom": true
}
],
"url": "string"
})
});import requests
response = requests.post(
"/api/session/string/form",
headers={
"Content-Type": "application/json"
},
json={
"id": {},
"title": "string",
"metadata": {},
"mode": "form",
"fields": [
{
"key": "string",
"title": "string",
"description": "string",
"required": True,
"when": [
{
"key": "string",
"op": "eq",
"value": "string"
}
],
"type": "string",
"format": "email",
"minLength": {},
"maxLength": {},
"pattern": "string",
"placeholder": "string",
"default": "string",
"options": [
{
"value": "string",
"label": "string",
"description": "string"
}
],
"custom": True
}
],
"url": "string"
},
)Response
{
"data": {
"id": {},
"sessionID": "string",
"title": "string",
"metadata": {},
"mode": "form",
"fields": [
{
"key": "string",
"title": "string",
"description": "string",
"required": true,
"when": [
{
"key": "string",
"op": "eq",
"value": "string"
}
],
"type": "string",
"format": "email",
"minLength": {},
"maxLength": {},
"pattern": "string",
"placeholder": "string",
"default": "string",
"options": [
{
"value": "string",
"label": "string",
"description": "string"
}
],
"custom": true
}
]
}
}{
"_tag": "InvalidRequestError",
"message": "string",
"kind": "string",
"field": "string"
}{
"_tag": "UnauthorizedError",
"message": "string"
}{
"_tag": "SessionNotFoundError",
"sessionID": "string",
"message": "string"
}{
"_tag": "ConflictError",
"message": "string",
"resource": "string"
}