Create Discussion
    • Dark
      Light
    • PDF

    Create Discussion

    • Dark
      Light
    • PDF

    Article summary

    Post
    /api/v1/rooms.createDiscussion

    Creates a new discussion for the room. It requires at least one of the following permissions: start-discussion OR start-discussion-other-user, AND must be with the following setting enabled: Discussion_enabled.

    Changelog

    VersionDescription
    1.0.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
    {
      "prid": "GENERAL",
      "t_name": "Discussion Name"
    }
    object
    prid
    string Required

    Parent room ID of the discussion.

    t_name
    string Required

    Discussion name.

    users
    Array of string

    Array of users to join in the discussion, if not provided, it will be an empty array. (Note: if provided, it must be an array).

    string
    pmid
    string

    Parent message ID (if the discussion comes from a message).

    reply
    string

    The reply of the discussion.

    Responses
    200

    OK

    Example
    {
      "discussion": {
        "rid": "cgk88DHLHexwMaFWh",
        "name": "WJNEAM7W45wRYitHo",
        "fname": "Discussion Name",
        "t": "p",
        "msgs": 0,
        "usersCount": 0,
        "u": {
          "_id": "rocketchat.internal.admin.test",
          "username": "rocketchat.internal.admin.test"
        },
        "topic": "general",
        "prid": "GENERAL",
        "ts": "2019-04-03T01:35:32.271Z",
        "ro": false,
        "sysMes": true,
        "default": false,
        "_updatedAt": "2019-04-03T01:35:32.280Z",
        "_id": "cgk88DHLHexwMaFWh"
      },
      "success": true
    }
    Expand All
    object
    discussion
    object
    rid
    string
    name
    string
    fname
    string
    t
    string
    msgs
    integer
    usersCount
    integer
    u
    object
    _id
    string
    username
    string
    topic
    string
    prid
    string
    ts
    string
    ro
    boolean
    sysMes
    boolean
    default
    boolean
    _updatedAt
    string
    _id
    string
    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.