Skip to content

Template API

Kunal Priyadarshi edited this page Oct 3, 2026 · 1 revision

Template API

All endpoints below use /api/v1/templates, user authentication, appropriate template permissions, and relevant owner/share access.

Method Suffix Purpose
GET / List visible templates
POST / Create a template
GET /{id} Retrieve a template
PATCH /{id} Update an editable template
DELETE /{id} Delete a template under applicable rules
POST /from-agreement Convert an accessible agreement to a template
GET / POST /{id}/versions List / create template versions
GET / POST /{id}/shares List / grant shares
DELETE /{id}/shares/{shareId} Revoke a share
POST /{id}/publish Set publication state
POST /{id}/instantiate Create a separate agreement draft

Create and revise

Creation requires a title of 2–255 characters. Optional properties include description (up to 1,000 characters), file metadata, htmlContent (up to 512 KB), fields, tags, and metadata. Uploaded file metadata supports PDF and Word MIME types with a 25 MB validator limit. HTML is sanitized by the application; always review resulting layout.

PATCH accepts editable title, description, HTML, fields, tags, and metadata. New versions accept optional changeSummary, htmlContent, and fields. Versioning does not revise already-instantiated agreements.

POST /from-agreement requires an agreementId UUID and supports optional title, description, and tags.

Share and publish

Share body:

{"targetType":"team","targetId":"<TEAM_UUID>","accessLevel":"USE"}

targetType is user or team; accessLevel is USE or EDIT. These API values differ from some display wording in the sharing UI. Only grant the access actually needed.

Publication body:

{"isPublished":true}

Instantiation accepts optional title and description and creates a new agreement. Review its content and configure actual recipients before sending.

List parameters

page defaults to 1 and limit to 20 (maximum 100). Filters include search, tag, isPublished, isArchived, and view (library, mine, shared). Results still reflect your permissions and shares.

For the user workflow, see Template Management. For version differences and current UI limits, see Feature Availability.

Clone this wiki locally