REST API

Streamwell exposes a basic REST API for management of Users and Channels, if you have a Pro License. Initially we are supporting channel and user management, but since Streamwell is a web-based application it is possible to manipulate many other endpoints as well. We plan to expand support for those in the future, or can assist via Pro Services.

To enable the REST API, you need to set three environment variables in your Docker Compose file or run command:

API_ENABLED=true : this should be self-explanatory API_USER=bob : defines an API-only user called 'bob' API_KEY=sprinkles : sets bob's API key to 'sprinkles'

We Take Requests!

An API request is determined by the presence of an 'Authorization' header with the value of "Basic " plus API_USER:API_KEY encoded as base64, e.g. for bob:sprinkles your request headers would include Authorization: Basic Ym9iOnNwcmlua2xlcw

CHANNELS - /api/channels.php

GET - returns a JSON array of channels like:

  [ {
    "id": "helloWorld123",
    "name": "Hello World",
    "creator": "admin",
    "stream_key": "helloWorld",
    "public_key": "helloWorldPub",
    "srt_key": "helloWorldSrt",
    "public_password": null,
    "viewer_limit": 0,
    "user_ids": "7626d8e0849da",
    "group_ids": null,
    "notes": "Powered by Streamwell",
    "expires": null,
    "simple_view": 0,
    "created": "2025-09-26 18:58:56",
    "theme_id": "default",
    "allow_all_clients": 1,
    "allow_all_creators": 0,
    "overlay_url": null,
    "overlay_mode": 0,
    "auto_record": 1,
    "recording_limit": 0,
    "file_limit": 0,
    "user_editable": 0
  }
]

... or include an "id" parameter to return just a single channel.

POST - creates a channel and returns the ID of the channel that was just created. You *must* specify a name value, but you can also provide user_ids, group_ids, notes, allow_all_clients, allow_all_creators, overlay_url, overlay_mode (0 for non-interactive, 1 for interactive), auto_record, viewer_limit, recording_limit (MB), file_limit (MB), user_editable (can edit name and notes on the fly).

PUT - edits a channel. You *must* specify the ID of the channel you are editing, and can change any of the values listed above.

DELETE - deletes a channel, plus any stored recordings / chat messages / uploaded files / restreams for that channel. The ID of the channel to be deleted should be included as part of the query string, not as a separate body.

USERS - /api/users.php

GET - returns a JSON array of users like:

[ {
    "id": "7626d8e0849da",
    "name": "Consume",
    "role": "client",
    "created": "2025-09-26 18:59:39",
    "language": "default",
    "sso": 0,
    "beambox_enabled": 0,
    "pw_reset": 0
  },
  {
    "id": "7765a42f567b8",
    "name": "Xyla Weber",
    "role": "creator",
    "created": "2025-10-28 21:41:37",
    "language": "default",
    "sso": 0,
    "beambox_enabled": 0,
    "pw_reset": 0
  }
]

... or include an "id" parameter to return just a single user.

(Some of the strange parameters like beambox_enabled and language are there to support custom features and integrations which might become part of your life later on 😉)

POST - creates a channel and returns the ID of the user that was just created. You *must* specify these values: name, role (client, creator, admin), password (6 characters minimum). You can also provide channels_allowed (a comma eparated list of channel IDs), custom_id (a custom user ID), pw_reset (to force a password reset on their next login).

PUT - edits a user. You *must* specify the ID of the user you are editing, and can change any of the values listed above.

DELETE - deletes a user. Any chat messages the user sent will remain in the system but will show as coming from "Unknown User". The ID of the user to be deleted should be included as part of the query string, not as a separate body.

Last updated