Subscribe to channel
POST
/api/channels/{channelId}/subscribe
const url = 'http://localhost:3001/api/channels/example/subscribe';const options = {method: 'POST', headers: {Authorization: '<Authorization>'}};
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/example/subscribe \ --header 'Authorization: <Authorization>'Subscribe (follow) a channel to receive its messages.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”channelId
required
string
Channel ID
Responses
Section titled “Responses”OK
Media typeapplication/json
object
key
additional properties
any
Examplegenerated
{}Unauthorized
Media typeapplication/json
object
error
string
success
boolean
Examplegenerated
{ "error": "example", "success": true}Not Found
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}