Create Discussion
- Print
- DarkLight
- PDF
Create Discussion
- Print
- DarkLight
- PDF
Article summary
Did you find this summary helpful?
Thank you for your feedback
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
Version | Description |
---|---|
1.0.0 | Added |
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
{
"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
Success
{
"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
}
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
401
Unauthorized
Authorization Error
{
"status": "error",
"message": "You must be logged in to do this."
}
object
status
string
message
string
Was this article helpful?