Chats

List messages in a chat

Returns a chat's messages newest first, interleaved with the property-manager notes written on it.

GET
https://api.portal.magicdoor.com/company-app/chats/{chatId}/messages

Authorization

Authorizationstringrequired
Bearer token — Send your API token in the Authorization header as Bearer <token>. Requests without a valid token are rejected with 401 Unauthorized.

Path parameters

chatIdstringrequired

The chat to read.

example: 1830472847398404096

Query parameters

takeinteger

How many entries to return. Between 0 and 250.

default: 25example: 25
beforestring · date-time

Only return entries sent before this moment. Use it with take to page backwards through history.

example: 2026-08-17T14:00:00
afterstring · date-time

Only return entries sent after this moment.

searchstring

Only return messages whose text contains this. Notes are left out of a search result.

fileNamestring

Only return messages with an attachment whose name contains this. Notes are left out of a search result.

Response

200 · One page of the chat's timeline.

itemsChatTimelineItem[]

Messages and notes interleaved, newest first.

totalCountinteger

How many messages the chat holds in total. Notes are not counted.

propertyManagersPropertyManager[]

The property managers referenced by the notes in items, so you can show their names without another call.

messagesChatMessage[]deprecated

The messages from items, without the notes.

401 · The access token is missing, expired, or not valid.

404 · No chat with that id belongs to your company.

items is the list to read. messages repeats the same messages without the notes and is kept only for callers written before notes existed.

Notes are internal: they are never shown to the tenant, owner, or vendor. Notes written for the AI alone are never returned here at all.