Home / Docs / API reference / API reference: Streams API reference: Streams 5 endpoints of the Streams group.
List message streams GET /v1/streams
Example curl "https://api.sendtide.ch/v1/streams" \
-H "Authorization: Bearer sk_test_…" Responses Status Description 200 The streams Response fields dataarray<Stream> data[].slugstring Example: newsletter data[].namestring data[].kindenum: transactional | broadcast broadcast is not available yet data[].builtinboolean data[].trackboolean | null Opens and clicks by default; null: the account's setting data[].unsubscribe_defaultboolean | null List-Unsubscribe by default; null: the account's setting data[].unsubscribe_requiredboolean data[].created_atstring (date-time) next_cursorstring | null
Create a stream POST /v1/streams
Up to 10 streams besides transactional and broadcast (422 stream_limit). Only transactional streams can be created for now, the kind broadcast is refused with 403 broadcast_not_available (not available yet). A transactional stream can still default List-Unsubscribe (unsubscribe_default).
Request body application/json Field Type Description slug * string Example: newsletter name * string kind * enum: transactional | broadcast trackboolean | null unsubscribe_defaultboolean | null unsubscribe_requiredboolean
Example curl -X POST "https://api.sendtide.ch/v1/streams" \
-H "Authorization: Bearer sk_test_…" \
-H "Content-Type: application/json" \
-d '{"slug":"newsletter","name":"Newsletter","kind":"broadcast"}' Responses Status Description 201 Created Stream Response fields slugstring Example: newsletter namestring kindenum: transactional | broadcast broadcast is not available yet builtinboolean trackboolean | null Opens and clicks by default; null: the account's setting unsubscribe_defaultboolean | null List-Unsubscribe by default; null: the account's setting unsubscribe_requiredboolean created_atstring (date-time)
409 Error in the usual format, errors and limits 422 Error in the usual format, errors and limits
Get a stream GET /v1/streams/{slug}
Parameters Name In Type Description slug * path string
Example curl "https://api.sendtide.ch/v1/streams/newsletter" \
-H "Authorization: Bearer sk_test_…" Responses Status Description 200 The stream Stream Response fields slugstring Example: newsletter namestring kindenum: transactional | broadcast broadcast is not available yet builtinboolean trackboolean | null Opens and clicks by default; null: the account's setting unsubscribe_defaultboolean | null List-Unsubscribe by default; null: the account's setting unsubscribe_requiredboolean created_atstring (date-time)
404 Error in the usual format, errors and limits
Change a stream PATCH /v1/streams/{slug}
name (own streams only), track and unsubscribe_default (true, false or null for the account's setting), unsubscribe_required. The kind and the slug cannot change.
Parameters Name In Type Description slug * path string
Request body application/json Field Type Description namestring trackboolean | null unsubscribe_defaultboolean | null unsubscribe_requiredboolean
Example curl -X PATCH "https://api.sendtide.ch/v1/streams/newsletter" \
-H "Authorization: Bearer sk_test_…" \
-H "Content-Type: application/json" \
-d '{}' Responses Status Description 200 Updated Stream Response fields slugstring Example: newsletter namestring kindenum: transactional | broadcast broadcast is not available yet builtinboolean trackboolean | null Opens and clicks by default; null: the account's setting unsubscribe_defaultboolean | null List-Unsubscribe by default; null: the account's setting unsubscribe_requiredboolean created_atstring (date-time)
422 Error in the usual format, errors and limits
Delete a stream of your own DELETE /v1/streams/{slug}
Not the built-in streams (422 stream_builtin), and not while mail of the stream waits (409 stream_in_use).
Parameters Name In Type Description slug * path string
Example curl -X DELETE "https://api.sendtide.ch/v1/streams/newsletter" \
-H "Authorization: Bearer sk_test_…" Responses Status Description 204 Deleted