Save a template
save_templateSave a document as a template without sending it to anyone. Use it when the user asks to save, upload or add a template, for example "make a sales contract and save it as a template". Give the document as markdown you wrote (with the same field tokens as send_for_signature, such as {{signature:signer}}, {{text:signer:Company name}} or {{signature:sender}}; for what changes on each send, such as the customer, price or start date, write a named field such as {{var:Customer company}} or [Customer company], so each send fills it from document.values), a PDF (upload_id, pdf_url or pdf_base64), or a Google Doc link shared with "anyone with the link" (saved as the link, so each send uses the Doc as it is then). Portant checks the document the way a send would, then saves it. Returns template_id; send it later with send_for_signature and document.template_id. Plus and Scale plans; needs Portant connected with sign-in.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | A short name for the template, with no signer name in it, for example "Sales agreement". A send from the template uses it as the title. | |
| fields | No | Only for a PDF or Google Doc, when you know where the fields go. The same as fields in send_for_signature. Without fields, each send looks for the signature lines in the document, and adds a signature page when it cannot place them. | |
| document | Yes | Exactly one of these, except that template_id can come with values and markdown. |