Channel
A channel is the entity who owns content, this could be something the channel posted themselves or another channels has taged them.
| Task | [Alpha Branch] | [Chat] | [Alpha] | [Beta] | [Production]
This document is not meant to outline how to use the API endpoints, rather how to build it. We outline what it's capabilities should be, once you have built them, you can creat documentation on how to utilize them on the APIs tab.
- Status & Details
- User Stories, Flows & Personas
- Features & Functions
- Data
- Endpoint
Description
The Channel is where the end user or ["Clients' Account"] can express themselves, creaet a brand for who they are and present thier content, they way the channels function is entierly up to the client, they can simply reqest a channels projects and display them in a custum manner or they can utilize our channel sections/filter features (e.g. latest upload, most popular, etc) these will be some prebuilt querris or lists. The client can also seperate by content type, music, podcasts, movies, etc.
Status
These details are only updated with each release, for more acurate updates and keeping track of progress, see the task in GitHub.
| Owner | Lead | Doc Status | Product Status | Last Update | Version | Release | Phase |
|---|---|---|---|---|---|---|---|
| Mendy | Roy | In Progress | Up Next | 04.03.2024 | 0.01 | Internal | Alpha |
Reminders
- Keep code lean and clear
- follow the outlined arcetecture
- write commetes in your code
- update the staus in the docs and in GitHub
- try not to recreate functions we alredy have, rather update exsiting functions to support your needs
- [Be sure to follow the release guidelines]
- Update Documentation
- keep API docs up to date each time you update or add endpoints
Links & Resources
User Stories
Persona One
I want to post my video and I want to shre a litle about myself
Persona Two
I'm sharing videos about my work, I would liek to create a channel for my compnay
User Flows
Personas
Features
Below is a list of features that will be utilized in order to deliver the best account features and functionalities. The details bellow are not comprehensive feature details but rather, describe how the features will be utilized within the account, for further details, please see the individual feature documentation.
-
[Profile]
The profile is the top section where the user can manage how they are presented
The client can rewest the channels projects in a varity of ways
-
[All]
reqest all projects related to the channel
-
Type
reqest only the type of content you want e.g. music, podcasts (the client should not have to set the type each time, they should be able to set the type for the entire client project, only if no types have need set or if multiple types have been set for the client project do they need to set the type here)
-
Filters (prebuilt qerrys)
clients can reqest the most popular projects, latest uploads/created, post scedual, etc. (might overlap with other features, check to make sure it doesn't)
Allow channels to creaet memberships (this feature must be enabled by the Client), the Client can set the rules, how many memberships and if there is a simple prive or teired pricing, they can leave the chose to the channel as well. the client can also profive platform or app features to be added to a membership by the channel for the client can create thier own app wide memberships. the channel can offer exclusive content, discouts on rent or purchased content, early access, producer credits and more. the client can tie in features from other API e.g. chat api can offer members only chat, commerce api can offer discounts in commerce, events APi can offer exclusiv events discount or free entry, etc.
-
Monitization / Ads
A Channel can see thier monitizations rate, they can see how muh they earn, how much demand there is to advertize on thier content, etc. (this is mostly a summary of monitization features and project monitization data)
if an account seems suspisus it should be flaged so that any channel, content, comments or otherwise can be monitored
You can find the Data Structure.
On the document we want to keep all the important data, the first fetch and fast to access.
- Data Structure
- Data Model
- channels
- - channel 1
- - - type (mixed, music, srticles, videos, etc)
- - - category (cooking, shopping, fashion, etc)
- - - first name
- - - last name
- - - username
- - - creaded
- - - description
- - - avatar
- - - cover
- - - adult/secitive
- - - status
- - - updated (date)
- - - age
- - - location
- - - links
- - - CTA (follow, subscribe, donate, etc) (options are set by the client)
- - -
class Channel {
final String type;
final String category;
final String name;
final String username;
final DateTime created;
final String description;
final String avatar;
final String cover;
final String status;
final DateTime updated;
final int age;
final String location;
final List<String> links;
final List<String> cta; // CTA (follow, subscribe, donate, etc) (options are set by the Client)
final List<Access> access;
final List<Monetization> monetization;
final List<String> features;
final List<String> memberships;
Channel({
required this.type,
required this.category,
required this.name,
required this.username,
required this.created,
required this.description,
required this.avatar,
required this.cover,
required this.status,
required this.updated,
required this.age,
required this.location,
required this.links,
required this.cta,
required this.access,
required this.monetization,
required this.features,
required this.memberships,
});
}
Access
- Data Structure
- Data Model
- access
- - account 1
- - - account id
- - - level
- - - inhrited (id)
- - - expries
class Access {
final String accountId;
final String level;
final String inherited;
final DateTime expires;
Access({
required this.accountId,
required this.level,
required this.inherited,
required this.expires,
});
}
Monetization
- Data Structure
- Data Model
- monitization
- - monitize 1
- - - type (display, video, banner, etc)
- - - wallet (id)
- - - qilified (date)
- - - update (date)
class Monetization {
final String type;
final String walletId;
final DateTime qualified;
final DateTime update;
Monetization({
required this.type,
required this.walletId,
required this.qualified,
required this.update,
});
}
Projects
Here we keep a record of all the features an account is paying for or has been given acces to by the client.
- features
here are the membership the channel has created to offer to thier viewers
memberships
sidebar_position: 2
Channels
Overview
This document details the API endpoints for managing channels, allowing for the creation, retrieval, updating, and deletion of channel objects within the system. Channels are not a replacment or duplicate of users but rather an extention to the user data with a focus on content.
Endpoints
1. Create a Channel
POST /channels
Description
Creates a new channel in the database.
Headers
{
"Accept": "application/json",
"Content-Type": "application/json"
}
Request Body
| Field Name | Type | Required | Description | Example Value |
|---|---|---|---|---|
clientId | String | Yes | The unique identifier of the client associated with the channel. | "60d5ec49f7b1c4b4a1c5d6e0" |
name | String | Yes | The name of the channel. | "My Awesome Channel" |
username | String | Yes | The unique username for the channel. | "awesome_channel" |
avatarUrl | String | Yes | URL to the channel's profile image. | "https://example.com/avatar.jpg" |
role | String | Yes | The role of the channel (for example, "creator", "admin"). | "creator" |
projectIds | List<String> | No | A list of project identifiers (ObjectId strings) associated with the channel. | ["60d5ec49f7b1c4b4a1c5d6e1", "60d5ec49f7b1c4b4a1c5d6e2"] |
membershipsEnabled | bool | No | Whether memberships are enabled for the channel. Default: false. | true |
membershipTiers | List<Object> | No | A list of membership tiers. Each object in the list contains details about a membership tier. | [{"name": "Bronze", "price": 5.0}] |
monetizationEnabled | bool | No | Whether monetization is enabled for the channel. Default: false. | true |
revenue | double | No | The current total revenue of the channel. Default: 0.0. | 1234.56 |
{
"clientId": "60d5ec49f7b1c4b4a1c5d6e0",
"name": "My Awesome Channel",
"username": "awesome_channel",
"avatarUrl": "https://example.com/avatar.jpg",
"role": "creator",
"projectIds": [],
"membershipsEnabled": true,
"membershipTiers": [
{
"name": "Basic",
"description": "Access to basic content",
"price": 5.0,
"features": ["exclusive posts"]
},
{
"name": "Premium",
"description": "Access to all content",
"price": 15.0,
"features": ["exclusive posts", "early access"]
}
],
"monetizationEnabled": true,
"revenue": 0.0
}
Success Response (Status: 200 OK)
{
"message": "Channel created successfully"
}
Error Responses
- 500 Internal Server Error: An unexpected server-side error occurred.
2. Get All Channels by Client ID
GET /channels/client/{clientId}
Description
Retrieves all channels associated with a specific client ID. Replace {clientId} with the client's unique identifier.
Headers
{
"Accept": "application/json"
}
Request Body
N/A (No request body is required for this endpoint.)
Success Response (Status: 200 OK)
Returns a JSON array of channel objects. Each channel object will include the following fields: _id, clientId, name, username, avatarUrl, role, projectIds, membershipsEnabled, membershipTiers, monetizationEnabled, revenue, createdAt, and updatedAt.
[
{
"_id": "60d5ec49f7b1c4b4a1c5d6e3",
"clientId": "60d5ec49f7b1c4b4a1c5d6e0",
"name": "My Awesome Channel",
"username": "awesome_channel",
"avatarUrl": "https://example.com/avatar.jpg",
"role": "creator",
"projectIds": [],
"membershipsEnabled": true,
"membershipTiers": [
{"name": "Basic", "description": "...", "price": 5.0, "features": ["..."]},
{"name": "Premium", "description": "...", "price": 15.0, "features": ["..."]}
],
"monetizationEnabled": true,
"revenue": 0.0,
"createdAt": "2025-06-05T10:00:00.000Z",
"updatedAt": "2025-06-05T10:00:00.000Z"
}
]
Error Responses
- 500 Internal Server Error: An unexpected server-side error occurred.
3. Get a Single Channel by ID
GET /channels/{id}
Description
Retrieves a single channel by its unique channel ID. Replace {id} with the unique identifier of the channel.
Headers
{
"Accept": "application/json"
}
Request Body
N/A (No request body is required for this endpoint.)
Success Response (Status: 200 OK)
Returns a single JSON object of a channel (same fields as in "Get All Channels by Client ID").
{
"_id": "60d5ec49f7b1c4b4a1c5d6e3",
"clientId": "60d5ec49f7b1c4b4a1c5d6e0",
"name": "My Awesome Channel",
"username": "awesome_channel",
"avatarUrl": "https://example.com/avatar.jpg",
"role": "creator",
"projectIds": [],
"membershipsEnabled": true,
"membershipTiers": [
{"name": "Basic", "description": "...", "price": 5.0, "features": ["..."]},
{"name": "Premium", "description": "...", "price": 15.0, "features": ["..."]}
],
"monetizationEnabled": true,
"revenue": 0.0,
"createdAt": "2025-06-05T10:00:00.000Z",
"updatedAt": "2025-06-05T10:00:00.000Z"
}
Error Responses
- 404 Not Found: Channel not found.
- 500 Internal Server Error: An unexpected server-side error occurred.
4. Update an Existing Channel
PUT /channels/{id}
Description
Updates an existing channel in the database by its identifier. Replace {id} with the unique identifier of the channel to update.
Headers
{
"Accept": "application/json",
"Content-Type": "application/json"
}
Request Body
A JSON object containing the fields to update. All fields are optional.
| Field Name | Type | Description | Example Value |
|---|---|---|---|
name | String | The new name of the channel. | "Updated Channel Name" |
username | String | The new username. | "new_channel_username" |
avatarUrl | String | New URL for the profile image. | "https://example.com/new_avatar.jpg" |
role | String | Updated role. | "moderator" |
projectIds | List<String> | Updated list of project identifiers (ObjectId strings). | ["60d5ec49f7b1c4b4a1c5d6e4"] |
membershipsEnabled | bool | Whether memberships are enabled. | false |
membershipTiers | List<Object> | Updated list of membership tiers. | [{"name": "Gold", "price": 20.0}] |
monetizationEnabled | bool | Whether monetization is enabled. | false |
revenue | double | Updated total revenue. | 1500.75 |
{
"name": "My Renamed Channel",
"membershipsEnabled": false,
"revenue": 1500.00
}
Success Response (Status: 200 OK)
{
"message": "Channel updated successfully"
}
Error Responses
- 404 Not Found: Channel not found or not updated.
- 500 Internal Server Error: An unexpected server-side error occurred.
5. Delete a Channel
DELETE /channels/{id}
Description
Deletes a channel from the database by its identifier. Replace {id} with the unique identifier of the channel to delete.
Headers
{
"Accept": "application/json",
"Content-Type": "application/json"
}
Request Body
N/A (No request body is required for this endpoint.)
Success Response (Status: 200 OK)
{
"message": "Channel deleted successfully"
}
Error Responses
- 404 Not Found: Channel not found.
- 500 Internal Server Error: An unexpected server-side error occurred.