Read a space's chat
const url = 'https://spaces.work.optidata.cloud/api/spaces/a3051110-3152-412d-a015-6d0228be403e/chat/messages?limit=50';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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).
Authorizations
Section titled “Authorizations”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”The space’s uuid or hash.
Query Parameters
Section titled “Query Parameters”Return only messages older than this message id.
Messages per page.
Responses
Section titled “ Responses ”A page of messages.
object
object
object
Pass it as before_id to read the next page; null on the last page.
Examples
{ "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.
Authentication failures use an error key rather than message.
object
Examples
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).
object
Examples
Not the space's owner
{ "message": "You do not have permission to update this space."}Not a builder
{ "message": "You do not have permission to view this map."}Not a super-administrator
{ "message": "You do not have permission to activate this map."}Nothing has this identifier.
object
Examplegenerated
{ "message": "example"}The authentication key is expired or not recognised. Get a fresh one and retry.
Authentication failures use an error key rather than message.
object
Examples
{ "error": "JWT passport expired: Passport expired"}A query parameter failed validation.
object
The first validation message.
Validation messages keyed by field name.
object
Examples
{ "message": "The limit field must be at least 1.", "errors": { "limit": [ "The limit field must be at least 1." ] }}