---
title: "Create stream event template"
method: POST
path: "/stream_events"
tags: ["Stream event templates"]
---

# Create stream event template

`POST /stream_events`

Create a reusable event template. `name` and `eventKey` are required; trigger it later by passing `eventKey` as `event` on the send endpoints.

**Authentication:** TextPeak API key in the `Authorization` header (see **Authentication** in the API Overview).

## Request body

- object
  - `name` string, required — Template name.
  - `streamId` integer — ID of the stream to attach this template to.
  - `text` string — Template body with `[placeholder]` tokens.
  - `eventKey` string, required — Stable key used to trigger this template on the send endpoints.
  - `activated` boolean — Whether the template is active.

## Response `201`

The created template.

- object
  - `id` integer — Unique template identifier.
  - `name` string — Template name.
  - `stream` object — The stream this template belongs to.
    - `id` integer — Stream identifier.
    - `name` string — Stream name.
  - `text` string — Template body with `[placeholder]` tokens.
  - `eventKey` string — Stable key used to trigger this template on the send endpoints.
  - `createdAt` string — When the template was created.
  - `activated` boolean — Whether the template is active.
  - `provider` string — Delivery provider, if set.
  - `externalStatus` string — Provider-side approval status, if applicable.
  - `language` string — Template language code.
  - `sections` object[] — Structured template sections (channel-specific).
  - `variablesMapping` object[] — Mapping of template variables.
  - `identifier` string — External identifier, if any.
  - `category` string — Template category, if any.

---

[API](https://skmtc.net/commpeak/apis/dialer-api-v2-0-1.md) · [All operations](https://skmtc.net/commpeak/apis/dialer-api-v2-0-1/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/commpeak/dialer-api-v2-0-1/revisions/eacecf960bb6/schema)
