---
title: "Update contract template"
method: PATCH
path: "/api/v1/contracts/templates/{id}"
tags: ["Contracts"]
---

# Update contract template

`PATCH /api/v1/contracts/templates/{id}`

## Request

- Base URL: `http://localhost:3002`
- URL: `http://localhost:3002/api/v1/contracts/templates/{id}`
- Auth: HTTP bearer

Updates an existing contract template by ID.

## Path parameters

- `id` string, required

## Request body

- object
  - `name` string
  - `content` string
  - `isActive` boolean

## Response `200`

Updated contract template

- object
  - `data` ContractTemplate
    - `id` string, required
    - `boatOwnerId` string, required
    - `name` string, required
    - `content` string, required
    - `version` integer, required
    - `isActive` boolean, required
    - `createdAt` string, date-time, required
    - `updatedAt` string, date-time, required

## Other responses

- `400`: Validation error
- `401`: Unauthorized
- `404`: Contract template not found

---

[API](https://skmtc.dev/chartercaptain/apis/charter-captain-api.md) · [All operations](https://skmtc.dev/chartercaptain/apis/charter-captain-api/llms.txt) · [OpenAPI document](https://skmtc.dev/chartercaptain/apis/charter-captain-api/revisions/1ffea1113adb?raw)
