Get contract template preview
Always returns a builder_session (a short-lived embedded document
builder token, the same as Start Template Builder Session) alongside the
template's file_type and content_type; content_url is always null.
For PDF templates, fetch the raw bytes instead from Get Contract Template
Preview Content; for DOCX templates, render the embedded builder using
builder_session. Returns 404 if the template does not exist.
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Return the preview strategy for one of your contract template versions. It resolves the template version you own, opens a short-lived embedded document-builder session for it, and returns the mode the dashboard should use to render the preview along with the session details. This is a read-only call: it does not modify the template.
Authentication & access
- Requires a client API token:
Authorization: Bearer <token>. - The caller must hold the
contracts.templates.readpermission and have the OWNER, OPERATIONS, or DEVELOPER role. - The client must have contract signing enabled. If the feature is disabled the request returns
403.
Path parameters
template_version_id(string, required) — the ID of the contract template version to preview. It must belong to your client.
Response
200 — Returns a ContractTemplatePreviewResponse:
mode— always"builder". The dashboard renders the preview through the embedded document builder.file_type— the source document's file type (docxorpdf).content_type— content type to use when rendering the preview content.content_url— authenticated URL to load for inline-renderable previews.nullfor this endpoint.builder_session— an embedded document-builder session containingtemplate_id,signing_template_id,external_id, a short-livedtoken, andbase_url(the browser host to embed the builder from, not the API origin).
Error responses
| Status | When |
|---|---|
400 | The template has not been provisioned for signing yet; the template is archived |
403 | Contract signing is disabled for the client |
404 | No template version with this ID exists under your client |
Standard 401 (authentication), 403 (insufficient permission or role), and 429 (rate limit) responses apply to every endpoint and are documented in the Error reference.