# Change a message template

Edits one template's words: `name`, `subjectTemplate`, `greetingTemplate`, `bodyTemplate`, `closingTemplate`, `bodyFormat`, `entityKind`, `isActive`, `isDefault`. An absent field leaves the column alone. Channel and category cannot be patched — a template that belongs to the other channel is a new one. `isActive: false` archives it: it stays readable and leaves the picker, which is the gentle alternative to deleting it. Editing a template never changes words already sent, because a draft and a blast each keep their own frozen copy.

Access class: `workspace`.

## Endpoint

`PATCH /v1/message-templates/{id}`

## Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| id | path | string | Yes |

## Request body

Content type: `application/json`.

```json
{
  "body": {
    "bodyFormat": "string",
    "bodyTemplate": "string",
    "closingTemplate": "string",
    "documentType": "string",
    "entityKind": "string",
    "greetingTemplate": "string",
    "isActive": true,
    "isDefault": true,
    "name": "string",
    "subjectTemplate": "string"
  },
  "params": {
    ":id": "string"
  },
  "query": {}
}
```

## Responses

### 200

the action's answer

Content type: `application/json`.

```json
{
  "data": {
    "bodyFormat": "string",
    "bodyTemplate": "string",
    "category": "string",
    "channel": "string",
    "closingTemplate": "string",
    "createdAt": "string",
    "createdByUserId": 1,
    "detail": {},
    "documentType": "string",
    "entityKind": "string",
    "greetingTemplate": "string",
    "id": 1,
    "isActive": true,
    "isDefault": true,
    "name": "string",
    "subjectTemplate": "string",
    "updatedAt": "string"
  }
}
```

### default

a refusal: `{"error": "<what a person needs to read>"}`. 401 no credential, 402 the plan does not include this, 403 the seat does not, 404 the thing does not exist or is not yours to see.

Content type: `application/json`.

```json
{
  "error": "string"
}
```
