Messages

The Messages API lets you create and list messages in a Workspace.

The Message object

{
  "id": "1",
  "project_id": "1",
  "type": "message",
  "format": "markdown",
  "content": "Lorem Ipsum Dolor Sit Amet",
  "author": {},
  "files": [],
  "created_at": "2021-09-08T07:19:59+00:00"
}
1
2
3
4
5
6
7
8
9
10

Attributes

id string

The unique identifier of the Message.


project_id string

The id of the Project.


type string

The type of the Message. Can be message, note or system.


format string

The format of the Message. Can be html, markdown or text.


content string

The content of the Message.


author User

The author of the Message. See The User object


files File[]

The Files attached to the Message. See The File object


created_at datetime

The datetime the Message was created.




List Messages

GET /v1/messages

curl 'https://{workspace}.kitchen.co/api/v1/messages' \
 -H 'Accept: application/json' \
 -H 'Authorization: Bearer {AUTH_TOKEN}'
1
2
3
{
  "data": [
    {
      "id": "1",
      "project_id": "1",
      "type": "message",
      "format": "markdown",
      "content": "Lorem Ipsum Dolor Sit Amet",
      "author": {},
      "files": [],
      "created_at": "2021-09-08T07:19:59+00:00"
    }
  ],
  "meta": {}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17



Retrieve a Message

GET /v1/messages/{message_id}

curl 'https://{workspace}.kitchen.co/api/v1/messages/{message_id}' \
 -H 'Accept: application/json' \
 -H 'Authorization: Bearer {AUTH_TOKEN}'
1
2
3

Parameters

message_id string required

The id of the Message.


Response

{
  "id": "1",
  "project_id": "1",
  "type": "message",
  "format": "markdown",
  "content": "Lorem Ipsum Dolor Sit Amet",
  "author": {},
  "files": [],
  "created_at": "2021-09-08T07:19:59+00:00"
},
1
2
3
4
5
6
7
8
9
10



Create a Message

POST /v1/messages

curl 'https://{workspace}.kitchen.co/api/v1/messages' \
 -H 'Accept: application/json' \
 -H 'Authorization: Bearer {AUTH_TOKEN}' \
 -F 'body="Lorem Ipsum Dolor Sit Amet"' \
 -F 'format="markdown"' \
 -F 'files[]=@"file.png"' \
 -F 'project_id="1"' \
 -F 'author_id="1"' \
 -X POST
1
2
3
4
5
6
7
8
9

Body parameters

body string required

The content of the Message.


format string required

The format of the Message. Can be markdown, html or text.


project_id string required

The ID of the Project.


author_id string required

The ID of the User.


files array optional

The files that should be attached to the Message.


Response

{
  "id": "1",
  "project_id": "1",
  "type": "message",
  "format": "markdown",
  "content": "Lorem Ipsum Dolor Sit Amet",
  "author": {},
  "files": [],
  "created_at": "2021-09-08T07:19:59+00:00"
}

1
2
3
4
5
6
7
8
9
10
11



List Messages from a Project

GET /v1/projects/{project_id}/messages

curl 'https://{workspace}.kitchen.co/api/v1/projects/{project_id}/messages' \
 -H 'Accept: application/json' \
 -H 'Authorization: Bearer {AUTH_TOKEN}'
1
2
3

Parameters

project_id string Required

The id of the Project.


Response

{
  "data": [
    {
      "id": "1",
      "project_id": "1",
      "type": "message",
      "format": "markdown",
      "content": "Lorem Ipsum Dolor Sit Amet",
      "author": {},
      "files": [],
      "created_at": "2021-09-08T07:19:59+00:00"
    },],
  "meta": {}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18