Chats

Create a maintenance request chat

Opens the one chat that covers a maintenance request and returns its id. Every tenant on the related lease is a participant in it.

POST
https://api.portal.magicdoor.com/company-app/maintenance-requests/{maintenanceRequestId}/chat

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

maintenanceRequestIdstringrequired

The maintenance request to open a chat for.

example: 1830174880412073984

Response

200 · The maintenance request's chat, or the reason there is none.

chatIdstring

The chat to talk to this recipient in. Absent when failureReason explains why no chat could be made.

failureReasonstring

Why no chat could be made. Absent on success.

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

404 · No maintenance request with that id belongs to your company.

This call creates or finds a chat. It does not message anyone. Nothing reaches the recipient until you post a message to the returned chatId.

A request already linked to a chat returns that chat. Calling it again returns the same chat rather than making a second one. Tenants who have moved out are left out; tenants whose lease has not started yet are included.

A lease whose tenants have all moved out has nobody to put in a chat. The call succeeds with no chatId and a failureReason of "Lease does not have active or future tenants". Check chatId before using it.