Unit listings

Add images to a listing

Appends uploaded images to the listing's gallery. Images already there are kept — this adds, it does not replace.

POST
https://api.portal.magicdoor.com/company-app/unit-listings/{unitId}/images

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

unitIdstringrequired

Snowflake id of the unit. A unit listing has no id of its own — it is keyed by the unit it markets, so this is also the listing's id.

example: 1830472847398404098

Body

application/json

imagesobject[]required

The images to add. At least one.

Response

200 · The listing in summary form, with `primaryImage` refreshed. The full gallery is not in this response — fetch the listing for that.

idstring

The listing's id, which is the same Snowflake as unitId.

portfolioIdstring

The portfolio behind the unit.

propertyIdstring

The property behind the unit.

unitIdstring

The unit this listing markets. Equal to id.

statusenum<string>

Where the unit stands from a letting point of view. This is the listing's own status; it is not derived from whether a lease exists.

pendingavailablereservedleasedoccupiedunderMaintenancesoldother
rentalPricenumber

The asking rent, as a decimal amount. This is the listing's price, separate from the unit's marketRent. Absent when it was never set, and a listing cannot be published without it.

securityDepositnumber

The deposit asked for, as a decimal amount. Absent when it was never set.

availableFromstring · date

The first date a tenant could move in. Absent when it was never set.

leaseTermenum<string>

The lease length being offered. Absent when it was never set.

monthToMonthhalfYearoneYeartwoYearsthreeYearsother
titlestring

The listing headline. Absent when it was never set.

listedstring · date

The date the listing was published. Its absence is what tells you the listing is not live — there is no separate boolean in the response.

updatedstring · date-time

When the listing last changed, as a wall clock in the company's timezone with no offset.

pinnedboolean

Whether a property manager pinned this listing to the top of their own list.

primaryImageobject

The image marked default, or the first one if none is. Absent when the listing has no images.

primaryVideoobject

The video marked default, or the first one if none is. Absent when the listing has no videos.

propertyTypeenum<string>

Copied from the property, so a search can filter on it without a second call.

singleFamilymultiFamilycommercialcondotownHomeother
singleLineAddressstring

The unit's address as one line. Absent when neither the unit nor its property has an address.

recentRentalApplicationsinteger

How many rental applications named this unit in the recent window. Computed.

400 · `images` is missing or empty, an `uploadSessionId` is not a decimal number, or a description exceeds 500 characters. 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 listing for that unit, or it belongs to another company.

422 · One of the upload sessions has no completed file behind it, or a description exceeds 500 characters.

Add takes upload sessions, replace takes file ids

This endpoint takes uploadSessionId for each image, because the files are new. The PUT that replaces the gallery takes fileId for each, because those files already exist. They are not interchangeable.