Create a message

Using this method you can create a message

post
Create a message

https://api.imber.live/message/
This endpoint allows you to create a message.
Request
Response
Request
Headers
Authentication
required
string
Authentication token
Body Parameters
urlInformation
optional
object
Required if type of message is Link (Field described in Table 3)
fileInformation
optional
object
Required if type of message is file (fields described in Table 2)
type
required
string
Type of message (Table 1)
workSpaceId
required
string
The id of the workspace which the message belongs to.
message
required
string
Message text
creatorType
required
string
user, operator or workSpace
creator
required
string
The ID of creator of this message (ID of operator or user)
conversationId
required
string
The id of conversation which the message belongs to.
Response
200: OK
Cake successfully retrieved.
{ "name": "Cake's name", "recipe": "Cake's recipe name", "cake": "Binary cake"}
404: Not Found
Could not find a cake matching this query.
{ "message": "Ain't no cake like that."}

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