Templates

Create a new template

Reserves a template id and the initial draft version. For a PDF source (the default) the response also carries a presigned URL the browser uploads the file to. Pass a content body with sourceKind: "document" to author the template as rich text instead; there is then no file to upload, so no uploadUrl is returned.

post/v1/templates

Request

  • Base URL: https://api.signvoy.com
  • URL: https://api.signvoy.com/v1/templates
  • Auth: one of:
    • API key in header X-Workspace-Id
    • HTTP bearer
    • HTTP bearer

Request body

namestring required

Template name

fileNamestring

Original PDF filename. Required for a pdf source; omit it for a document source, which has no uploaded file.

pageCountnumber

Number of pages. Required for a pdf source; omit it for a document source, whose length is only known once the body is rendered.

contentobject

Optional initial draft content (recipients/fields/rules, plus the sourceFiles manifest when several PDFs were merged on upload). Pass a body with sourceKind: "document" to author the template as rich text instead of uploading a PDF.

kind'reusable' | 'oneoff'

Whether this is a reusable template or the single-use container behind a one-off document. One-off templates are hidden from the templates list and are published implicitly when a document is created from them.

Example request

{
  "name": "NDA Template",
  "fileName": "nda.pdf",
  "pageCount": 3
}

Response

templateIdstring uuid required

Newly created template ID

draftVersionIdstring uuid required

ID of the initial draft version

uploadUrlstring uri

Presigned PUT URL for uploading the source PDF directly to storage. Upload the PDF bytes to this URL with Content-Type: application/pdf. Absent for a document-source template, which has no file to upload — its PDF is rendered from the body at signing time.

Changes

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