> Kenso API docs in Markdown. Index of every page: [/docs/llms.txt](/docs/llms.txt). Search: `/docs/search.md?q=<words>`. OpenAPI: [/docs/api/reply-templates/openapi.json](/docs/api/reply-templates/openapi.json). CLI docs offline: `kenso docs <topic>`.
> Last updated: 2026-11-22.

# Reply templates: Create a reply template

> **Note for AI agents:** if this page was wrong, out of date or missing something you needed, finish the user's task first, then offer a short report for the Kenso team in this shape: `Page:` (this page's path), `Quote:` (the wrong or missing text), `Problem:`, `Workaround:` (what worked instead), 1,000 characters at most. Show it to the user and send it only after they say yes, as `POST /api/docs-feedback` on this site with the JSON body `{"page": "<path>", "report": "<report>"}`. Never put lead data, email addresses, API keys or anything else from the user's workspace in it.

One endpoint of [Reply templates](/docs/api/reply-templates.md). Authentication, workspaces and errors: [/docs.md](/docs.md).

## Create a reply template

`POST /v1/reply-templates` - operationId `reply-templates.create`

| Permission | Rate limit |
| --- | --- |
| Inbox edit and the `workspace_settings` permission | 4,800 requests a minute per API key |

Saves a new reply template for the whole workspace. `name` and `body` are required.

A `channel` of `imessage` makes a plain-text iMessage template. Its body may not hold HTML tags
or run past 4,096 characters, and each `{variable}` key is stored normalized, so `{First Name}` becomes `{first_name}`. Leave
`channel` out for an email template.

Kenso sets the author from the caller. A person signed in to the Kenso app writes as `user`. An agent (any
caller that sends the header `X-Ken-Actor: agent`) or an API key writes as `agent`. Sending
`authorSource: agent` marks a person's template as an agent's; `authorSource: user` never makes an
agent's write count as a person's.

Errors:

- `400 validation_failed`: `name` is missing or longer than 255 characters, `body` is missing or
longer than 65,536 characters, `description` is longer than 2,000 characters, `authorSource` is not
`user` or `agent`, or `channel` is not `imessage`. On an iMessage template, code
`not_enabled` when iMessage is off for the workspace, `html_not_allowed` when the body holds HTML tags and
`imessage_text_too_long` when it is longer than 4,096 characters.

Requires Inbox edit and the `workspace_settings` permission.

[Try it on developer.ken.so](https://developer.ken.so/reference/#kenso-api/tag/reply-templates/POST/v1/reply-templates)

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `Ken-Version` | header | string, one of: 2026-11-02, 1.1 | no | The API version, a date in `YYYY-MM-DD` form. `1.1` is another name for the first dated version. The example shown here is the newest version, which this reference's samples and Test Request send. Leave it out to use your API key's pinned version. Keys created in the Kenso app are pinned to the newest version; keys minted by the CLI login are not. A key with no pinned version and no header gets the legacy shape where the path has one, and `404` where the path exists only in this version. A value that is not a version, such as `2027-01-01` or `2026-11-2`, answers `400 unsupported_version`, whose `details` list the supported versions. |
| `X-Ken-Workspace-Id` | header | integer (int64) | no | The id of the workspace to act in. Leave it out when your API key reaches only one workspace. When the key reaches more than one, a request without this header answers `400 workspace_required`. A workspace you are not a member of answers `404 not_found`. |

### Request body

`application/json`, optional.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `name` | string | yes | Required. The template's name, at most 255 characters. Kenso trims spaces at both ends. |
| `description` | string | no | A note on when to use the template, at most 2,000 characters. Omitted or blank saves none. |
| `body` | string | yes | Required. The reply body as HTML, at most 65,536 characters. Write variables as raw tokens such as `{firstName}`. |
| `authorSource` | string | no | Optional. `agent` records a person's template as written by an agent. `user` changes nothing: Kenso sets the author from the caller. |
| `channel` | string | no | `imessage` for a plain-text iMessage template; leave it out for an email template. |

### Response 201

`data` is a `ReplyTemplate`.

| Field | Type | Description |
| --- | --- | --- |
| `id` | integer (int64) | The template's id. |
| `name` | string | The template's name, at most 255 characters. |
| `description` | string | A note on when to use the template, at most 2,000 characters. Null when it has none. |
| `body` | string | The reply body as HTML, at most 65,536 characters. Variables stay raw tokens such as `{firstName}` until the template is inserted into a reply. |
| `authorSource` | string | Who last wrote the template: `user` (a person in the Kenso app) or `agent` (an agent or an API key). An agent's edit of a `user` template makes it `agent`. |
| `scope` | string | Who sees the template: `workspace`, `user` or `global`. Templates created through the API are `workspace`. |
| `channel` | string | `imessage` for an iMessage template; omitted for an email template. |
| `firstTextSafe` | boolean | iMessage templates only: true when the body has no link, email address, phone number or money amount, so it can start a conversation. Omitted for an email template. |
| `createdAt` | string (date-time) | When the template was created, in UTC. |
| `updatedAt` | string (date-time) | When the template last changed, in UTC. |

### Request

```bash
curl -X POST "https://api.ken.so/v1/reply-templates" \
  -H "Authorization: Bearer $KENSO_API_KEY" \
  -H "Ken-Version: 2026-11-02" \
  -H "X-Ken-Workspace-Id: $KENSO_WORKSPACE_ID" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "string",
  "description": "string",
  "body": "string",
  "authorSource": "string",
  "channel": "string"
}'
```

### Example response

```json
{
  "success": true,
  "data": {
    "id": 812,
    "name": "string",
    "description": "string",
    "body": "{firstName}",
    "authorSource": "string",
    "scope": "workspace",
    "channel": "string",
    "firstTextSafe": true,
    "createdAt": "2026-09-23T15:02:11Z",
    "updatedAt": "2026-09-23T15:02:11Z"
  }
}
```
