Stream-Events

Update stream event template

Changed on

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

  • Base URL
    https://api.commpeak.com/textpeak
  • URL
    https://api.commpeak.com/textpeak/stream_events/{id}
  • Auth
    API key in header Authorization

Path parameters

idinteger required

Unique identifier of the resource.

Request body

namestring nullable

Template name. Must not be blank when sent.

streamIdinteger nullable

Move the template to another stream.

textstring nullable

Template body with [placeholder] tokens.

eventKeystring nullable

Key used to trigger this template. Must not be blank when sent.

activatedboolean nullable

Whether the template is active.

Example request

{
  "text": "Your CommPeak code is [code]. It expires in 5 minutes."
}

Response

Successful Response

idinteger required

Unique template identifier.

namestring required

Template name.

textstring required

Template body with [placeholder] tokens. 4-byte characters (emoji) are removed on save.

eventKeystring required

Key used to trigger this template on the send endpoints (event). EVENT_<id> when saved empty.

createdAtstring required

When the template was created. Format YYYY-MM-DD HH:MM:SS.

activatedboolean required

Whether the template is active.

provider'sms' | 'whatsapp_business' | 'whatsapp_private' | 'telegram_bot' | 'telegram_private' | 'websocket' | 'voice' | 'email' required
externalStatusstring nullable

Provider-side approval status (for example a WhatsApp template review).

languagestring nullable

Template language code. Always en for SMS templates.

sectionsunknown
variablesMappingunknown required
identifierstring nullable

External (provider) template identifier.

categorystring nullable

External (provider) template category.

Example response

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

Changes

    • breaking

      added the new path request parameter id

    • breaking

      response property category list-of-types was widened by adding types null to media type application/json of response 200

    • breaking

      response property externalStatus list-of-types was widened by adding types null to media type application/json of response 200

    • breaking

      response property identifier list-of-types was widened by adding types null to media type application/json of response 200

    • breaking

      response property language list-of-types was widened by adding types null to media type application/json of response 200

    • breaking

      the response's property type changed from array to no type for status

    • breaking

      the response's property type changed from object to no type for status

    • breaking

      the response's property type changed from array to no type for status

    • warning

      removed the optional property / from the response with the status

    • warning

      removed the optional property / from the response with the status

    • warning

      added the new email enum value to the response property for the response status

    • warning

      added the new sms enum value to the response property for the response status

    • warning

      added the new telegram_bot enum value to the response property for the response status

    • warning

      added the new telegram_private enum value to the response property for the response status

    • warning

      added the new voice enum value to the response property for the response status

    • warning

      added the new websocket enum value to the response property for the response status

    • warning

      added the new whatsapp_business enum value to the response property for the response status

    • warning

      added the new whatsapp_private enum value to the response property for the response status

    • info

      api operation id updateStreamEventTemplate removed and replaced with update_stream_event

    • info

      the endpoint scheme security APIKeyHeader was added to the API

    • info

      api tag Stream-Events added

    • info

      api tag Stream event templates removed

    • info

      the request property became optional

    • info

      the request property became optional

    • info

      request property list-of-types was widened by adding types null to media type application/json

    • info

      request property list-of-types was widened by adding types null to media type application/json

    • info

      request property list-of-types was widened by adding types null to media type application/json

    • info

      request property list-of-types was widened by adding types null to media type application/json

    • info

      request property list-of-types was widened by adding types null to media type application/json

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added subschema #2 to the response property anyOf list for the response status

    • info

      added subschema #1 subschema #2 to the response property anyOf list for the response status

    • info

      the response property became required for the status

    • info

      the response property became required for the status

    • info

      the response property became required for the status

    • info

      the response property became required for the status

    • info

      the response property became required for the status

    • info

      the response property became required for the status

    • info

      the response property became required for the status

    • info

      the response property became required for the status