Emails

Email an owner with attached files

Sends an email to an owner and uploads its attachments in the same request, as multipart/form-data.

Ask for an upload session at POST /company-app/emails/upload-sessions, then send the email as JSON with attachmentSessionIds.
POST
https://api.portal.magicdoor.com/company-app/emails/owners/{ownerId}

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 email.

example: 1826114338921381888

Body

multipart/form-data

Form parts. attachments may repeat, once per file.

subjectstringrequired

The subject line.

bodystringrequired

The body of the email.

attachmentsfile[]

The files to attach. Repeat the part once per file.

Response

200 · The email that was sent.

idstring

The email.

subjectstring

The subject line.

bodystring

The body as it was sent.

sentstring · date-time

When it was sent.

templateenum<string>

Which MagicDoor template wrapped the body. Emails sent through this API use companyGeneric.

emptycompanyGenericmagicDoor
targetsobject[]

Everyone it went to, with the record behind each address.

filesFile[]

The attachments that were sent with it.

propertyManagerobject

The property manager who sent it. Absent when MagicDoor sent it automatically.

metadataobject

Free-form key/value data MagicDoor stored with the email.

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

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

422 · The owner record is deactivated, the owner has no usable email address, or the company has all outbound communications switched off.

This sends a real email

The email leaves immediately, to the owner's email address. There is no draft step and no way to recall it.

This endpoint and the JSON one share a URL. MagicDoor picks between them on the request's Content-Type.