Create form template field
POST
/administration/form-templates/{templateId}/fieldsAuthorization
AuthorizationOAuth2 access token · headerrequiredScopes:
api:writeor
AuthorizationBearer token (JWT) · headerrequiredPath parameters
templateIdstringrequiredRequest body
requiredapplication/jsondescriptionstringhelpTextobject | nullkeyobject | nulllabelstringrequiredplaceholderobject | nullrequiredbooleanselectOptionsobject[]settingsobjectsortnumbertypestringrequiredAllowed:
TextTextareaNumberDateCheckboxSelectMultiSelectCurrencyUrlSectionHeadingFileUploadSignatureRadioResponses
201
successbooleanrequiredOperation success flag
401Unauthorized - Invalid or missing authentication token
403Forbidden - Insufficient API scopes or permissions
Request
curl -X POST "https://leadtime.app/api/public/administration/form-templates/string/fields" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"description": "string",
"helpText": {},
"key": {},
"label": "string",
"placeholder": {},
"required": true,
"selectOptions": [
{}
],
"settings": {},
"sort": 0,
"type": "Text"
}'const response = await fetch("https://leadtime.app/api/public/administration/form-templates/string/fields", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"description": "string",
"helpText": {},
"key": {},
"label": "string",
"placeholder": {},
"required": true,
"selectOptions": [
{}
],
"settings": {},
"sort": 0,
"type": "Text"
})
});import requests
response = requests.post(
"https://leadtime.app/api/public/administration/form-templates/string/fields",
headers={
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
},
json={
"description": "string",
"helpText": {},
"key": {},
"label": "string",
"placeholder": {},
"required": True,
"selectOptions": [
{}
],
"settings": {},
"sort": 0,
"type": "Text"
},
)Response
{
"success": true
}Unauthorized - Invalid or missing authentication token
Forbidden - Insufficient API scopes or permissions