Chats

Update a chat

Renames a chat and sets its language, assignee, and pinned state. Nothing is sent to the participants.

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

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

example: 1830472847398404096

Body

application/json

subject is required and replaces the current title. The other three keep their current value when you leave them out.

subjectstringrequired

The chat's title. Must not be blank.

example: 4B - Willow Creek
participantLanguagestring

ISO 639-1 code to translate messages into for the participants, for example es.

assignedPropertyManagerIdstring

The property manager who owns the chat. Leaving it out keeps the current assignee; it cannot clear one — use the assignee endpoint for that.

pinnedboolean

Whether to pin the chat in the portal.

Response

200 · The updated chat.

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.