Set Channel Type
    • Dark
      Light
    • PDF

    Set Channel Type

    • Dark
      Light
    • PDF

    Article summary

    Post
    /api/v1/channels.setType

    Set the channel type. The channel type can be either c (public) or p (private).

    Changelog

    VersionDescription
    0.49.0Added
    Header parameters
    X-Auth-Token
    stringRequired

    The authToken of the authenticated user.

    ExampleRScctEHSmLGZGywfIhWyRpyofhKOiMoUIpimhvheU3f
    X-User-Id
    stringRequired

    The userId of the authenticated user.

    ExamplerbAXPnMktTFbNpwtJ
    Body parameters
    Example 1
    {
      "roomId": "WDuJLFkjwk6L7LdFC",
      "type": "p"
    }
    object
    roomId
    string Required

    The channel's ID. Alternatively, enter the channelName parameter and provide the channel's name as the value.

    type
    string Required

    The channel's type. The type of room this channel should be, either c or p.

    c is for channel and p is for private.

    Responses
    200

    OK

    Example 1
    {
      "channel": {
        "_id": "ByehQjC44FwMeiLbX",
        "name": "testing0",
        "t": "p",
        "msgs": 0,
        "u": {
          "_id": "aiPqNoGkjpNDiRx6d",
          "username": "goose160"
        },
        "ts": "2017-01-05T18:02:50.754Z",
        "ro": false,
        "sysMes": true,
        "_updatedAt": "2017-01-05T19:02:24.429Z",
        "usernames": [
          "goose160",
          "graywolf336"
        ],
        "joinCodeRequired": true,
        "muted": []
      },
      "success": true
    }
    Expand All
    object
    channel
    object
    _id
    string
    name
    string
    t
    string
    msgs
    integer
    u
    object
    _id
    string
    username
    string
    ts
    string
    ro
    boolean
    sysMes
    boolean
    _updatedAt
    string
    usernames
    Array of string
    string
    joinCodeRequired
    boolean
    muted
    Array of object
    object
    success
    boolean

    Was this article helpful?

    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.