Announcements

Preview announcement recipients

Works out who an announcement would go to for a given set of filters, and whether each of them could actually be reached. Nothing is sent.

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

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

targetType decides which of the other filters apply. The rest are ignored when they do not.

targetTypeenum<string>required

Which kind of recipient to look for.

example: leaseleasetenantownervendor
portfolioIdsstring[]

Limit to these portfolios. Applies to tenant, lease, and owner targets.

propertyIdsstring[]

Limit to these properties. Applies to tenant, lease, and owner targets.

unitIdsstring[]

Limit to these units. Applies to tenant and lease targets.

includeEndedboolean

Include leases that have ended. Applies to lease targets.

hasBalanceDueboolean

Limit to those who owe money. Applies to tenant and lease targets.

hasActiveLeaseboolean

Limit to tenants who currently have a lease. Applies to tenant targets.

default: true
hasLeaseWithoutPaymentMethodboolean

Limit to tenants with a lease that has no payment method saved. Applies to tenant targets.

hasNoPortalActivityboolean

Limit to tenants who have never used the tenant portal. Applies to tenant targets.

Response

200 · The recipients the filters match.

targetTypesenum<string>[]

Which kinds of recipient appear in this set.

leasetenantownervendor
portfolioTargetsobject[]

Recipients grouped portfolio, then property, then unit. Lease recipients and any tenant reached through a unit appear here.

tenantsobject[]

Tenant recipients that are not tied to a unit.

ownersobject[]

Owner recipients.

vendorsobject[]

Vendor recipients.

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

This is a read-only preview even though it is a POST — the filters are too large for a query string. No announcement is created and nobody is contacted.

Use it before sending to see how many people you are about to reach and who would be missed. A recipient with canDeliver set to false will be skipped by the send: blockReasons says why — no phone number or email address, a lease that has not started, or a company whose text-messaging registration is unfinished.