Create Form Version
On this page
GraphQL endpoint: /company
Creates a new version of an existing form with the given fields; field order follows the order of the list. The version number increments automatically, and the version stays unpublished unless published is set to true.
Query
mutation (
$formId: ID!
$fields: [FormVersionFieldInput!]!
$published: Boolean
) {
createFormVersion (
formId: $formId
fields: $fields
published: $published
) {
id
version
published
formVersionFields {
label
type
order
}
}
}
Variables
{
"fields": [
{
"label": "Updated Name",
"type": "TEXT"
},
{
"label": "Phone",
"type": "NUMBER"
}
],
"formId": "00000000-0000-4000-8000-000000000002"
}
Response
{
"data": {
"createFormVersion": {
"formVersionFields": [
{
"label": "Updated Name",
"order": 0,
"type": "TEXT"
},
{
"label": "Phone",
"order": 1,
"type": "NUMBER"
}
],
"id": "00000000-0000-4000-8000-000000000001",
"published": false,
"version": 2
}
}
}