Skip to main content
POST
CREATE Document via Upload

Authorizations

X-API-Key
string
header
required

Prophia API key — either an account key (grants admin level permissions) or a user key with the REST scope. Send it in the X-API-Key header, or equivalently as Authorization: Bearer <api-key>. JWTs are rejected on /rest endpoints with 401.

Path Parameters

accountId
string
required

Body

multipart/form-data

Multipart form fields for a document upload.

file
file
required

The file to upload. Any file type is accepted.

leaseId
string
required

Lease to attach the Document to. Must belong to the Account in the path and to a Building your api key can access. To upload a file to a Building or Property folder, simply provide the appropriate Building or Property id (UUID) in this field. Note: Does not accept Lease.customId.

filename
string

Name to store the Document under. Defaults to the uploaded file's own name. This is also what decides whether the file is processed: a name ending in .pdf runs Prophia's ingestion pipeline, anything else is stored and attached as-is with no pages or tags. Filenames must be unique for non-deleted documents residing in the same Lease.

title
string

Display title for the Document. Defaults to filename when omitted.

docCategory
enum<string>

Category to file the Document under. When omitted from this request and the document is processed (a .pdf filename), Prophia's AI will attempt to set the category automatically, with any discrepancies cleaned up during the subsequent onboarding process. Certain categories may be excluded from Reports (usually less critical, non-deal-related categories).

Available options:
Main Lease Agreement,
Extension - Amendment,
Expansion - Amendment,
Contraction - Amendment,
Move - Amendment,
Correction - Amendment,
New Rights - Amendment,
Other - Amendment,
Commencement Letter,
Work Letter,
Lease Abstract,
Stacking Plan,
Floorplan,
Site Plan,
Letter of Credit,
Letter of Intent,
Certificate of Insurance,
Notices,
Termination Notices,
Assignment and Assumption Agreement,
Telecom/Antenna Agreement,
Storage Agreement,
Other,
Sublease Agreement,
Consent to Sublease,
Parking Agreement,
Licensing Agreement,
Guaranty,
Estoppel,
Management Office Agreement,
Loan Agreement,
Letter Agreement,
JV Agreement,
Closing Document,
Purchase & Sale Agreement,
Management Agreement,
Brokerage Listing Agreement,
Real Estate Tax Bills,
Capital Projects,
Service Agreement,
Subordination, Non-Disturbance and Attornment Agreement,
Ground Lease,
Memorandum of Lease,
Rent Roll

Response

OK

Representation of a Lease Document. Each Document belongs to one Lease and cannot be duplicated within a single Lease.

id
string
read-only

Prophia internal Document ID (UUID).

filename
string

Name of the document from your file system. This can not be duplicated for multiple files in the same Lease.

title
string

Display title; defaults to the filename when not set.

numberOfPages
integer<int32>
read-only

1-based count of pages in the Document.

docCategory
enum<string>

Document classification. Certain Document categories may determine which Tags and in-app features the Document is included in. If left blank, Prophia's AI will inspect the Document and set it accordingly, with a human review to follow. The AI will not overwrite an existing category if one is already set.

Available options:
Main Lease Agreement,
Extension - Amendment,
Expansion - Amendment,
Contraction - Amendment,
Move - Amendment,
Correction - Amendment,
New Rights - Amendment,
Other - Amendment,
Commencement Letter,
Work Letter,
Lease Abstract,
Stacking Plan,
Floorplan,
Site Plan,
Letter of Credit,
Letter of Intent,
Certificate of Insurance,
Notices,
Termination Notices,
Assignment and Assumption Agreement,
Telecom/Antenna Agreement,
Storage Agreement,
Other,
Sublease Agreement,
Consent to Sublease,
Parking Agreement,
Licensing Agreement,
Guaranty,
Estoppel,
Management Office Agreement,
Loan Agreement,
Letter Agreement,
JV Agreement,
Closing Document,
Purchase & Sale Agreement,
Management Agreement,
Brokerage Listing Agreement,
Real Estate Tax Bills,
Capital Projects,
Service Agreement,
Subordination, Non-Disturbance and Attornment Agreement,
Ground Lease,
Memorandum of Lease,
Rent Roll
createdAt
string<date-time>
read-only

When the Document was uploaded to Prophia.

documentStatus
string
read-only

Processing state: processing while the document is in Prophia's AI ingestion pipeline, then incomplete followed by any account specific statuses (defined by/through our operations team) and ultimately complete when the Document has been fully processed. To understand how this plays into the broader onboarding state of the Lease and Building see our understanding onboarding conceptual guide.

splitStatus
enum<string>
read-only

Whether this Document was split into parts. single is an ordinary Document, combined is an original that was split (its data lives on its parts), and split is a part cut from an original.

Available options:
single,
combined,
split
originalDocId
string
read-only

For a part (splitStatus = split), the ID of the original Document it was cut from. Omitted otherwise.