Documents

Create a document field

Create a new field in a document. Either page_id or page_num has to be specified. Field position and size are in page units: every page is 900 units wide and its height follows the page aspect ratio.

A successful request returns the id of the created field.

post/v1/documents/{id}/fields

Request

  • Base URL: https://api.getaccept.com
  • URL: https://api.getaccept.com/v1/documents/{id}/fields
  • Auth: HTTP bearer

Path parameters

idstring required

Id of the document.

Request body

page_idstring nullable

Unique page id. Either page_id or page_num is required.

page_numnumber nullable

Actual page number in the document, starting at 1. Takes precedence over page_id when it matches a page. Either page_id or page_num is required.

field_type'check' | 'dropdown' | 'formatted' | 'initials' | 'link' | 'merge' | 'signature' | 'signature_intials' | 'text' required

Kind of field, such as text, signature or initials.

field_labelstring nullable

Label to place next to the field. Defaults to an empty string.

field_valuestring nullable

Pre-defined value for the field. For signature fields, sender or recipient.

field_optionsstring[] nullable

Selectable options of the field, required for a dropdown and ignored for every other field type.

is_collectableboolean nullable

If the field is to be filled out by the sender or recipient. Defaults to false.

is_editableboolean nullable

If the field can be edited by the sender. Defaults to true.

is_requiredboolean nullable

If the field is required to be filled out. Defaults to false.

recipient_idstring nullable

Unique id of the recipient to fill out this field.

field_topnumber nullable

Distance from the top edge of the page to the top of the field, in page units: every page is 900 units wide and its height follows the page aspect ratio, so an A4 page is about 1273 units tall. Stored as a whole number. Defaults to 0.

field_leftnumber nullable

Distance from the left edge of the page to the left of the field, in page units: every page is 900 units wide and its height follows the page aspect ratio, so an A4 page is about 1273 units tall. Stored as a whole number. Defaults to 0.

field_widthnumber nullable

Width of the field, in page units: every page is 900 units wide and its height follows the page aspect ratio, so an A4 page is about 1273 units tall. Stored as a whole number. Defaults to 0.

field_heightnumber nullable

Height of the field, in page units: every page is 900 units wide and its height follows the page aspect ratio, so an A4 page is about 1273 units tall. Stored as a whole number. Defaults to 0.

validation_regexstring nullable

Regular expression the entered value has to match.

validation_warningstring nullable

Message shown when the entered value does not match validation_regex.

Response

The request succeeded.

field_idstring required

Id of the created field.

Changes

No recorded changes to this operation across all 1 revision of this API.