Creates a new record of dynamic form if the dynamic form GUID is left empty. Updates an existing dynamic form record if the passed identifier matches an existing dynamic form record.
Request
Request URI
Method | Request URI |
---|---|
POST | https://{company-name}.helloid.com/api/v1/forms |
Request parameters
Parameter | Description |
---|---|
{company-name} | The company name of the target company |
Request headers
Parameter | Description |
---|---|
Content-Type | Must be set to application/json. |
Sample request body
{
"dynamicFormGUID": "00063687-9b3f-45bb-94b3-bace619dee24",
"name": "api test",
"formSchema": [
{
"key": "multiselect",
"templateOptions": {
"label": "Multiselect Label",
"useObjects": true,
"useFilter": false,
"options": [
{
"value": "Option 1",
"text": "Label 1"
},
{
"value": "Option 2",
"text": "Label 2"
},
{
"value": "Option 3",
"text": "Label 3"
}
]
},
"type": "multiselect",
"requiresTemplateOptions": true
},
{
"key": "dropDown",
"templateOptions": {
"label": "Dropdown",
"required": false,
"useObjects": true,
"useDataSource": false,
"useFilter": false,
"options": [
{
"value": "Option 1",
"text": "Label 1"
},
{
"value": "Option 2",
"text": "Label 2"
},
{
"value": "Option 3",
"text": "Label 3"
}
]
},
"type": "dropdown",
"requiresTemplateOptions": true
},
{
"key": "checkboxInput",
"templateOptions": {
"label": "Checkbox Input Label",
"useSwitch": false,
"checkboxLabel": "Checkbox label",
"mustBeTrue": true
},
"type": "boolean",
"requiresTemplateOptions": true
},
{
"key": "multiCheckbox",
"templateOptions": {
"label": "Multi Checkbox",
"options": [
{
"value": true,
"mustBeTrue": false,
"label": "Option 1"
},
{
"value": false,
"mustBeTrue": false,
"label": "Option 2"
},
{
"value": false,
"mustBeTrue": true,
"label": "Option 3"
}
],
"useSwitch": false,
"alignVertical": false
},
"type": "multicheckbox",
"requiresTemplateOptions": true
}
]
}
Request body parameters
Parameter | Description | Required/Optional | Default value |
---|---|---|---|
{Name} | Name of the form. Must be unique. | Required | - |
{FormSchema} | A JSON form schema | Required | - |
{DynamicFormGUID} | The GUID of the form. If specified, it will check if the GUID belongs to an existing form. If so, it will update that form. If not, it will add a new form with the specified GUID. A new GUID is generated if no GUID is provided. | Optional | - |
{PendingDelete} | A boolean value indicating if the form is considered deleted. | Optional | false |
Response
Response status
Code | Description |
---|---|
200(OK) | Indicates that the operation was successful. |
400(BAD REQUEST) | Indicates that the operation was not successful. There were validation errors or the request body was malformed. |
401(UNAUTHORIZED) | Indicates that no authentication header was given or the api key and secret were invalid. If the api key and secret were valid check the configuration in your portal, it is possibilty these were IP restricted or are disabled. |
Please also see error result.
Please also see common HTTP status codes.
Sample response body
{
"dynamicFormGUID": "00063687-9b3f-45bb-94b3-bace619dee24",
"name": "api test",
"version": 1,
"isPendingDelete": false,
"isUpdated": false,
"formSchema": [
{
"key": "multiselect",
"templateOptions": {
"label": "Multiselect Label",
"useObjects": true,
"useFilter": false,
"options": [
{
"value": "Option 1",
"text": "Label 1"
},
{
"value": "Option 2",
"text": "Label 2"
},
{
"value": "Option 3",
"text": "Label 3"
}
]
},
"type": "multiselect",
"requiresTemplateOptions": true
},
{
"key": "dropDown",
"templateOptions": {
"label": "Dropdown",
"required": false,
"useObjects": true,
"useDataSource": false,
"useFilter": false,
"options": [
{
"value": "Option 1",
"text": "Label 1"
},
{
"value": "Option 2",
"text": "Label 2"
},
{
"value": "Option 3",
"text": "Label 3"
}
]
},
"type": "dropdown",
"requiresTemplateOptions": true
},
{
"key": "checkboxInput",
"templateOptions": {
"label": "Checkbox Input Label",
"useSwitch": false,
"checkboxLabel": "Checkbox label",
"mustBeTrue": true
},
"type": "boolean",
"requiresTemplateOptions": true
},
{
"key": "multiCheckbox",
"templateOptions": {
"label": "Multi Checkbox",
"options": [
{
"value": true,
"mustBeTrue": false,
"label": "Option 1"
},
{
"value": false,
"mustBeTrue": false,
"label": "Option 2"
},
{
"value": false,
"mustBeTrue": true,
"label": "Option 3"
}
],
"useSwitch": false,
"alignVertical": false
},
"type": "multicheckbox",
"requiresTemplateOptions": true
}
]
}
Example request with cURL
Replace placeholder values surrounded by { } with the actual values.
curl -u {api-key}:{api-secret} -X POST https://{company-name}.helloid.com/api/v1/forms -H "Content-Type:application/json" -d
"{
'dynamicFormGUID': '7c9b23b2-c25c-41d2-f653-08d7c0e9e050',
'name': 'api test form',
'formSchema': [
{
'key': 'multiselect',
'templateOptions': {
'label': 'Multiselect Label',
'useObjects': true,
'useFilter': false,
'options': [
{
'value': 'Option 1',
'text': 'Label 1'
},
{
'value': 'Option 2',
'text': 'Label 2'
},
{
'value': 'Option 3',
'text': 'Label 3'
}
]
},
'type': 'multiselect',
'requiresTemplateOptions': true
},
{
'key': 'dropDown',
'templateOptions': {
'label': 'Dropdown',
'required': false,
'useObjects': true,
'useDataSource': false,
'useFilter': false,
'options': [
{
'value': 'Option 1',
'text': 'Label 1'
},
{
'value': 'Option 2',
'text': 'Label 2'
},
{
'value': 'Option 3',
'text': 'Label 3'
}
]
},
'type': 'dropdown',
'requiresTemplateOptions': true
},
{
'key': 'checkboxInput',
'templateOptions': {
'label': 'Checkbox Input Label',
'useSwitch': false,
'checkboxLabel': 'Checkbox label',
'mustBeTrue': true
},
'type': 'boolean',
'requiresTemplateOptions': true
},
{
'key': 'multiCheckbox',
'templateOptions': {
'label': 'Multi Checkbox',
'options': [
{
'value': true,
'mustBeTrue': false,
'label': 'Option 1'
},
{
'value': false,
'mustBeTrue': false,
'label': 'Option 2'
},
{
'value': false,
'mustBeTrue': true,
'label': 'Option 3'
}
],
'useSwitch': false,
'alignVertical': false
},
'type': 'multicheckbox',
'requiresTemplateOptions': true
}
]
}"