Get Contract Template Preview

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.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

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.read permission. 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 (docx or pdf).
  • content_type - content type to use when rendering the preview content.
  • content_url - authenticated URL to load for inline-renderable previews. Always null for this endpoint.
  • builder_session - an embedded document-builder session containing template_id, signing_template_id, external_id, a short-lived token, and base_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

StatusWhen
400The template has not been provisioned for signing yet
403Contract signing is disabled for the client
404No template version with this ID exists under your client
503The 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.

Path Params
string
required
Responses

Language
Credentials
Bearer
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json