Properties

Create a property

Adds a property to a portfolio. Units are created separately afterwards, so a new property starts with no units and every rollup at zero.

POST
https://api.portal.magicdoor.com/company-app/properties

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.

Body

application/json

namestring

What to call the property, 1 to 150 characters. Leave it out and displayName falls back to the street address.

addressobjectrequired

Where the property is. Required, even though its parts are only lightly validated.

typeenum<string>required

What kind of building this is. singleFamily and condo — and townHome once it has exactly one unit — make the property a single-unit one, which changes how MagicDoor renders addresses and returns defaultUnit.

singleFamilymultiFamilycommercialcondotownHomeother
portfolioIdstringrequired

The portfolio to put the property in.

imageSessionIdstring

Id of a completed upload session for the property's main photo. The file is claimed and becomes imageId.

imageIdstringdeprecated

Id of an already-uploaded but unclaimed file. Use imageSessionId instead.

magicTagsobject

Free-form labels, as a map of string keys to string values.

totalFloorsinteger

Number of floors in the building, 1 to 200.

Response

200 · The new property, hydrated. `customFieldValues` is absent here — this endpoint does not load custom field values.

idstring

Snowflake id of the property.

namestring

The name a property manager gave the property. Absent when the property was never named.

displayNamestring

What to show in a list: the name if there is one, otherwise streetAddress1, otherwise the literal "Unnamed Property". Computed on every read.

addressobject

The property's address. Absent when no address has been recorded.

portfolioIdstring

The portfolio this property sits in.

typeenum<string>

What kind of building this is. A singleFamily or condo property, and a townHome with exactly one unit, is treated as a single-unit property elsewhere in the API.

singleFamilymultiFamilycommercialcondotownHomeother
totalFloorsinteger

Number of floors in the building, 1 to 200. Absent when it was never set.

unitCountinteger

How many units belong to the property, active and deactivated together. Maintained by MagicDoor as units are created and deleted; you cannot set it.

recentRentalApplicationsinteger

How many rental applications naming this property arrived in the recent window. Computed; you cannot set it.

activeboolean

false once the property has been deactivated.

imageIdstring

The file behind the property's main photo. Absent when no photo has been set.

iconsstring[]

Icon keys pinned to the property. Free-form strings.

magicTagsobject

Free-form labels on the property, as a map of string keys to string values. MagicDoor stores them as given and uses them to scope things like vendor bills. Absent when none are set.

imageobject

The property's main photo, resolved from imageId. Absent when no photo has been set.

portfolioobject

The portfolio this property sits in, expanded.

totalRentnumber

Computed: the sum of currentRent across the property's active leases. Not stored — you cannot set it.

currentBalancenumber

Computed: the sum of balance across the property's active leases. A positive figure means tenants owe money.

postedBalancenumber

Computed: the sum of postedBalance across the property's active leases — the same total as currentBalance but counting only charges that have already been posted.

totalDepositnumber

Computed: the sum of securityDepositPaid across the property's active leases.

occupiedUnitsinteger

Computed: how many distinct units of this property have an active lease.

activeUnitsinteger

Computed: how many of the property's units are active. Differs from unitCount, which also counts deactivated units.

emptyUnitsinteger

Computed as activeUnits minus occupiedUnits.

ownersobject[]

Who owns the property and in what share. Empty when no owner has been linked.

defaultUnitobject

The property's only unit, returned when the property is a single-unit one — singleFamily, condo, or a townHome with exactly one unit. Absent otherwise.

400 · A required field is missing or fails validation — no address, an unknown property type, a name over 150 characters, or `totalFloors` outside 1 to 200. The response carries an `errors` member mapping each rejected field name to its message.

401 · The access token is missing, expired, or not for this company.

404 · No portfolio with that id.

Where a property sits

MagicDoor nests records four deep: a portfolio holds properties, a property holds units, and a lease is signed on a unit. Every property names exactly one portfolioId; move it with the move endpoint rather than by writing that field. A property is the building — the rent, the tenants and the money all hang off its units.

Some property types get a unit for free

Creating a singleFamily or condo property also creates one unit on it, named Home, because for those the building is the rentable thing. Every other type — including townHome — starts with no units, and you add them through the units endpoints.

Attaching a photo

Start an upload with Start a property photo upload first, send the bytes, then pass that session's id as imageSessionId here. Doing it in one call saves you a follow-up update.