Send a chat message with attached files
Posts a message into a chat and uploads its attachments in the same request, as multipart/form-data. Every participant in the chat receives it.
Authorization
AuthorizationstringrequiredPath parameters
chatIdstringrequiredThe chat to post into.
Body
multipart/form-data
Form parts. files may repeat, once per file.
messagestringThe message text.
filesfile[]The files to attach. Repeat the part once per file. Empty files are skipped.
sendTextbooleanAlso send the message as an SMS to every participant with a phone number.
sendEmailbooleanAlso send the message as an email to every participant with an email address.
aiEnhancedbooleanRecord that the text came from the AI suggestion endpoint.
Response
200 · The message was posted. The response has no body — use the JSON form if you need the message back.
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 JSON one share a URL. MagicDoor picks between them on the request's Content-Type: send multipart/form-data to reach this one.