Chats

Suggest a reply

Rewrites your draft into a suggested reply using the chat's history. Nothing is sent — you get text back to send yourself.

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

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 whose history the suggestion is based on.

example: 1830472847398404096

Body

application/json

myTextstringrequired

Your draft. Must not be empty.

example: plumber thursday 9-11

Response

200 · The suggestion.

suggestedTextstring

The rewritten reply. Absent when the AI could not produce one.

failedboolean

true when no suggestion could be produced.

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

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