Waitlist open: get early access

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

StatusDescription
200 The streams
Response fields
dataarray<Stream>
data[].slugstringExample: newsletter
data[].namestring
data[].kindenum: transactional | broadcastbroadcast is not available yet
data[].builtinboolean
data[].trackboolean | nullOpens and clicks by default; null: the account's setting
data[].unsubscribe_defaultboolean | nullList-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

FieldTypeDescription
slug *stringExample: 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

StatusDescription
201 Created Stream
Response fields
slugstringExample: newsletter
namestring
kindenum: transactional | broadcastbroadcast is not available yet
builtinboolean
trackboolean | nullOpens and clicks by default; null: the account's setting
unsubscribe_defaultboolean | nullList-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

NameInTypeDescription
slug *pathstring

Example

curl "https://api.sendtide.ch/v1/streams/newsletter" \
  -H "Authorization: Bearer sk_test_…"

Responses

StatusDescription
200 The stream Stream
Response fields
slugstringExample: newsletter
namestring
kindenum: transactional | broadcastbroadcast is not available yet
builtinboolean
trackboolean | nullOpens and clicks by default; null: the account's setting
unsubscribe_defaultboolean | nullList-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

NameInTypeDescription
slug *pathstring

Request body application/json

FieldTypeDescription
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

StatusDescription
200 Updated Stream
Response fields
slugstringExample: newsletter
namestring
kindenum: transactional | broadcastbroadcast is not available yet
builtinboolean
trackboolean | nullOpens and clicks by default; null: the account's setting
unsubscribe_defaultboolean | nullList-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

NameInTypeDescription
slug *pathstring

Example

curl -X DELETE "https://api.sendtide.ch/v1/streams/newsletter" \
  -H "Authorization: Bearer sk_test_…"

Responses

StatusDescription
204 Deleted