Tenants

List tenants

Returns a page of the company's tenants ordered by first name then last name, each with the leases they are currently on. The envelope also carries the properties, units and custom field definitions those tenants refer to, so you do not have to fetch them one by one.

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

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.

Query parameters

pageinteger

Which page to return. Starts at 1. Note the asymmetry: the parameter is page, but the response reports it back as currentPage.

default: 1example: 1
pageSizeinteger

How many records per page. Between 1 and 100.

default: 50example: 50
firstNamestring

Keep tenants whose given name contains this text, ignoring case.

lastNamestring

Keep tenants whose family name contains this text, ignoring case.

firstOrLastNamestring

Keep tenants whose given name or family name contains this text, ignoring case.

phonestring

Keep tenants with exactly this phone number. Must be a valid number.

emailstring · email

Keep tenants with exactly this email address.

portalStatusenum<string>

Keep tenants at this stage of portal sign-up. notInvited means never invited, invited means invited but never signed in, active means they have signed in at least once.

notInvitedinvitedactive
activeboolean

true keeps only active tenants, false only deactivated ones. Omit to get both.

hasLeaseboolean

true keeps only tenants on at least one lease, false only tenants on none.

hasFullNameboolean

true keeps only tenants with a family name recorded, false only those without.

searchstring

Free-text search across the tenant's indexed details.

Response

200 · A page of tenants, plus the records they refer to.

currentPageinteger

The page returned. Note the name: this envelope calls it currentPage, not page.

totalPagesinteger

How many pages the filter matches.

pageSizeinteger

How many records were asked for per page.

totalCountinteger

How many records the filter matches in total.

itemsTenant[]

The records on this page.

propertiesobject[]

Every property referenced by the leases on this page, listed once each.

unitsobject[]

Every unit referenced by the leases on this page, listed once each.

customFieldsobject[]

The custom field definitions behind the customFieldValues on this page.

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

A tenant is not a lease tenant

A tenant is a person: one record per human being, with their contact details, their identity documents and their portal sign-in. A lease tenant is that person's place on one particular lease, with its own move-in and move-out dates. The same tenant can be a lease tenant on several leases at once, and stays a tenant after every one of them ends. Endpoints under a lease manage lease tenants; the endpoints here manage the person.

Tenant records can hold a Social Security number, a date of birth and a driver's licence, and this endpoint returns them in full for every tenant on the page. Treat the whole response as personal data: do not log it, and do not cache it anywhere you would not store the identity documents themselves.