Update form elements
curl --request PUT \
--url https://app.azalt.co/api/v1/form-elements \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"formId": "<string>",
"elements": [
{
"id": "<string>",
"key": "<string>",
"label": "<string>",
"required": true,
"options": [
{
"label": "<string>",
"value": "<string>",
"description": "<string>",
"points": 123,
"actionText": "<string>"
}
],
"conditions": [
{
"id": "<string>",
"type": "CONDITION",
"field": "<string>",
"value": "<string>",
"aggregator": "SINGLE"
}
],
"config": {
"type": "SHORT_TEXT",
"description": "<string>",
"showDescriptionInDrawer": true,
"tooltip": "<string>",
"inlineChoiceDisplay": true,
"scoring": {
"enabled": true,
"points": 123,
"actionText": "<string>"
},
"hideInSummary": true,
"placeholder": "<string>",
"minLength": 123,
"maxLength": 123,
"pattern": "<string>"
},
"unitId": "<string>",
"parentElementId": "<string>",
"activityDefinitionId": "<string>",
"metadata": {},
"schedule": {}
}
]
}
'import requests
url = "https://app.azalt.co/api/v1/form-elements"
payload = {
"formId": "<string>",
"elements": [
{
"id": "<string>",
"key": "<string>",
"label": "<string>",
"required": True,
"options": [
{
"label": "<string>",
"value": "<string>",
"description": "<string>",
"points": 123,
"actionText": "<string>"
}
],
"conditions": [
{
"id": "<string>",
"type": "CONDITION",
"field": "<string>",
"value": "<string>",
"aggregator": "SINGLE"
}
],
"config": {
"type": "SHORT_TEXT",
"description": "<string>",
"showDescriptionInDrawer": True,
"tooltip": "<string>",
"inlineChoiceDisplay": True,
"scoring": {
"enabled": True,
"points": 123,
"actionText": "<string>"
},
"hideInSummary": True,
"placeholder": "<string>",
"minLength": 123,
"maxLength": 123,
"pattern": "<string>"
},
"unitId": "<string>",
"parentElementId": "<string>",
"activityDefinitionId": "<string>",
"metadata": {},
"schedule": {}
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
formId: '<string>',
elements: [
{
id: '<string>',
key: '<string>',
label: '<string>',
required: true,
options: [
{
label: '<string>',
value: '<string>',
description: '<string>',
points: 123,
actionText: '<string>'
}
],
conditions: [
{
id: '<string>',
type: 'CONDITION',
field: '<string>',
value: '<string>',
aggregator: 'SINGLE'
}
],
config: {
type: 'SHORT_TEXT',
description: '<string>',
showDescriptionInDrawer: true,
tooltip: '<string>',
inlineChoiceDisplay: true,
scoring: {enabled: true, points: 123, actionText: '<string>'},
hideInSummary: true,
placeholder: '<string>',
minLength: 123,
maxLength: 123,
pattern: '<string>'
},
unitId: '<string>',
parentElementId: '<string>',
activityDefinitionId: '<string>',
metadata: {},
schedule: {}
}
]
})
};
fetch('https://app.azalt.co/api/v1/form-elements', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.azalt.co/api/v1/form-elements",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'formId' => '<string>',
'elements' => [
[
'id' => '<string>',
'key' => '<string>',
'label' => '<string>',
'required' => true,
'options' => [
[
'label' => '<string>',
'value' => '<string>',
'description' => '<string>',
'points' => 123,
'actionText' => '<string>'
]
],
'conditions' => [
[
'id' => '<string>',
'type' => 'CONDITION',
'field' => '<string>',
'value' => '<string>',
'aggregator' => 'SINGLE'
]
],
'config' => [
'type' => 'SHORT_TEXT',
'description' => '<string>',
'showDescriptionInDrawer' => true,
'tooltip' => '<string>',
'inlineChoiceDisplay' => true,
'scoring' => [
'enabled' => true,
'points' => 123,
'actionText' => '<string>'
],
'hideInSummary' => true,
'placeholder' => '<string>',
'minLength' => 123,
'maxLength' => 123,
'pattern' => '<string>'
],
'unitId' => '<string>',
'parentElementId' => '<string>',
'activityDefinitionId' => '<string>',
'metadata' => [
],
'schedule' => [
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.azalt.co/api/v1/form-elements"
payload := strings.NewReader("{\n \"formId\": \"<string>\",\n \"elements\": [\n {\n \"id\": \"<string>\",\n \"key\": \"<string>\",\n \"label\": \"<string>\",\n \"required\": true,\n \"options\": [\n {\n \"label\": \"<string>\",\n \"value\": \"<string>\",\n \"description\": \"<string>\",\n \"points\": 123,\n \"actionText\": \"<string>\"\n }\n ],\n \"conditions\": [\n {\n \"id\": \"<string>\",\n \"type\": \"CONDITION\",\n \"field\": \"<string>\",\n \"value\": \"<string>\",\n \"aggregator\": \"SINGLE\"\n }\n ],\n \"config\": {\n \"type\": \"SHORT_TEXT\",\n \"description\": \"<string>\",\n \"showDescriptionInDrawer\": true,\n \"tooltip\": \"<string>\",\n \"inlineChoiceDisplay\": true,\n \"scoring\": {\n \"enabled\": true,\n \"points\": 123,\n \"actionText\": \"<string>\"\n },\n \"hideInSummary\": true,\n \"placeholder\": \"<string>\",\n \"minLength\": 123,\n \"maxLength\": 123,\n \"pattern\": \"<string>\"\n },\n \"unitId\": \"<string>\",\n \"parentElementId\": \"<string>\",\n \"activityDefinitionId\": \"<string>\",\n \"metadata\": {},\n \"schedule\": {}\n }\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://app.azalt.co/api/v1/form-elements")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"formId\": \"<string>\",\n \"elements\": [\n {\n \"id\": \"<string>\",\n \"key\": \"<string>\",\n \"label\": \"<string>\",\n \"required\": true,\n \"options\": [\n {\n \"label\": \"<string>\",\n \"value\": \"<string>\",\n \"description\": \"<string>\",\n \"points\": 123,\n \"actionText\": \"<string>\"\n }\n ],\n \"conditions\": [\n {\n \"id\": \"<string>\",\n \"type\": \"CONDITION\",\n \"field\": \"<string>\",\n \"value\": \"<string>\",\n \"aggregator\": \"SINGLE\"\n }\n ],\n \"config\": {\n \"type\": \"SHORT_TEXT\",\n \"description\": \"<string>\",\n \"showDescriptionInDrawer\": true,\n \"tooltip\": \"<string>\",\n \"inlineChoiceDisplay\": true,\n \"scoring\": {\n \"enabled\": true,\n \"points\": 123,\n \"actionText\": \"<string>\"\n },\n \"hideInSummary\": true,\n \"placeholder\": \"<string>\",\n \"minLength\": 123,\n \"maxLength\": 123,\n \"pattern\": \"<string>\"\n },\n \"unitId\": \"<string>\",\n \"parentElementId\": \"<string>\",\n \"activityDefinitionId\": \"<string>\",\n \"metadata\": {},\n \"schedule\": {}\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.azalt.co/api/v1/form-elements")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"formId\": \"<string>\",\n \"elements\": [\n {\n \"id\": \"<string>\",\n \"key\": \"<string>\",\n \"label\": \"<string>\",\n \"required\": true,\n \"options\": [\n {\n \"label\": \"<string>\",\n \"value\": \"<string>\",\n \"description\": \"<string>\",\n \"points\": 123,\n \"actionText\": \"<string>\"\n }\n ],\n \"conditions\": [\n {\n \"id\": \"<string>\",\n \"type\": \"CONDITION\",\n \"field\": \"<string>\",\n \"value\": \"<string>\",\n \"aggregator\": \"SINGLE\"\n }\n ],\n \"config\": {\n \"type\": \"SHORT_TEXT\",\n \"description\": \"<string>\",\n \"showDescriptionInDrawer\": true,\n \"tooltip\": \"<string>\",\n \"inlineChoiceDisplay\": true,\n \"scoring\": {\n \"enabled\": true,\n \"points\": 123,\n \"actionText\": \"<string>\"\n },\n \"hideInSummary\": true,\n \"placeholder\": \"<string>\",\n \"minLength\": 123,\n \"maxLength\": 123,\n \"pattern\": \"<string>\"\n },\n \"unitId\": \"<string>\",\n \"parentElementId\": \"<string>\",\n \"activityDefinitionId\": \"<string>\",\n \"metadata\": {},\n \"schedule\": {}\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true
}{
"code": "BAD_REQUEST",
"message": "Invalid input data",
"issues": []
}{
"code": "UNAUTHORIZED",
"message": "Authorization not provided",
"issues": []
}{
"code": "FORBIDDEN",
"message": "Insufficient access",
"issues": []
}{
"code": "NOT_FOUND",
"message": "Not found",
"issues": []
}{
"code": "INTERNAL_SERVER_ERROR",
"message": "Internal server error",
"issues": []
}FormElement
Update form elements
Bulk update form element configurations across multiple forms. Requires site manager permissions.
Update Capabilities:
- Element Properties: Labels, descriptions, validation rules, default values
- Options Management: For dropdown, checkbox, and radio elements
- Validation Rules: Required status, min/max values, pattern matching
- Conditional Logic: Show/hide rules and dependencies
- Metadata: Custom attributes and categorization
Update Strategies:
replace: Completely replace element configurationsmerge: Update specified properties while preserving othersappend: Add new options or rules to existing configurations
Affected Systems:
- Active Forms: Changes apply immediately to deployed forms
- Existing Submissions: Historical data preserved, new validations apply forward
- Calculated Fields: Expressions recalculated with updated dependencies
- Conditional Logic: Visibility rules re-evaluated across all forms
Safety Features:
- Validation against existing submission data
- Preview mode to test changes before applying
- Rollback capability for problematic updates
- Audit logging for all element modifications
Common Use Cases:
- Standardizing element configurations across forms
- Updating validation rules organization-wide
- Refreshing dropdown options from external data sources
- Applying regulatory changes to compliance forms
PUT
/
form-elements
Update form elements
curl --request PUT \
--url https://app.azalt.co/api/v1/form-elements \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"formId": "<string>",
"elements": [
{
"id": "<string>",
"key": "<string>",
"label": "<string>",
"required": true,
"options": [
{
"label": "<string>",
"value": "<string>",
"description": "<string>",
"points": 123,
"actionText": "<string>"
}
],
"conditions": [
{
"id": "<string>",
"type": "CONDITION",
"field": "<string>",
"value": "<string>",
"aggregator": "SINGLE"
}
],
"config": {
"type": "SHORT_TEXT",
"description": "<string>",
"showDescriptionInDrawer": true,
"tooltip": "<string>",
"inlineChoiceDisplay": true,
"scoring": {
"enabled": true,
"points": 123,
"actionText": "<string>"
},
"hideInSummary": true,
"placeholder": "<string>",
"minLength": 123,
"maxLength": 123,
"pattern": "<string>"
},
"unitId": "<string>",
"parentElementId": "<string>",
"activityDefinitionId": "<string>",
"metadata": {},
"schedule": {}
}
]
}
'import requests
url = "https://app.azalt.co/api/v1/form-elements"
payload = {
"formId": "<string>",
"elements": [
{
"id": "<string>",
"key": "<string>",
"label": "<string>",
"required": True,
"options": [
{
"label": "<string>",
"value": "<string>",
"description": "<string>",
"points": 123,
"actionText": "<string>"
}
],
"conditions": [
{
"id": "<string>",
"type": "CONDITION",
"field": "<string>",
"value": "<string>",
"aggregator": "SINGLE"
}
],
"config": {
"type": "SHORT_TEXT",
"description": "<string>",
"showDescriptionInDrawer": True,
"tooltip": "<string>",
"inlineChoiceDisplay": True,
"scoring": {
"enabled": True,
"points": 123,
"actionText": "<string>"
},
"hideInSummary": True,
"placeholder": "<string>",
"minLength": 123,
"maxLength": 123,
"pattern": "<string>"
},
"unitId": "<string>",
"parentElementId": "<string>",
"activityDefinitionId": "<string>",
"metadata": {},
"schedule": {}
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
formId: '<string>',
elements: [
{
id: '<string>',
key: '<string>',
label: '<string>',
required: true,
options: [
{
label: '<string>',
value: '<string>',
description: '<string>',
points: 123,
actionText: '<string>'
}
],
conditions: [
{
id: '<string>',
type: 'CONDITION',
field: '<string>',
value: '<string>',
aggregator: 'SINGLE'
}
],
config: {
type: 'SHORT_TEXT',
description: '<string>',
showDescriptionInDrawer: true,
tooltip: '<string>',
inlineChoiceDisplay: true,
scoring: {enabled: true, points: 123, actionText: '<string>'},
hideInSummary: true,
placeholder: '<string>',
minLength: 123,
maxLength: 123,
pattern: '<string>'
},
unitId: '<string>',
parentElementId: '<string>',
activityDefinitionId: '<string>',
metadata: {},
schedule: {}
}
]
})
};
fetch('https://app.azalt.co/api/v1/form-elements', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.azalt.co/api/v1/form-elements",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'formId' => '<string>',
'elements' => [
[
'id' => '<string>',
'key' => '<string>',
'label' => '<string>',
'required' => true,
'options' => [
[
'label' => '<string>',
'value' => '<string>',
'description' => '<string>',
'points' => 123,
'actionText' => '<string>'
]
],
'conditions' => [
[
'id' => '<string>',
'type' => 'CONDITION',
'field' => '<string>',
'value' => '<string>',
'aggregator' => 'SINGLE'
]
],
'config' => [
'type' => 'SHORT_TEXT',
'description' => '<string>',
'showDescriptionInDrawer' => true,
'tooltip' => '<string>',
'inlineChoiceDisplay' => true,
'scoring' => [
'enabled' => true,
'points' => 123,
'actionText' => '<string>'
],
'hideInSummary' => true,
'placeholder' => '<string>',
'minLength' => 123,
'maxLength' => 123,
'pattern' => '<string>'
],
'unitId' => '<string>',
'parentElementId' => '<string>',
'activityDefinitionId' => '<string>',
'metadata' => [
],
'schedule' => [
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.azalt.co/api/v1/form-elements"
payload := strings.NewReader("{\n \"formId\": \"<string>\",\n \"elements\": [\n {\n \"id\": \"<string>\",\n \"key\": \"<string>\",\n \"label\": \"<string>\",\n \"required\": true,\n \"options\": [\n {\n \"label\": \"<string>\",\n \"value\": \"<string>\",\n \"description\": \"<string>\",\n \"points\": 123,\n \"actionText\": \"<string>\"\n }\n ],\n \"conditions\": [\n {\n \"id\": \"<string>\",\n \"type\": \"CONDITION\",\n \"field\": \"<string>\",\n \"value\": \"<string>\",\n \"aggregator\": \"SINGLE\"\n }\n ],\n \"config\": {\n \"type\": \"SHORT_TEXT\",\n \"description\": \"<string>\",\n \"showDescriptionInDrawer\": true,\n \"tooltip\": \"<string>\",\n \"inlineChoiceDisplay\": true,\n \"scoring\": {\n \"enabled\": true,\n \"points\": 123,\n \"actionText\": \"<string>\"\n },\n \"hideInSummary\": true,\n \"placeholder\": \"<string>\",\n \"minLength\": 123,\n \"maxLength\": 123,\n \"pattern\": \"<string>\"\n },\n \"unitId\": \"<string>\",\n \"parentElementId\": \"<string>\",\n \"activityDefinitionId\": \"<string>\",\n \"metadata\": {},\n \"schedule\": {}\n }\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://app.azalt.co/api/v1/form-elements")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"formId\": \"<string>\",\n \"elements\": [\n {\n \"id\": \"<string>\",\n \"key\": \"<string>\",\n \"label\": \"<string>\",\n \"required\": true,\n \"options\": [\n {\n \"label\": \"<string>\",\n \"value\": \"<string>\",\n \"description\": \"<string>\",\n \"points\": 123,\n \"actionText\": \"<string>\"\n }\n ],\n \"conditions\": [\n {\n \"id\": \"<string>\",\n \"type\": \"CONDITION\",\n \"field\": \"<string>\",\n \"value\": \"<string>\",\n \"aggregator\": \"SINGLE\"\n }\n ],\n \"config\": {\n \"type\": \"SHORT_TEXT\",\n \"description\": \"<string>\",\n \"showDescriptionInDrawer\": true,\n \"tooltip\": \"<string>\",\n \"inlineChoiceDisplay\": true,\n \"scoring\": {\n \"enabled\": true,\n \"points\": 123,\n \"actionText\": \"<string>\"\n },\n \"hideInSummary\": true,\n \"placeholder\": \"<string>\",\n \"minLength\": 123,\n \"maxLength\": 123,\n \"pattern\": \"<string>\"\n },\n \"unitId\": \"<string>\",\n \"parentElementId\": \"<string>\",\n \"activityDefinitionId\": \"<string>\",\n \"metadata\": {},\n \"schedule\": {}\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.azalt.co/api/v1/form-elements")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"formId\": \"<string>\",\n \"elements\": [\n {\n \"id\": \"<string>\",\n \"key\": \"<string>\",\n \"label\": \"<string>\",\n \"required\": true,\n \"options\": [\n {\n \"label\": \"<string>\",\n \"value\": \"<string>\",\n \"description\": \"<string>\",\n \"points\": 123,\n \"actionText\": \"<string>\"\n }\n ],\n \"conditions\": [\n {\n \"id\": \"<string>\",\n \"type\": \"CONDITION\",\n \"field\": \"<string>\",\n \"value\": \"<string>\",\n \"aggregator\": \"SINGLE\"\n }\n ],\n \"config\": {\n \"type\": \"SHORT_TEXT\",\n \"description\": \"<string>\",\n \"showDescriptionInDrawer\": true,\n \"tooltip\": \"<string>\",\n \"inlineChoiceDisplay\": true,\n \"scoring\": {\n \"enabled\": true,\n \"points\": 123,\n \"actionText\": \"<string>\"\n },\n \"hideInSummary\": true,\n \"placeholder\": \"<string>\",\n \"minLength\": 123,\n \"maxLength\": 123,\n \"pattern\": \"<string>\"\n },\n \"unitId\": \"<string>\",\n \"parentElementId\": \"<string>\",\n \"activityDefinitionId\": \"<string>\",\n \"metadata\": {},\n \"schedule\": {}\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true
}{
"code": "BAD_REQUEST",
"message": "Invalid input data",
"issues": []
}{
"code": "UNAUTHORIZED",
"message": "Authorization not provided",
"issues": []
}{
"code": "FORBIDDEN",
"message": "Insufficient access",
"issues": []
}{
"code": "NOT_FOUND",
"message": "Not found",
"issues": []
}{
"code": "INTERNAL_SERVER_ERROR",
"message": "Internal server error",
"issues": []
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Response
Successful response
⌘I

