Add stream

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.

MethodDetails
API KeyPass your API key directly in the Authorization header value (not as a Bearer token).

Headers

HeaderRequiredDescription
AuthorizationYesThe API key that verifies your access to the API.
acceptNoExpected response format. Default: application/json.
Content-TypeYesMust 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.

FieldTypeRequiredDescription
namestringYesA human-readable name for the stream (e.g., "OTP API").
descriptionstringNoA brief description of the stream's purpose (e.g., "SMS OTP channel").
typestringYesThe type of the stream. Determines the messaging behavior (e.g., "OTP").
ipAclstringNoAn IP ACL rule that restricts which IP addresses can use this stream. Use "0.0.0.0/0" to allow all IPs.
statestringYesThe initial state of the stream. Set to "READY" to make the stream immediately available for use.
Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params
string
string
string
string
string
Response

Language
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json