---
title: "Create a Stream"
method: POST
path: "/api/stream"
tags: ["Stream"]
---

# Create a Stream

`POST /api/stream`

## Request

- Base URL: `https://api.lytics.io`
- URL: `https://api.lytics.io/api/stream`
- Auth: API key in header `Authorization`

JSON Parameters:

* *slug* (string) ... raw value of the stream as it appears in both queries and collection

* *channel* (string) ...  method by which this stream collects data. Only allowable channel types: web, email, mobile, ad, sms, pos

* *label* (string, optional) ... user assignable label, for display in the UI

* *description* (string, optional) ... user assignable description

* *tables* ([]string, optional) ... names of the tables to which this stream writes

* *providers* ([]string, optional) ... names of the providers that send data on this stream

* *hidden* (bool, optional) ... whether stream is hidden in stream stats?

* *method* (string, optional) ... either 'bulk' or 'streaming'

## Response `200`

JSON representation of Streams Resource.

- StreamModel
  - `data` object[]
    - `account_id` string
    - `aid` number
    - `channel` string
    - `created` string
    - `hidden` boolean
    - `id` string
    - `method` string
    - `providers` unknown[]
      - unknown
    - `slug` string
    - `tables` unknown[]
      - unknown
    - `updated` string
  - `message` string
  - `status` number

---

[API](https://skmtc.dev/lytics/apis/v1-lytics-api.md) - [All operations](https://skmtc.dev/lytics/apis/v1-lytics-api/llms.txt) - [OpenAPI document](https://skmtc.dev/lytics/apis/v1-lytics-api/revisions/339fd1d88486?raw)
