Skip to content
OpenCode
Esc
navigateopen⌘Jpreview

Create session form

Create a form for a session.

POST/api/session/{sessionID}/form
Path parameters
sessionIDstringrequired
Request body
requiredapplication/json
idobject | any
Show properties
Any of:
object
object
any
any
titlestringrequired
metadataForm.Metadata
modestringrequired
Allowed:formurl
fieldsForm.StringField | Form.NumberField | Form.IntegerField | Form.BooleanField | Form.MultiselectField[] | any
Show properties
Any of:
Form.StringField | Form.NumberField | Form.IntegerField | Form.BooleanField | Form.MultiselectField[]
Array of Form.StringField | Form.NumberField | Form.IntegerField | Form.BooleanField | Form.MultiselectField
Any of:
Form.StringField
keystringrequired
titlestring
descriptionstring
requiredboolean
whenForm.When[]
Show properties
Array of Form.When
keystringrequired
opstringrequired
Allowed:eqneq
valuestring | number | string | string | booleanrequired
Show properties
Any of:
string
string
number | string | string
Any of:
number | string
Any of:
number
number
string
string
string
string
string
string
string
string
boolean
boolean
typestringrequired
Allowed:string
formatstring
Allowed:emailuridatedate-time
minLengthobject
Show properties
object
maxLengthobject
Show properties
object
patternstring
placeholderstring
defaultstring
optionsForm.Option[]
Show properties
Array of Form.Option
valuestringrequired
labelstringrequired
descriptionstring
customboolean
Form.NumberField
keystringrequired
titlestring
descriptionstring
requiredboolean
whenForm.When[]
Show properties
Array of Form.When
keystringrequired
opstringrequired
Allowed:eqneq
valuestring | number | string | string | booleanrequired
Show properties
Any of:
string
string
number | string | string
Any of:
number | string
Any of:
number
number
string
string
string
string
string
string
string
string
boolean
boolean
typestringrequired
Allowed:number
minimumnumber | string | string
Show properties
Any of:
number | string
Any of:
number
number
string
string
string
string
string
string
string
string
maximumnumber | string | string
Show properties
Any of:
number | string
Any of:
number
number
string
string
string
string
string
string
string
string
defaultnumber | string | string
Show properties
Any of:
number | string
Any of:
number
number
string
string
string
string
string
string
string
string
Form.IntegerField
keystringrequired
titlestring
descriptionstring
requiredboolean
whenForm.When[]
Show properties
Array of Form.When
keystringrequired
opstringrequired
Allowed:eqneq
valuestring | number | string | string | booleanrequired
Show properties
Any of:
string
string
number | string | string
Any of:
number | string
Any of:
number
number
string
string
string
string
string
string
string
string
boolean
boolean
typestringrequired
Allowed:integer
minimumnumber | string | string
Show properties
Any of:
number | string
Any of:
number
number
string
string
string
string
string
string
string
string
maximumnumber | string | string
Show properties
Any of:
number | string
Any of:
number
number
string
string
string
string
string
string
string
string
defaultnumber | string | string
Show properties
Any of:
number | string
Any of:
number
number
string
string
string
string
string
string
string
string
Form.BooleanField
keystringrequired
titlestring
descriptionstring
requiredboolean
whenForm.When[]
Show properties
Array of Form.When
keystringrequired
opstringrequired
Allowed:eqneq
valuestring | number | string | string | booleanrequired
Show properties
Any of:
string
string
number | string | string
Any of:
number | string
Any of:
number
number
string
string
string
string
string
string
string
string
boolean
boolean
typestringrequired
Allowed:boolean
defaultboolean
Form.MultiselectField
keystringrequired
titlestring
descriptionstring
requiredboolean
whenForm.When[]
Show properties
Array of Form.When
keystringrequired
opstringrequired
Allowed:eqneq
valuestring | number | string | string | booleanrequired
Show properties
Any of:
string
string
number | string | string
Any of:
number | string
Any of:
number
number
string
string
string
string
string
string
string
string
boolean
boolean
typestringrequired
Allowed:multiselect
optionsForm.Option[]required
Show properties
Array of Form.Option
valuestringrequired
labelstringrequired
descriptionstring
minItemsobject
Show properties
object
maxItemsobject
Show properties
object
customboolean
defaultstring[]
any
any
urlstring | any
Show properties
Any of:
string
string
any
any
Responses
200Success
dataForm.FormInfo | Form.UrlInforequired
Show properties
Any of:
Form.FormInfo
idobjectrequired
Show properties
object
sessionIDstringrequired
titlestringrequired
metadataForm.Metadata
modestringrequired
Allowed:form
fieldsForm.StringField | Form.NumberField | Form.IntegerField | Form.BooleanField | Form.MultiselectField[]required
Show properties
Array of Form.StringField | Form.NumberField | Form.IntegerField | Form.BooleanField | Form.MultiselectField
Any of:
Form.StringField
keystringrequired
titlestring
descriptionstring
requiredboolean
whenForm.When[]
Show properties
Array of Form.When
keystringrequired
opstringrequired
Allowed:eqneq
valuestring | number | string | string | booleanrequired
Show properties
Any of:
string
string
number | string | string
Any of:
number | string
Any of:
number
number
string
string
string
string
string
string
string
string
boolean
boolean
typestringrequired
Allowed:string
formatstring
Allowed:emailuridatedate-time
minLengthobject
Show properties
object
maxLengthobject
Show properties
object
patternstring
placeholderstring
defaultstring
optionsForm.Option[]
Show properties
Array of Form.Option
valuestringrequired
labelstringrequired
descriptionstring
customboolean
Form.NumberField
keystringrequired
titlestring
descriptionstring
requiredboolean
whenForm.When[]
Show properties
Array of Form.When
keystringrequired
opstringrequired
Allowed:eqneq
valuestring | number | string | string | booleanrequired
Show properties
Any of:
string
string
number | string | string
Any of:
number | string
Any of:
number
number
string
string
string
string
string
string
string
string
boolean
boolean
typestringrequired
Allowed:number
minimumnumber | string | string
Show properties
Any of:
number | string
Any of:
number
number
string
string
string
string
string
string
string
string
maximumnumber | string | string
Show properties
Any of:
number | string
Any of:
number
number
string
string
string
string
string
string
string
string
defaultnumber | string | string
Show properties
Any of:
number | string
Any of:
number
number
string
string
string
string
string
string
string
string
Form.IntegerField
keystringrequired
titlestring
descriptionstring
requiredboolean
whenForm.When[]
Show properties
Array of Form.When
keystringrequired
opstringrequired
Allowed:eqneq
valuestring | number | string | string | booleanrequired
Show properties
Any of:
string
string
number | string | string
Any of:
number | string
Any of:
number
number
string
string
string
string
string
string
string
string
boolean
boolean
typestringrequired
Allowed:integer
minimumnumber | string | string
Show properties
Any of:
number | string
Any of:
number
number
string
string
string
string
string
string
string
string
maximumnumber | string | string
Show properties
Any of:
number | string
Any of:
number
number
string
string
string
string
string
string
string
string
defaultnumber | string | string
Show properties
Any of:
number | string
Any of:
number
number
string
string
string
string
string
string
string
string
Form.BooleanField
keystringrequired
titlestring
descriptionstring
requiredboolean
whenForm.When[]
Show properties
Array of Form.When
keystringrequired
opstringrequired
Allowed:eqneq
valuestring | number | string | string | booleanrequired
Show properties
Any of:
string
string
number | string | string
Any of:
number | string
Any of:
number
number
string
string
string
string
string
string
string
string
boolean
boolean
typestringrequired
Allowed:boolean
defaultboolean
Form.MultiselectField
keystringrequired
titlestring
descriptionstring
requiredboolean
whenForm.When[]
Show properties
Array of Form.When
keystringrequired
opstringrequired
Allowed:eqneq
valuestring | number | string | string | booleanrequired
Show properties
Any of:
string
string
number | string | string
Any of:
number | string
Any of:
number
number
string
string
string
string
string
string
string
string
boolean
boolean
typestringrequired
Allowed:multiselect
optionsForm.Option[]required
Show properties
Array of Form.Option
valuestringrequired
labelstringrequired
descriptionstring
minItemsobject
Show properties
object
maxItemsobject
Show properties
object
customboolean
defaultstring[]
Form.UrlInfo
idobjectrequired
Show properties
object
sessionIDstringrequired
titlestringrequired
metadataForm.Metadata
modestringrequired
Allowed:url
urlstringrequired
400InvalidRequestError
Any of:
InvalidRequestError1
_tagstringrequired
Allowed:InvalidRequestError
messagestringrequired
kindstring | any
Show properties
Any of:
string
string
any
any
fieldstring | any
Show properties
Any of:
string
string
any
any
InvalidRequestError
_tagstringrequired
Allowed:InvalidRequestError
messagestringrequired
kindstring | any
Show properties
Any of:
string
string
any
any
fieldstring | any
Show properties
Any of:
string
string
any
any
401UnauthorizedError
_tagstringrequired
Allowed:UnauthorizedError
messagestringrequired
404SessionNotFoundError
Any of:
SessionNotFoundError
_tagstringrequired
Allowed:SessionNotFoundError
sessionIDstringrequired
messagestringrequired
SessionNotFoundError
_tagstringrequired
Allowed:SessionNotFoundError
sessionIDstringrequired
messagestringrequired
409ConflictError
_tagstringrequired
Allowed:ConflictError
messagestringrequired
resourcestring | any
Show properties
Any of:
string
string
any
any
Request
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"
}'
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
      }
    ]
  }
}