Send a message
Sends a new message to an existing chat
Try this request in your browser
URL
https://api.natterly.com/api/v1/chats/send_message
Access
Must be authenticated as a user.
If not authorised, a MustBeAuthenticated error will be returned.
Parameters
| Parameter | Type | Default |
|---|---|---|
|
chat Required The UUID of the chat |
String | null |
|
text The message text |
String | null |
|
visibility Sets the visibility of this message? (Full, User or Visitor) |
String | Full |
|
file_data Base64 encoded data for a file to add with this message |
String | null |
|
file_name A file name to associated with the uploaded file |
String | null |
|
file_type The content type for an uploaded file |
String | null |
|
formatting The formatting type for the message |
String | null |
Errors
| Error | Attributes |
|---|---|
|
ChatNotFound No chat found with the given UUID |
|
|
ValidationError A validation error occurred while adding the message |
|
|
ChatNotActive The given chat is not active therefore cannot accept messages |
Response Data
This action will return a message structure.
You'll receive all attributes for this structure (basic and extended attributes).