Create a message
Using this method you can create a message
Create a message
POST
https://api.imber.live/message/
This endpoint allows you to create a message.
Headers
Name | Type | Description |
---|---|---|
Authentication | string | Authentication token |
Request Body
Name | Type | Description |
---|---|---|
urlInformation | object | Required if type of message is Link (Field described in Table 3) |
fileInformation | object | Required if type of message is file (fields described in Table 2) |
type | string | Type of message (Table 1) |
workSpace | string | The id of the workspace which the message belongs to. |
message | string | Message text |
creatorType | string | contact, member or workSpace |
creator | string | The ID of creator of this message (ID of member or contact) |
roomId | string | The id of conversation which the message belongs to. |
Types (Table 1)
Type | Description |
0 | Simple text |
1 | Photo |
2 | Video |
3 | File |
4 | Voice |
5 | Event |
6 | Link |
7 | Deleted |
8 | Map |
9 | Emoji |
10 | Form |
11 | Markdown |
fileInformation (Table 2)
Field | Description |
originalName | The original name of file to display |
format | Type of file (png, jpg or ...) |
fileSize | In KB |
text |
urlInformation (Table 3)
Filed | Description |
url | The exact URL |
favicon | The favicon of target website (use for link preview) |
description | Description of website (use for link preview) |
Note : When type of message is file or URL, the exact URL of Link of file should be placed also in message value
Last updated