Skip to content

Read a space's chat

GET
/spaces/{space}/chat/messages
curl --request GET \
--url 'https://spaces.work.optidata.cloud/api/spaces/a3051110-3152-412d-a015-6d0228be403e/chat/messages?limit=50' \
--header 'Authorization: Bearer <token>'

The chat messages of a space, newest first. To read further back, pass the next_before_id of the previous page as before_id; it is null on the last page.

How long messages are kept depends on your company’s settings. Archived spaces cannot be read (403).

space
required
string

The space’s uuid or hash.

before_id
integer
>= 1

Return only messages older than this message id.

limit
integer
default: 50 >= 1 <= 200

Messages per page.

A page of messages.

Media typeapplication/json
object
data
required
Array<object>
object
id
required
integer
author_uuid
string | null
author_name
required
string
content
required
string
created_at
required
string format: date-time
meta
required
object
space_uuid
required
string
limit
required
integer
has_more
required
boolean
next_before_id
required

Pass it as before_id to read the next page; null on the last page.

integer | null
Examples
Examplemessages
{
"data": [
{
"id": 4,
"author_uuid": "2d9e8f70-1a3b-4c5d-8e9f-a0b1c2d3e4f5",
"author_name": "Ana Souza",
"content": "Standup in 5 minutes at the big table.",
"created_at": "2026-09-03T20:52:56-03:00"
},
{
"id": 3,
"author_uuid": "5b1c7e22-9d40-4f6a-b3c8-1e2f3a4b5c6d",
"author_name": "Bruno Lima",
"content": "Good morning!",
"created_at": "2026-08-26T12:26:42-03:00"
}
],
"meta": {
"space_uuid": "a3051110-3152-412d-a015-6d0228be403e",
"limit": 2,
"has_more": true,
"next_before_id": 3
}
}

No authentication key was sent.

Media typeapplication/json

Authentication failures use an error key rather than message.

object
error
required
string
Examples
Examplemissing

No bearer token sent

{
"error": "JWT passport exception: Missing bearer token in request"
}

The caller is not allowed to do this (see “Who may do what”), or the authentication key is not recognised (empty message).

Media typeapplication/json
object
message
required
string
Examples

Not the space's owner

{
"message": "You do not have permission to update this space."
}

Nothing has this identifier.

Media typeapplication/json
object
message
required
string
Examplegenerated
{
"message": "example"
}

The authentication key is expired or not recognised. Get a fresh one and retry.

Media typeapplication/json

Authentication failures use an error key rather than message.

object
error
required
string
Examples
Exampleexpired
{
"error": "JWT passport expired: Passport expired"
}

A query parameter failed validation.

Media typeapplication/json
object
message
required

The first validation message.

string
errors
required

Validation messages keyed by field name.

object
key
additional properties
Array<string>
Examples
ExamplebadLimit
{
"message": "The limit field must be at least 1.",
"errors": {
"limit": [
"The limit field must be at least 1."
]
}
}