Templates API

Templates are the starting points an account keeps for its contracts, proposals, and projects. They are written in the app. The API reads them and makes new records from them, which is where an account's own wording and its usual project structure come from.

Contract and Proposal Templates

GET /api/v2/contract_templates
GET /api/v2/proposal_templates

The account's own templates, followed by the built-in defaults Clientary provides. A built-in default has a negative id and built_in set, and no page of its own. Pass defaults=false to leave the built-in ones out.

{
  "total_count": 9,
  "contract_templates": [
    { "id": 12, "subject": "Standard terms", "description": "Our usual terms", "built_in": false, "contract_sections": [ ... ] },
    { "id": -1, "subject": "Simple Contract", "description": "This is a basic contract, suitable for all purposes", "built_in": true, "contract_sections": [ ... ] },
    ...
  ]
}
GET /api/v2/contract_templates/:id
GET /api/v2/proposal_templates/:id

One template with its sections. A negative id reads a built-in default.

Making a contract or proposal from a template

Create the document with a template_id alongside the usual fields. The template's sections, title, signature, and settings are copied first, and anything in the request is applied on top, so a subject in the request replaces the template's, and sections in the request stand in for the template's sections. The new document records the template it came from, a built-in one by its negative id.

POST /api/v2/proposals
{
  "template_id": 12,
  "proposal": { "client_id": 7, "date": "2026-10-01" }
}

Project Templates

GET /api/v2/project_templates

Accepts q to search by name and description, and page. Each template lists the phases and tasks by name that a project made from it starts with.

{
  "page_size": 30,
  "page_count": 1,
  "total_count": 1,
  "project_templates": [
    {
      "id": 4,
      "template_name": "Website build",
      "template_description": "Design, build, launch",
      "project_type": 1,
      "rate": 5000.0,
      "currency_code": "usd",
      "phases": ["Design", "Build", "Launch"],
      "tasks": ["Kickoff call", "Wireframes", "Deploy"]
    }
  ]
}
GET /api/v2/project_templates/:id
Making a project from a template

Create the project with a template_id. The template's settings, phases, and tasks are copied, with each task kept in its phase, and anything in the request is applied on top. The new project records the template it came from.

POST /api/v2/projects
{
  "template_id": 4,
  "project": { "client_id": 7, "name": "Acme website" }
}