# tools.ozone.communication.updateTemplate

> Published by [ozone-lexicons.bsky.social](https://lexicon.garden/identity/did:plc:33dt5kftu3jq2h5h4jjlqezt)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:33dt5kftu3jq2h5h4jjlqezt/tools.ozone.communication.updateTemplate)
- [Documentation](https://lexicon.garden/lexicon/did:plc:33dt5kftu3jq2h5h4jjlqezt/tools.ozone.communication.updateTemplate/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:33dt5kftu3jq2h5h4jjlqezt/tools.ozone.communication.updateTemplate/examples)

## Definitions

### `tools.ozone.communication.updateTemplate`

**Type**: `procedure`

Administrative action to update an existing communication template. Allows passing partial fields to patch specific fields only.

#### Input

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `id` | `string` | Yes | ID of the template to be updated. |
| `lang` | `string` (language) | No | Message language. |
| `name` | `string` | No | Name of the template. |
| `subject` | `string` | No | Subject of the message, used in emails. |
| `disabled` | `boolean` | No |  |
| `updatedBy` | `string` (did) | No | DID of the user who is updating the template. |
| `contentMarkdown` | `string` | No | Content of the template, markdown supported, can contain variable placeholders. |

#### Output

**Encoding**: `application/json`

#### Errors

- **DuplicateTemplateName**

## Raw Schema

```json
{
  "id": "tools.ozone.communication.updateTemplate",
  "defs": {
    "main": {
      "type": "procedure",
      "input": {
        "schema": {
          "type": "object",
          "required": [
            "id"
          ],
          "properties": {
            "id": {
              "type": "string",
              "description": "ID of the template to be updated."
            },
            "lang": {
              "type": "string",
              "format": "language",
              "description": "Message language."
            },
            "name": {
              "type": "string",
              "description": "Name of the template."
            },
            "subject": {
              "type": "string",
              "description": "Subject of the message, used in emails."
            },
            "disabled": {
              "type": "boolean"
            },
            "updatedBy": {
              "type": "string",
              "format": "did",
              "description": "DID of the user who is updating the template."
            },
            "contentMarkdown": {
              "type": "string",
              "description": "Content of the template, markdown supported, can contain variable placeholders."
            }
          }
        },
        "encoding": "application/json"
      },
      "errors": [
        {
          "name": "DuplicateTemplateName"
        }
      ],
      "output": {
        "schema": {
          "ref": "tools.ozone.communication.defs#templateView",
          "type": "ref"
        },
        "encoding": "application/json"
      },
      "description": "Administrative action to update an existing communication template. Allows passing partial fields to patch specific fields only."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
