Create channel
POST
/api/channels/create
const url = 'http://localhost:3001/api/channels/create';const options = { method: 'POST', headers: {Authorization: '<Authorization>', 'Content-Type': 'application/json'}, body: '{"avatar_chunk_id":1,"avatar_key":"example","description":"example","initial_members":["example"],"name":"example","type":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url http://localhost:3001/api/channels/create \ --header 'Authorization: <Authorization>' \ --header 'Content-Type: application/json' \ --data '{ "avatar_chunk_id": 1, "avatar_key": "example", "description": "example", "initial_members": [ "example" ], "name": "example", "type": "example" }'Create a new broadcast channel.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Channel creation request
Media typeapplication/json
object
avatar_chunk_id
integer
avatar_key
Base64-encoded
string
description
string
initial_members
Addresses to add as initial subscribers
Array<string>
name
string
type
“public” or “private”
string
Examplegenerated
{ "avatar_chunk_id": 1, "avatar_key": "example", "description": "example", "initial_members": [ "example" ], "name": "example", "type": "example"}Responses
Section titled “Responses”OK
Media typeapplication/json
object
key
additional properties
any
Examplegenerated
{}Bad Request
Media typeapplication/json
object
error
string
success
boolean
Examplegenerated
{ "error": "example", "success": true}Unauthorized
Media typeapplication/json
object
error
string
success
boolean
Examplegenerated
{ "error": "example", "success": true}Conflict
Media typeapplication/json
object
error
string
success
boolean
Examplegenerated
{ "error": "example", "success": true}Internal Server Error
Media typeapplication/json
object
error
string
success
boolean
Examplegenerated
{ "error": "example", "success": true}