Create a chat with a phone number
Opens a chat with a bare phone number, for someone with no tenant, owner, or vendor record. Nothing is sent to the number.
Authorization
AuthorizationstringrequiredBody
application/json
phoneNumberstringrequiredThe number to open a chat with. Must be a valid phone number.
participantNamestringA name to show for the person. 1 to 100 characters. Falls back to the number itself.
subjectstringThe chat's title. 1 to 200 characters. Falls back to the name, then to the number.
Response
200 · The chat for that number, or the reason there is none.
chatIdstringThe chat to talk to this recipient in. Absent when failureReason explains why no chat could be made.
failureReasonstringWhy no chat could be made. Absent on success.
401 · The access token is missing, expired, or not valid.
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.
If your company already has a chat with that number, its id is returned and participantName and subject are ignored. The chat's type is unknown and its typeKey is the normalised number.
A number MagicDoor cannot parse produces a 200 with no chatId and a failureReason of "Invalid phone number", not an error status. Check chatId before using it.