Document Fields
Place and manage fields on document pages.
Document Fields
Fields are positioned elements on document pages — signature boxes, text inputs, date pickers, etc. Coordinates are normalized (0–1) relative to the page dimensions.
GET
/api/v1/documents/{id}/fieldsRequired scope:read:documents
POST
/api/v1/documents/{id}/fieldsPlace a field
Required scope:write:documents
PUT
/api/v1/documents/{id}/fields/{fid}Update a field
Required scope:write:documents
DELETE
/api/v1/documents/{id}/fields/{fid}Remove a field
Required scope:write:documents
Field types
Same types as form questions: digital_signature, initials, short_text, date, email, phone, number, yes_no, mcq, dropdown.
Place a field
Required Fields
| Name | Type | Description |
|---|---|---|
| label | string | Field labelSignature |
| type | FieldType | Field typedigital_signature |
| pageNumber | integer | 1-indexed page number |
| x | float | Normalized x position (0–1 from left) |
| y | float | Normalized y position (0–1 from top) |
| width | float | Normalized width (0–1) |
| height | float | Normalized height (0–1) |
Optional Fields
| Name | Type | Description |
|---|---|---|
| isRequired | boolean | Whether the field must be filledtrue |
| isReadOnly | boolean | Pre-filled and lockedfalse |
| defaultValue | string | Pre-populated value. Use __today__ for current date. |
| assigneeRole | string | Signer role that fills this fieldsigner_1 |
| direction | auto | rtl | ltr | Text direction for RTL languages |
curl -X POST https://formalingo.com/api/v1/documents/DOC_ID/fields \
-H "Authorization: Bearer af_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"label": "Client Signature",
"type": "digital_signature",
"pageNumber": 3,
"x": 0.1,
"y": 0.85,
"width": 0.35,
"height": 0.06,
"isRequired": true,
"assigneeRole": "signer_1"
}'