Add fillable fields

Steps:

▶ Get document ID

Add fillable fields:

  • specify the position on the page
  • width and height
  • page number
  • field label
  • role
  • type
  • whether it’s required or not
  • prefilled text if any

It might be easier to use the signNow editor in the web app to arrange fields correctly on your document.

Required parameters for a fillable field object:

“x” - horizontal position on the page; how many pixels away from the left edge of the page

“y” - vertical position on the page; how many pixels away from the top of the page

“width” - how many pixels wide the field is

“height” - how many pixels high the field is

Popular Field Sizes

Field Type Purpose Width & Height, Font Size 10 Width & Height, Font Size 12 Width & Height, Font Size 10
Text field name
Text field email address
Text field US phone number
Signature field for signing a document
Hint

Equivalent A4 paper dimensions in pixels at 300 dpi or 72 dpi resolution respectively are: 2480 ⨯ 3508 pixels and 595 ⨯ 842 pixels.

“page_number” - page numbering starts with 0

“label” - hint for the signer inside a fillable field about the field type, e.g. first_name or text_1; once the field is filled in, the value automatically appears in all the fields with the same label

“name” - unique field name

“role” - which role the field is assigned to, e.g. Signer_1

“required” - whether the field is mandatory to fill in, e.g. true/false

“type” - could be “text”, “signature”, “initials”, “checkbox”, “radiobutton”, or “enumeration” (stands for a dropdown menu)

“prefilled_text” - editable text that appears in the field when the signer opens the document, e.g. Lucy

curl -X PUT \
  https://api-eval.signnow.com/document/{{document_id}} \
  -H 'Authorization: Bearer {{access_token}}'\
  -H 'Content-Type: application/json' \
  -d '{
  "fields": [
	{
    "x": 305,
    "y": 18,
    "width": 122,      
    "height": 10,
    "page_number": 0,
    "label": "first_name",
    "role": "Signer",
    "required": true,
    "type": "text",
    "prefilled_text":"John"
  },
  {
    "x": 305,
    "y": 38,
    "width": 122,      
    "height": 10,
    "page_number": 0,
    "label": "last_name",
    "role": "Signer",
    "required": true,
    "type": "text",
    "prefilled_text":"Doe"
  },
  {
    "x":305,
    "y":67,
    "width":100,
    "height":34,
    "page_number":0,
    "label":"a sample label",
    "role":"Signer",
    "required":true,
    "type":"signature"
  }
]
}'