Get contract template preview
Returns the template's file_type and content_type; content_url is
always null. A caller allowed to edit templates (contracts.templates.write)
also gets a builder_session (mode "builder"), the same token as Start
Template Builder Session. Anyone else gets mode "content" and no session:
fetch the file from Get Contract Template Preview Content instead.
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>. - API credentials need the
contracts.templates.readpermission. Dashboard users need the OWNER, OPERATIONS, or DEVELOPER role, or a custom role that includes this permission. - Contract signing must be enabled for the client. If it 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. Alwaysnullfor 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). It is the same session Start Template Builder Session returns.
For a PDF template, fetch the raw file instead from Get Contract Template Preview Content. For a DOCX template, render the embedded builder with builder_session.
Error responses
| Status | When |
|---|---|
400 | The template has not been provisioned for signing yet |
403 | Contract signing is disabled for the client |
404 | No template version with this ID exists under your client |
503 | The document builder is not available because contract signing is not configured on the platform |
Standard 401 (authentication), 403 (insufficient permission or role), and 429 (rate limit) responses apply to every endpoint and are documented in the Error reference.