Startseite / Doku / API-Referenz / API-Referenz: Streams API-Referenz: Streams 5 Endpunkte der Gruppe «Streams». Die Referenz stammt aus der englischen OpenAPI-Spezifikation und ist nicht übersetzt.
List message streams GET /v1/streams
Beispiel curl "https://api.sendtide.ch/v1/streams" \
-H "Authorization: Bearer sk_test_…" Antworten Status Beschreibung 200 The streams Felder der Antwort 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 Feld Typ Beschreibung slug * string Example: newsletter name * string kind * enum: transactional | broadcast trackboolean | null unsubscribe_defaultboolean | null unsubscribe_requiredboolean
Beispiel 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"}' Antworten Status Beschreibung 201 Created Stream Felder der Antwort 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 Fehler im üblichen Format, Fehler und Limits 422 Fehler im üblichen Format, Fehler und Limits
Get a stream GET /v1/streams/{slug}
Parameter Name Ort Typ Beschreibung slug * path string
Beispiel curl "https://api.sendtide.ch/v1/streams/newsletter" \
-H "Authorization: Bearer sk_test_…" Antworten Status Beschreibung 200 The stream Stream Felder der Antwort 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 Fehler im üblichen Format, Fehler und 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.
Parameter Name Ort Typ Beschreibung slug * path string
Request-Body application/json Feld Typ Beschreibung namestring trackboolean | null unsubscribe_defaultboolean | null unsubscribe_requiredboolean
Beispiel curl -X PATCH "https://api.sendtide.ch/v1/streams/newsletter" \
-H "Authorization: Bearer sk_test_…" \
-H "Content-Type: application/json" \
-d '{}' Antworten Status Beschreibung 200 Updated Stream Felder der Antwort 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 Fehler im üblichen Format, Fehler und 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).
Parameter Name Ort Typ Beschreibung slug * path string
Beispiel curl -X DELETE "https://api.sendtide.ch/v1/streams/newsletter" \
-H "Authorization: Bearer sk_test_…" Antworten Status Beschreibung 204 Deleted