Chats

Create an owner chat

Opens the one-to-one chat with an owner and returns its id. The owner is the only participant.

POST
https://api.portal.magicdoor.com/company-app/owners/{ownerId}/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

ownerIdstringrequired

The owner to open a chat with.

example: 1826114338921381888

Response

200 · The owner's chat.

chatIdstring

The chat to talk to this recipient in. Absent when failureReason explains why no chat could be made.

failureReasonstring

Why no chat could be made. Absent on success.

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

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

422 · The owner record has been deactivated.

This call creates or finds a chat. It does not message anyone. Nothing reaches the recipient until you post a message to the returned chatId.

Calling it again returns the same chat rather than making a second one.