Publish contract template
Publishes a DRAFT template, making it available for use in signing workflows.
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Publish a contract template version, transitioning it from DRAFT to PUBLISHED so it can be used in signing workflows. The endpoint re-syncs the template's detected signer roles and fillable fields from the signing provider, validates that the template is ready, stamps published_at, and returns the updated template version.
Authentication & access
- Requires a client API token:
Authorization: Bearer <token>. - The caller must hold the
contracts.templates.publishpermission and have the OWNER or OPERATIONS role. - Contract signing must be enabled for the client. If it is disabled the request returns
403.
Path parameters
template_version_id(string, required) — the template version to publish. It must belong to your client.
Publish preconditions
Before a template can be published it must satisfy all of the following, otherwise the request returns 400:
- It must not be
ARCHIVED. Archived templates cannot be published. - It must have been provisioned for signing (prepared in the document builder).
- It must define at least one signer role.
- It must contain at least one fillable field (for example, a signature field).
On success the template's roles and fields are refreshed from the signing provider, its status becomes PUBLISHED, and published_at is set to the time of publication.
Response
200 — Returns the updated ContractTemplateVersionResponse, including id, name, status (now PUBLISHED), external_id, the signer roles, detected fields, detected_variables, and published_at.
Error responses
| Status | When |
|---|---|
400 | Template is archived; template has not been provisioned for signing; template has no signer roles; template has no fillable fields |
403 | Contract signing is disabled for the client |
404 | No template version with this template_version_id exists under your client |
422 | Path parameter failed validation |
Standard 401 (authentication), 403 (insufficient permission or role), and 429 (rate limit) responses apply to every endpoint and are documented in the Error reference.