Description
Summary: Sends a single message to a specified recipient via the TextPeak Streams API. Details: Unlike the batch simple_send endpoint, this endpoint is designed for sending a single message per request. The request body is a flat JSON object containing the internal identifier, sender, recipient phone number, and message content. This is ideal for transactional or event-driven messaging where only one message needs to be dispatched at a time. Authentication is performed via a stream token passed in the Authorization header.
Authentication & Scopes
Authentication is handled via a stream token provided in the Authorization header. No OAuth scopes are defined; access is granted or denied based on the validity of the token.
| Method | Details |
|---|---|
| Stream Token | Pass your token directly in the Authorization header value (not as a Bearer token). |
Headers
| Header | Required | Description |
|---|---|---|
Authorization | Yes | The stream token that verifies your access to the API. |
Content-Type | Yes | Must be set to application/json. The API only accepts JSON-formatted request bodies. |
Parameters
This endpoint does not use path or query parameters.
Request Body
The request body is a flat JSON object representing a single message.
| Field | Type | Required | Description |
|---|---|---|---|
internal_id | string | Yes | A unique identifier for the message, used for tracking and deduplication. |
sender | string | Yes | The sender's identifier. Can be a name, phone number, or any other identifier. |
recipient_phone | string | Yes | The phone number of the message recipient, in international format (e.g., "972524265292"). |
message_content | string | Yes | The text content of the message to be delivered. Supports both SMS and WhatsApp channels depending on stream configuration. |
Examples
This endpoint has saved examples demonstrating usage across different channels:
- WhatsApp — Sending a message via WhatsApp channel.
- SMS — Sending a message via SMS channel.
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||