Create Form
Section titled โCreate FormโPOST /v1/forms
Headers
Section titled โHeadersโ| 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 |
ResponseTiers Object
Section titled โResponseTiers Objectโ| Field | Type | Required | Description |
|---|---|---|---|
| title | text |
โ | Stage title |
| description | text |
โ | Stage Description |
| tier | number |
โ | Order of stage |
| responders | array objects | โ | { |
| status | text |
โ | |
| dueDate | timestamp | โ | |
| duration | number |
โ | |
| minimumWeight | number |
โ | minimum of approve weight before go to next stage |
Create Form by single stage
Section titled โCreate Form by single 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"}'Create Form by sequence stage & Parallel
Section titled โCreate Form by sequence stage & Parallelโ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 } ]}'Was this page helpful?
Thank you for your feedback!