Policy handbooks

List policy handbooks

Returns a page of the policy handbooks that steer how MagicDoor's AI answers chats for this company, together with their indexing state.

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

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.

default: 1example: 1
pageSizeinteger

How many items per page, between 1 and 100.

default: 50example: 50
levelenum<string>

Only return handbooks attached at this rung. Case-sensitive PascalCase.

GlobalPortfolioPropertyUnitLease
levelIdstring

Only return handbooks attached to this portfolio, property, unit or lease. A Snowflake id sent as a decimal string.

enabledboolean

Only return handbooks that are, or are not, applied to live chats.

Response

200 · One page of handbooks.

itemsobject[]

The handbooks on this page.

currentPageinteger

The page number that was returned.

totalPagesinteger

How many pages exist for this filter.

pageSizeinteger

How many items were requested per page.

totalCountinteger

How many items match the filter across all pages.

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

`level` and `indexStatus` are PascalCase

Most enums in this API come back camelCased. These two do not: they are turned into strings by hand, so you get Property and Indexed, not property and indexed. The level query filter is read the same way and is case-sensitive.

A handbook is attached at one rung of the hierarchy, and every handbook that applies to a conversation is used together. A lease chat therefore picks up the company's global handbook, the portfolio's, the property's, the unit's and the lease's own, all at once. A more specific handbook does not replace a broader one.

levelWhat levelId holds
GlobalNothing. Leave it out; the handbook applies company-wide.
PortfolioThe portfolio's id. Applies to every property in it.
PropertyThe property's id. Applies to every unit in it.
UnitThe unit's id. Applies to every lease on it.
LeaseThe lease's id. Applies to that lease only.