Sends a new message

Sends a message to a user using multipart/form-data. Required fields vary depending on contentType. For example:

  • content (string) is required only if contentType is 'text'.
  • file (binary) is expected if contentType is 'image' or 'file'.

Supported for direct chat conversations (conversationType=chat).

File size limits:

  • contentType image: maximum 2 MB per file. Exceeding this limit returns a 400 Bad Request with error type fileTooLarge.
  • contentType file: maximum 5 MB per file. Exceeding this limit returns a 413 Request Entity Too Large.
Body Params
uuid
required

participantId of the participant sending the message.

uuid
required

participantId of the participant receiving the message.

string
enum
Defaults to chat

Type of conversation. Only 'chat' (direct chats) is supported. Defaults to 'chat' if not provided.

Allowed:
string
enum
required

Type of message content. Determines which fields are required and which file size limits apply:

  • text: requires the content field.
  • image: requires the file field. Maximum file size is 2 MB.
  • file: requires the file field. Maximum file size is 5 MB.
Allowed:
string

Required only if contentType is 'text'.

file

The file to upload. Required when contentType is 'image' or 'file'. Maximum size: 2 MB for images, 5 MB for files.

Responses

Language
Credentials
Bearer
JWT
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json