Work order chat

Open the vendor chat on a work order

Returns the id of the work order's chat with its vendor, creating it first if there is none. The only participant is the vendor — for a conversation that also includes the tenants, use Open the group chat on a work order. Calling it twice is safe. Requires the work_orders:read permission.

POST
https://services.magicdoor.com/maintenance/company-portal/work-orders/{workOrderId}/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

workOrderIdstringrequired

The work order whose vendor chat you want. A Snowflake id, sent as a decimal string.

example: 1841200938471029248

Response

200 · Either a chat id, or a reason why no chat could be opened. A work order with no vendor assigned gets `failureReason` and no `chatId`, not an error.

chatIdstring

The chat. Absent when no chat could be opened.

failureReasonstring

Why no chat could be opened. The only reason this endpoint produces is that the work order has no vendor assigned. Absent on success.

401 · The request carried no valid access token.

403 · The token is not a property manager token, or it lacks the `work_orders:read` permission.

404 · No such work order, it belongs to another company, or the vendor assigned to it no longer exists.

The stored id is trusted here

Unlike the maintenance request chat, this endpoint hands back whatever chat id is stored on the work order without checking that the chat is still open. Assign a vendor before calling it: the chat is created with that vendor as its only participant, and reassigning the work order later does not move the chat.