Skip to main content
POST
/
workspace
/
{workspace_id}
/
realtime
/
channel
Create a new realtime channel using XanoScript
curl --request POST \
  --url https://your-xano-instance.xano.io/api:meta/workspace/{workspace_id}/realtime/channel \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: text/x-xanoscript' \
  --data 'realtime_channel foo {
  public_messaging = {active: false}
  private_messaging = {active: false}
  settings = {
    anonymous_clients: false
    nested_channels  : false
    message_history  : 0
    auth_channel     : false
    presence         : false
  }
}
'
{
  "id": 1,
  "name": "Channel Name",
  "active": true,
  "xanoscript": {
    "status": "ok",
    "value": "<string>",
    "message": "<string>"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

workspace_id
integer<int64>
required

Query Parameters

include_xanoscript
boolean
default:false

Body

text/x-xanoscript

The body is of type string.

Example:

"realtime_channel foo {\n public_messaging = {active: false}\n private_messaging = {active: false}\n settings = {\n anonymous_clients: false\n nested_channels : false\n message_history : 0\n auth_channel : false\n presence : false\n }\n}\n"

Response

Success!

id
integer<int64>
default:1
name
string
default:Channel Name
active
boolean
default:true
xanoscript
object