Property managers

Grant property access

Widens a property manager's reach by one portfolio, one property, or everything at once, and returns their reach afterwards. Send exactly one of the three.

POST
https://api.portal.magicdoor.com/company-app/property-managers/{propertyManagerId}/property-access

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

propertyManagerIdstringrequired

The property manager. A Snowflake id, sent as a decimal string.

example: 1830472847398404098

Body

application/json

Send allProperties: true on its own, or exactly one of portfolioId and propertyId.

allPropertiesboolean

true grants access to every property the company has. When you send true, both id fields must be left out.

default: false
portfolioIdstring

The portfolio to grant. Reaches every property in it. Send this or propertyId, not both.

propertyIdstring

The property to grant. Send this or portfolioId, not both.

Response

200 · The property manager's reach after the grant.

allPropertiesboolean

true when this property manager reaches every property the company has, now and in future. When it is true, propertyIds and portfolioIds carry no meaning.

propertyIdsstring[]

The individual properties they reach. Properties that no longer exist are filtered out of this list rather than reported.

portfolioIdsstring[]

The portfolios they reach. Granting a portfolio reaches every property in it, including properties added to it later. Portfolios that no longer exist are filtered out of this list rather than reported.

400 · The three fields do not make a valid request: `allProperties` was true alongside an id, both ids were sent, or none of the three was sent.

401 · The access token is missing, expired, or does not belong to a property manager.

404 · No property manager with that id exists for the calling company. A record that belongs to another company is reported the same way as one that does not exist. The id you asked for is in `entityId`; `detail` names only the kind of record.

Two different gates

A property manager is limited in three independent ways, and it is easy to confuse them.

  • Permissions are resource:action strings such as property:read. They decide what the API lets this person do. See list permissions.
  • Property access decides which properties those permissions reach — all of them, or a named set of portfolios and properties. See get property access.
  • Menu access decides which top-level menus MagicDoor's own web app draws for them. It hides screens; it does not stop an API call. See get menu access.
  • allProperties: true grants the company-wide wildcard. From then on the property manager reaches every property the company has, including ones created later. It replaces the effect of any narrower grant.
  • portfolioId grants the whole portfolio, and keeps up with properties added to it later.
  • propertyId grants that one property only.

The portfolio or property must belong to the calling company; one that belongs to another company is reported as 404, the same as one that does not exist.

There is no check on the caller

Any property manager in the company can widen any colleague's reach, including their own, up to and including the company-wide wildcard.