Compare documents, templates, and forms
Templates
A template holds the fields, parties, and settings of a kind of document, such as an employment contract or an NDA. Templates have their own fields and parties, managed with the/templates/{id}/fields and /templates/{id}/parties endpoints. Fields have the same shape as on a document, and a template party nests its company in company, as a document party does.
To create a document from a template, send templateId to POST /documents:
parties, they replace the template’s parties, and sajn removes the signature and initials boxes that were placed for the template’s parties.
The usual flow from a template is the following:
- Create the template in the sajn editor, and set a key on every value you want to fill in, such as
salaryorstart-date. - Create a document from the template, with the real parties.
- Fill in the values by key with
PATCH /documents/{id}/field-values. For more information, see Fields. - Send the document.
GET /documents?templateId= with the template ID. For more information, see Templates and forms and Managing templates.
Forms
A form is a public link that anyone can open, without an account. The visitor answers the form’s questions, and sajn creates a document from the form, fills in the answers, and sends it to the visitor to sign. Use a form for sign-ups, applications, and order forms, where you don’t know the signer in advance. A form owns its own document base: fields, parties, and settings. You create it blank, or as a copy of a template. The copy is independent, so later changes to the template don’t affect the form. One of the form’s parties is the respondent, theSIGNER slot that the visitor fills.
A form goes through the following steps:
- Create a draft form, blank or from a
templateId. - Configure its questions, fields, and parties, and select the respondent party.
- Publish the form. The user who publishes becomes the sender of every document the form creates, and must be allowed to send without approval.
- Share the form’s public URL.
- Read the answers with
GET /forms/{id}/submissions, or subscribe to theform.submittedwebhook event.
Next steps
Fields
Field types, keys, and the values parties fill in.
Templates and forms guide
Create a document from a template and fill it in.

