Chats

Assign a chat

Hands a chat to a property manager, or takes the assignment away. MagicDoor records who made the change.

PUT
https://api.portal.magicdoor.com/company-app/chats/{chatId}/assignee

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 assign.

example: 1830472847398404096

Body

application/json

propertyManagerIdstring

The property manager to hand the chat to. Send it without a value to leave the chat unassigned.

example: 1820011923988709376

Response

200 · The chat, with its new assignee.

idstring

The chat.

typeenum<string>

What the chat hangs off. A lease, maintenanceRequest, workOrder, or workOrderGroup chat is one conversation shared by several people; unknown is a chat keyed on a bare phone number.

leasetenantvendormaintenanceRequestworkOrderworkOrderGroupunknownowner
typeKeystring

The id of the thing the chat hangs off — a lease id for a lease chat, a phone number for an unknown chat.

subjectstring

The chat's title.

participantsChatParticipant[]

Everyone in the conversation. A lease or group chat lists every tenant here, not one chat each.

participantLanguagestring

ISO 639-1 code messages are translated into for the participants.

closedboolean

Whether the chat is archived. Sending a message to an archived chat reopens it.

pinnedboolean

Whether the chat is pinned in the portal.

groupNumberstring

The MagicDoor phone number this chat's SMS traffic uses. Present on lease, maintenance request and work order chats.

messageCountinteger

How many messages the chat holds.

unreadMessagesinteger

How many messages your company has not read yet.

latestMessageIdstring

The most recent message.

lastMessageSentAtstring · date-time

When the most recent message was sent.

latestMessageobject

The most recent message in full.

assignedPropertyManagerobject

The property manager who owns this chat. Absent when unassigned.

assignedByPropertyManagerobject

The property manager who made the assignment. Absent when MagicDoor assigned it rather than a person.

assignedAtstring · date-time

When the assignment was made.

humanEngagementRequestedstring · date-time

When the AI flagged this chat as needing a person to reply. Absent when it is not flagged.

leaseobject

The lease behind the chat, when there is one.

propertyTypeenum<string>

The kind of building, when the chat has a lease.

singleFamilymultiFamilycommercialcondotownHomeother
propertyIdstring

The property behind the chat.

unitIdstring

The unit behind the chat.

propertyImageIdstring

The property photo. Only set on maintenance request chats.

unitImageIdstring

The unit photo. Only set on maintenance request chats.

createdstring · date-time

When the chat was created.

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

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