Unit listings

Replace a listing's images

Rewrites the gallery to exactly the images you list, in the order and with the captions you give. Use it to reorder, recaption, or change which image is the cover.

PUT
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 complete gallery. At least one entry.

Response

200 · The listing in summary form, with `primaryImage` refreshed.

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, a `fileId` 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.

Anything you leave out is dropped

This is a replacement, not a merge. Send every image you want to keep, each by its fileId — those come from images[].id on the listing. An image already in the gallery that is missing from your list is removed from it.