# API reference: Streams

> Endpoints of the Streams group of the Sendtide API with parameters, request body, responses and curl examples.

URL: https://sendtide.ch/en/docs/api/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 |
## 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 | |
| track | boolean / null | |
| unsubscribe_default | boolean / null | |
| unsubscribe_required | boolean | |
### 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 |
| 409 | Error in the usual format, [errors and limits](https://sendtide.ch/en/docs/errors-and-limits/) |
| 422 | Error in the usual format, [errors and limits](https://sendtide.ch/en/docs/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 |
| 404 | Error in the usual format, [errors and limits](https://sendtide.ch/en/docs/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 |
| --- | --- | --- |
| name | string | |
| track | boolean / null | |
| unsubscribe_default | boolean / null | |
| unsubscribe_required | boolean | |
### 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 |
| 422 | Error in the usual format, [errors and limits](https://sendtide.ch/en/docs/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 |
