Tenants

Send portal invites in bulk

Schedules the tenant portal invite for every tenant in the company that has never been invited, optionally narrowed to some portfolios or properties. Tenants who are already invited, are not on a live lease, or have neither an email address nor a phone number are skipped.

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

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

messages is required and must hold at least one message — unlike the single-tenant endpoint, this one does not fall back to the company's saved templates.

scopeobject

Narrows which tenants are considered. Leave it out to consider the whole company. Sending both narrows to tenants matching either.

messagesobject[]required

The messages to schedule for each tenant. At least one.

Response

200 · The invites were scheduled.

batchIdstring

Groups every message scheduled by this call. A Snowflake id as a decimal string.

400 · No tenant met all the conditions, so nothing was scheduled. This is also what you get when the scope matches nobody.

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

A tenant is included only when all of the following hold:

  • they are active;
  • their portalStatus is notInvited;
  • they are on at least one lease that has not ended, and are not already moved out of it;
  • they have an email address, a phone number, or both;
  • they fall inside scope, when you sent one.

If nobody qualifies the call fails with 400 and schedules nothing. A tenant who has already been invited is never picked up here — resend to them one at a time with send a tenant portal invite.

This sends real messages

Every tenant that qualifies gets the messages you supply, by email and text. There is no preview and no dry run. Check the number you expect with get tenant counts first — its unInvitedTenants is the closest figure available, though it counts the whole company rather than your scope, and is cached for 15 minutes.