Skip to content

Create Form

POST /v1/forms

Header Type Required Description
accept string โœ… Expected response format. Use application/json.
content-type string โœ… Request body format. Use application/json.
X-API-Key string โœ… API key for authentication.
X-API-Token string โœ… Token identifying the current user or session.
Field Type Required Description
name string โœ… The title or name of the form.
subject string โœ… Subject line or short summary.
dueDate string (date) โŒ Due date in YYYY-MM-DD format.
senderUserId string โœ… User ID (username) of the form sender.
receiverUserIds array[string] โœ… List of recipient user IDs (usernames).
data array[object] โœ… Array describing the input fields within the form.
status string โœ… Status of the form โ€” e.g., drafted, published, or completed.
responseType string โŒ type of stage: hierarchy
responseTiers array[object] โŒ object of response tiers payload
Field Type Required Description
title

text
allow: โ€˜โ€™ and null

โŒ Stage title
description

text
allow: โ€˜โ€™ and null

โŒ Stage Description
tier

number
min: 1
max: 100

โŒ

Order of stage
1 = first stage

responders array objects โŒ

{
userId: username
}

status

text
[โ€˜submittedโ€™, โ€˜draftedโ€™, โ€˜approvedโ€™, โ€˜rejectedโ€™, โ€˜mixedโ€™, โ€˜canceledโ€™]

โŒ
dueDate timestamp โŒ
duration

number
min: 0
max: timstamp

โŒ
minimumWeight

number
min: 0

โŒ minimum of approve weight before go to next stage
curl --location '{{domain}}/v1/forms' \
--header 'accept: application/json' \
--header 'X-API-Key: x-api-key' \
--header 'X-API-Token: x-api-token' \
--header 'content-type: application/json' \
--data-raw '{
"name": "Example Form",
"subject": "Example",
"dueDate": "2025-09-30",
"senderUserId": "senderUserId",
"receiverUserIds": ["receiverUserIds"],
"data": [
{
"type": "textinput",
"name": "Field 1 (text)",
"value": "this is the best form",
"meta": {},
"editable": true
},
{
"type": "radio",
"name": "Field 2 (radio)",
"meta": {
"options": [{
"label": "Yes",
"value": "a1"
}, {
"label": "No",
"value": "a2"
}]
},
"editable": true
},
{
"type": "action",
"name": "Action Buttons",
"meta": {
"options": [{
"label": "APPROVE no val",
"type": "approved"
},{
"label": "REJECT",
"type": "rejected",
"value": "1"
},{
"label": "OTHER Action",
"type": "other",
"value": "2",
"color": "#000000"
}]
}
}
],
"status": "submitted"
}'
curl --location '{{domain}}/v1/forms' \
--header 'accept: application/json' \
--header 'X-API-Key: x-api-key' \
--header 'X-API-Token: x-api-token' \
--header 'content-type: application/json' \
--data-raw '{
"name": "Example Form",
"subject": "Example",
"dueDate": "2025-09-30",
"senderUserId": "senderUsername",
"receiverUserIds": [
"receiverUsername"
],
"data": [
{
"type": "textinput",
"name": "Field 1 (text)",
"value": "this is the best form",
"meta": {},
"editable": true
},
{
"type": "radio",
"name": "Field 2 (radio)",
"meta": {
"options": [
{
"label": "Yes",
"value": "a1"
},
{
"label": "No",
"value": "a2"
}
]
},
"editable": true
},
{
"type": "action",
"name": "Action Buttons",
"meta": {
"options": [
{
"label": "APPROVE no val",
"type": "approved"
},
{
"label": "REJECT",
"type": "rejected",
"value": "1"
},
{
"label": "OTHER Action",
"type": "other",
"value": "2",
"color": "#000000"
}
]
}
}
],
"status": "submitted",
"responseType": "hierarchy",
"responseTiers": [
{
"description": "tier1 description",
"title": "tier1 title",
"tier": 1,
"allowedResponders": [
{
"type": "user",
"entityId": "receiverUsername1",
"weight": 1
},
{
"type": "user",
"entityId": "receiverUsername2",
"weight": 1
}
],
"responders": [
{
"userId": "receiverUsername1"
},
{
"userId": "receiverUsername2"
}
],
"minimumWeight": 2
},
{
"description": "tier2 description",
"title": "tier2 title",
"tier": 2,
"allowedResponders": [
{
"type": "user",
"entityId": "receiverUsername3",
"weight": 1
}
],
"responders": [
{
"userId": "receiverUsername3"
}
],
"minimumWeight": 1
}
]
}'