v1

latestOpenAPI 3.0.32026-07-24156161.2 MB
Streams Service

template_send - SMS

Send a templated SMS to one or more recipients. Provide the message text once in message_template using [placeholder] tokens, then supply each recipient's values in template_variables.

  • Set a default sender at the top level; override it per recipient if needed.
  • Up to 250 recipients per request.
  • Returns a batch task_id plus per-message identifiers; partial failures are reported inline.

Authentication: stream token in the Authorization header (see Authentication in the API Overview).

post/streams/template_send

Request body

senderstring

Default sender applied to all recipients.

message_templatestring required

Template text with [placeholder] tokens, e.g. Hi [first_name], your code is [code].

Example request

{
  "sender": "CommPeak",
  "message_template": "Hi [first_name], your code is [code]",
  "recipients": [
    {
      "internal_id": "1001",
      "sender": "CommPeak",
      "recipient_phone": "447700900123",
      "template_variables": {
        "first_name": "Lando",
        "code": "4821"
      }
    }
  ]
}

Response

The batch was accepted for delivery.

statusboolean

true when the batch was accepted. Individual messages may still carry an error.

task_idstring

Identifier for the accepted batch (processed asynchronously).

Example response

{
  "status": true,
  "task_id": "ca550f7e-9eb5-45b3-9830-e82b407ede02",
  "messages": [
    {
      "internal_id": "1001",
      "message_uuid": "a61e5bfe-c82b-448a-815b-32de8bf22089",
      "conversation_uuid": "e2a489db-bb8a-4f51-9692-726153599c57",
      "error": "0x31",
      "details": "reached daily limit"
    }
  ]
}