Send a chat message
Posts a message into a chat as your company, optionally delivering it by SMS and email as well. Every participant in the chat receives it.
Authorization
AuthorizationstringrequiredPath parameters
chatIdstringrequiredThe chat to post into.
Body
application/json
Send at least one of message or uploadSessionIds.
messagestringThe message text. Up to 30,000 characters.
uploadSessionIdsstring[]Upload sessions to attach, from the chat attachment upload session endpoint. At most 20.
sendTextbooleanAlso send the message as an SMS to every participant with a phone number. Ignored when texting is switched off for the company.
sendEmailbooleanAlso send the message as an email to every participant with an email address.
aiEnhancedbooleanRecord that the text came from the AI suggestion endpoint. It does not rewrite the text.
Response
200 · The message as it was recorded. The `textStatus` and `emailStatus` fields describe delivery so far.
idstringThe message.
chatIdstringThe chat the message belongs to.
messageTypeenum<string>Who the message came from. participant is the tenant, owner, or vendor; propertyManager is someone on your team; bot is the MagicDoor AI; announcement is a message posted by an announcement.
sourceenum<string>How the message arrived. app is the portal or this API, text is an inbound SMS, email an inbound email, system and notification are generated by MagicDoor.
participantIdstringThe participant who sent it, matching participants[].id on the chat. For a property-manager message this is the property manager's id.
messagestringThe message text as written.
messageLanguagestringISO 639-1 code MagicDoor detected for message.
translatedMessagestringThe message translated into the other side's language. Absent when no translation was needed.
translatedMessageLanguagestringISO 639-1 code translatedMessage is written in.
translatedFailedbooleanWhether translation was attempted and did not succeed.
aiEnhancedbooleanWhether the text was rewritten by the AI before sending.
sentAtstring · date-timeWhen the message was recorded.
filesChatMessageFile[]Files attached to the message.
readbooleanWhether your company has read this message.
readAtstring · date-timeWhen your company read it. Absent while unread.
sendTextbooleanWhether MagicDoor was asked to deliver this message as an SMS.
textStatusenum<string>How the SMS went. disabled means texting is switched off for the company, noRecipients that nobody in the chat had a usable phone number.
textSentAtstring · date-timeWhen the SMS was handed to the carrier.
textDeliveredAtstring · date-timeWhen the carrier confirmed delivery.
textSendStatusesobjectPer-phone-number delivery state, keyed by phone number.
textFailedReasonstringWhy the SMS failed, when it did.
sendEmailbooleanWhether MagicDoor was asked to deliver this message as an email.
emailStatusenum<string>How the email went, including bounces and complaints reported afterwards.
emailSentAtstring · date-timeWhen the email was handed to the mail provider.
emailDeliveredAtstring · date-timeWhen the mail provider confirmed delivery.
aiProcessingStatusenum<string>Where the message sits in AI handling. manual means the AI handed it to a person and it is waiting to be dealt with.
aiProcessedAtstring · date-timeWhen AI handling finished.
handledByPropertyManagerIdstringThe property manager who marked the message handled.
handledByPropertyManagerAtstring · date-timeWhen it was marked handled.
401 · The access token is missing, expired, or not valid.
404 · No chat with that id belongs to your company.
422 · The company has all outbound communications switched off, so no message was recorded and nothing was sent.
The message is added to the chat, where its participants see it. If you set sendText it is also sent as an SMS to every participant's phone; if you set sendEmail it is also emailed to them. On a lease or group chat that is every participant, not one person.
This endpoint and the multipart one below share a URL. MagicDoor picks between them on the request's Content-Type: send application/json to reach this one.
Ask for an upload session first, upload the bytes to the endpoint it gives you, then pass the sessionId here in uploadSessionIds.
Posting to an archived chat reopens it and the message goes out as normal.