Chats

List unread messages

Returns the messages your company has not read yet, across every chat, with the chats they belong to.

GET
https://api.portal.magicdoor.com/company-app/chats/unread-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.

Query parameters

pageinteger

Which page to return. The first page is 1.

default: 1example: 1
pageSizeinteger

How many items to return per page. Between 1 and 100.

default: 50example: 25
messageTypeenum<string>

Which kind of message to count as unread.

default: participantparticipantpropertyManagerbotannouncement

Response

200 · One page of unread messages.

itemsChatMessage[]

The unread messages, one page at a time.

currentPageinteger

The page number that was returned.

totalPagesinteger

How many pages exist at this page size.

pageSizeinteger

How many items a page holds.

totalCountinteger

How many items match in total, across every page.

chatsChat[]

The chats the messages in items belong to, so you can show each message in context without another call.

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

By default only messages from the other side — the tenant, owner, or vendor — are returned. Set messageType to look at your team's own messages, the AI's, or announcements instead.