Tenants

Update a tenant

Replaces a tenant's details. Every field you leave out is cleared, so send the whole record, not just what changed.

PUT
https://api.portal.magicdoor.com/company-app/tenants/{tenantId}

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

tenantIdstringrequired

The tenant. A Snowflake id, sent as a decimal string.

example: 1830472847398404096

Body

application/json

The tenant's details in full. firstName is required. Fields you omit are stored as empty, including the address and the emergency contacts.

firstNamestringrequired

Given name. 1 to 150 characters.

lastNamestring

Family name. 1 to 150 characters.

emailstring · email

Email address. Up to 250 characters, and must be unique within the company.

phonestring

Phone number. Must be a valid number and unique within the company.

languagestring

ISO 639-1 language code for messages to this tenant, for example en or es.

ssnstring

Social Security number. Validated as a federal id. Sending it stores a government identifier against the tenant.

driversLicenseobject

Driver's licence details.

dateOfBirthstring · date

Date of birth, as YYYY-MM-DD.

genderenum<string>

Recorded gender.

malefemaleotherpreferNotToSay
currentAddressobject

Where the tenant currently lives. Sending this replaces the whole address.

emergencyContactsobject[]

People to contact in an emergency. Sending this replaces the whole list.

iconsstring[]

Icon keys to pin to the tenant. Sending this replaces the whole list.

Response

200 · The tenant as it now stands.

idstring

The tenant. This is the person, not their place on any particular lease.

activeboolean

false once the tenant has been deactivated. A deactivated tenant cannot sign in and cannot be given a new password.

emailstring

Email address. Absent when none is on file.

firstNamestring

Given name.

lastNamestring

Family name. Absent when only a first name is on file.

phonestring

Phone number, formatted for reading. Absent when none is on file.

createdstring · date-time

When the tenant record was created.

updatedstring · date-time

When the tenant record was last changed.

lastSeenstring · date-time

When the tenant last used the tenant portal. Absent when they never have.

lastPortalInvitestring · date-time

When a portal invite was last sent. Absent when none ever was.

portalStatusenum<string>

Where the tenant is in getting onto the tenant portal: notInvited (never invited), invited (invited but never signed in), active (has signed in).

notInvitedinvitedactive
chatIdstring

The tenant's conversation with the company. Absent when no conversation exists.

languagestring

ISO 639-1 language code used for messages to this tenant.

ssnstring

The tenant's Social Security number, if one was recorded. Returned in full, so treat every response containing it as sensitive. No example is shown here on purpose.

driversLicenseobject

Driver's licence details, if recorded. Returned in full, so treat it as sensitive. No example is shown here on purpose.

dateOfBirthstring · date

The tenant's date of birth, if recorded. No example is shown here on purpose.

genderenum<string>

The tenant's recorded gender. Absent when not recorded.

malefemaleotherpreferNotToSay
currentAddressobject

Where the tenant currently lives, as recorded on the tenant record. This is not derived from their lease.

emergencyContactsobject[]

People to contact in an emergency.

iconsstring[]

Icon keys a property manager has pinned to the tenant. Always present, possibly empty.

imageIdstring

The tenant's photo. Absent when they have none.

primaryLeaseIdstring

Of the tenant's leases that have not ended, the one with the highest rent. Absent when they are on none.

currentLeasesobject[]

Every lease the tenant is on that has not ended.

propertiesobject[]

The properties behind currentLeases.

unitsobject[]

The units behind currentLeases.

409 · The email address or phone number already belongs to another tenant in the company. `errors` maps the offending field to its message. This particular response is built by hand rather than by the usual problem-details machinery, so unlike every other error on this page it carries no `type`, no `instance` and no `traceId`.

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

404 · No tenant 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.

This is a full replacement

Read the tenant first, change what you need, and send the whole object back. Posting only firstName wipes the email, phone, address, emergency contacts and identity documents.