Send a message

Sends a new message to an existing chat

Try this request in your browser

/api/ /chats/send_message

Headers

X-API-Token

Parameters

chat String
text String
visibility String
file_data String
file_name String
file_type String
formatting String

The request output will be shown here...

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

  • chat

    The provided chat UUID

ValidationError

A validation error occurred while adding the message

  • error

    The details of the errors

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).