Description
Summary: Creates a new stream with the specified configuration. Details: This endpoint creates a new stream resource in the TextPeak Streams API. A stream represents a messaging channel (e.g., SMS, OTP) through which messages are sent and received. You must provide the stream's name, type, and desired state. Optionally, you can include a description and an IP ACL to restrict access by IP address. The newly created stream object is returned in the response.
Authentication & Scopes
Authentication is handled via an API key provided in the Authorization header. No OAuth scopes are defined; access is granted or denied based on the validity of the key.
| Method | Details |
|---|---|
| API Key | Pass your API key directly in the Authorization header value (not as a Bearer token). |
Headers
| Header | Required | Description |
|---|---|---|
Authorization | Yes | The API key that verifies your access to the API. |
accept | No | Expected response format. Default: application/json. |
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 JSON object describing the stream to create.
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | A human-readable name for the stream (e.g., "OTP API"). |
description | string | No | A brief description of the stream's purpose (e.g., "SMS OTP channel"). |
type | string | Yes | The type of the stream. Determines the messaging behavior (e.g., "OTP"). |
ipAcl | string | No | An IP ACL rule that restricts which IP addresses can use this stream. Use "0.0.0.0/0" to allow all IPs. |
state | string | Yes | The initial state of the stream. Set to "READY" to make the stream immediately available for use. |
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||