v1

latestOpenAPI 3.0.32026-07-24156161.2 MB
Stream event templates

Update stream event template

Update an event template. Only the fields you send are changed.

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

put/stream_events/{id}

Request body

namestring required

Template name.

streamIdinteger

ID of the stream to attach this template to.

textstring

Template body with [placeholder] tokens.

eventKeystring required

Stable key used to trigger this template on the send endpoints.

activatedboolean

Whether the template is active.

Example request

{
  "name": "Verification code",
  "streamId": 5,
  "text": "Your CommPeak code is [code]",
  "eventKey": "verification_code",
  "activated": true
}

Response

The updated template.

idinteger

Unique template identifier.

namestring

Template name.

textstring

Template body with [placeholder] tokens.

eventKeystring

Stable key used to trigger this template on the send endpoints.

createdAtstring

When the template was created.

activatedboolean

Whether the template is active.

providerstring

Delivery provider, if set.

externalStatusstring

Provider-side approval status, if applicable.

languagestring

Template language code.

sectionsobject[]

Structured template sections (channel-specific).

variablesMappingobject[]

Mapping of template variables.

identifierstring

External identifier, if any.

categorystring

Template category, if any.

Example response

{
  "id": 21,
  "name": "Verification code",
  "stream": {
    "id": 5,
    "name": "Marketing UK"
  },
  "text": "Your CommPeak code is [code]",
  "eventKey": "verification_code",
  "createdAt": "2026-03-01 09:00:00",
  "activated": true,
  "language": "en"
}