POST ./chat/message

It is used to add new message and publish into RabbitMq event with type "chat.message.created", containing cmsgID key.

Permission only with school config keys: grpEnabled

Parameter cmRole can have the following value:

  • 1 = member
  • 2 = moderator

Parameter cmsgType can have the following value:

  • 1 = text message
  • 2 = system message
  • 3 = file
  • 4 = album

POST parameters

NameValue TypeValidationDetails
crIDintRequiredRoom ID.
cmsgTypeintRequiredThe type of the message sent.
cmsgTextstringRequiredThe content itself.
cmsgFsIDintOptionalThe field FsID from the Files module.

Validation

Error FieldError CodeError Message
crID101This room is moderated.
cmsgFsID103Invalid fsID.

Output example

{
"cmsgID": "27"
}