Custom Templates
Create and manage custom templates defined in YAML, including publishing new template versions
List Custom Templates
This endpoint returns a list of the custom templates in your organization, ordered by name. Each template's current_definition is the YAML of its current version, which new agreements are created from. See Custom Templates for the YAML reference.
Custom templates must be enabled for your organization; these endpoints return 404 otherwise.
query Parameters
page[number]Page number to retrieve. Defaults to 1.
page[size]Number of records per page. Defaults to 15.
Headers
AuthorizationThe Authorization header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE.
List Custom Templates › Responses
OK
Create Custom Template
This endpoint creates a new custom template from a YAML definition. The definition is saved as the template's first version and becomes the one new agreements use. Provide user_email or user_id to record which user in your organization created it. Pass custom_term_id to attach custom terms from your organization, so agreements created from the template include them.
See Custom Templates for the full YAML reference.
Custom templates must be enabled for your organization; these endpoints return 404 otherwise.
Headers
AuthorizationThe Authorization header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE.
Create Custom Template › Request Body
nameA name for the custom template.
definitionThe YAML definition of the template's title, sections, and fields. Saved as the template's first version. See Custom Templates for the full YAML reference.
user_emailEmail of the user in your organization recorded as the version's creator. Provide user_email or user_id.
user_idID of the user in your organization recorded as the version's creator. Provide user_email or user_id.
custom_term_idID of custom terms in your organization to attach to the template. Agreements created from the template include those terms.
Create Custom Template › Responses
Created
Get Custom Template
This endpoint returns the details of a specific custom template by its UUID, including the YAML of its current version as current_definition.
Custom templates must be enabled for your organization; these endpoints return 404 otherwise.
path Parameters
idThe UUID of the custom template.
Headers
AuthorizationThe Authorization header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE.
Get Custom Template › Responses
OK
Archive Custom Template
This endpoint archives a custom template so it no longer appears in your templates list and can no longer be used to create agreements. Agreements already created from the template are unaffected.
Custom templates must be enabled for your organization; these endpoints return 404 otherwise.
path Parameters
idThe UUID of the custom template to archive.
Headers
AuthorizationThe Authorization header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE.
Archive Custom Template › Responses
No Content. The custom template was archived successfully.
Update Custom Template
This endpoint renames a custom template. Only the name can be changed here; the template's content changes by publishing a new version with POST /v1/custom_templates/{id}/versions.
Custom templates must be enabled for your organization; these endpoints return 404 otherwise.
Pass custom_term_id to attach custom terms from your organization, or an empty string to unlink them. An id for terms outside your organization returns 422.
path Parameters
idThe UUID of the custom template to update.
Headers
AuthorizationThe Authorization header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE.
Update Custom Template › Request Body
nameThe new name for the custom template.
custom_term_idID of custom terms in your organization to attach to the template, so agreements created from the template include those terms. Pass an empty string to unlink the terms, which is why this field is not constrained to the uuid format.
Update Custom Template › Responses
OK
Create Custom Template Version
This endpoint publishes a new version of a custom template from a YAML definition. The new version immediately becomes the one new agreements use. Agreements already created from the template keep the version they were made with, so publishing never changes an agreement that is in flight. Provide user_email or user_id to record which user in your organization published it.
See Custom Templates for the full YAML reference.
Custom templates must be enabled for your organization; these endpoints return 404 otherwise.
path Parameters
idThe UUID of the custom template to publish a new version for.
Headers
AuthorizationThe Authorization header is used to authenticate with the API using your API key. Value is of the format Bearer YOUR_KEY_HERE.
Create Custom Template Version › Request Body
definitionThe YAML definition for the new version. See Custom Templates for the full YAML reference.
user_emailEmail of the user in your organization recorded as the version's creator. Provide user_email or user_id.
user_idID of the user in your organization recorded as the version's creator. Provide user_email or user_id.
Create Custom Template Version › Responses
Created