Create a message
Create a message inside conversation.
Parameters
content
string
required
Content of the message.
format
enum
required
The message format. One of
text, html.attachments
array
Array of file IDs to attach. Each file can be used only once.
send_at
string
Time at which the message to be send. Leave blank to send message now.
Returns
Returns the created message object. Throws an error if some parameters are not valid.
post
/api/conversations/{id}/messages
curl -X POST https://{workspace}.kitchen.co/api/conversations/{id}/messages \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'X-Requested-With: XMLHttpRequest' \
-H 'Authorization: Bearer {API_KEY}'
Response
{
"author": "u_c01bb6102b6ddadd4b1f020e",
"attachments": [
"fi_081dcab571f6c37d709078ce"
],
"content": "The message content",
"conversation": "convr_1lbg89ha9ttb5dmxuldku3nx",
"created_at": "2024-01-23T23:09:00+00:00",
"format": "text",
"id": "msg_3447589816730d8ba4e50528",
"send_at": null,
"updated_at": "2024-01-23T23:09:00+00:00"
}