Skip to main content
POST
Pins a public document to IPFS and returns the ipfs:// address to record with it. Use it for every market document you mark public, whether it goes into a market’s asset data at creation (Deploy Market, Attest Asset Data) or onto the document registry for the market itself (Record Document with loanId 0). Loan documents are always private, so they never pass through this endpoint.
A public file stays on IPFS for good. Nobody can withdraw it later, Trusset included. It must contain no personal data, such as the names of signatories or private addresses. A document that names a person is recorded as private instead: only its hash is recorded and the file never reaches Trusset. Every upload must confirm this with noPersonalData set to true.
Send the file as multipart/form-data with the SHA-256 you computed over the exact file bytes. The server computes the SHA-256 over the bytes it received and refuses the upload with CONTENT_HASH_MISMATCH before anything is pinned when the two differ. It accepts PDF only, judged by the file’s own bytes and not by its name or declared type: the file must start with the PDF signature, end with its end marker, and carry no active content. The check reads the file’s names with their escapes resolved and the content of its compressed streams, and refuses JavaScript, launch and remote go-to actions, embedded files, rich media, form submission and XFA forms. The pinned file is served from the IPFS gateway, never from a Trusset domain. A file this instance already pinned under the same SHA-256 is not pinned again: the answer carries the existing address with reused: true and HTTP 200, so a retry never creates a second record.

Who can call it

Any API key of the instance. The pin belongs to the instance: the record routes accept a public document only when its address is one this instance pinned under the same SHA-256. Uploads are limited to 10 per minute per instance, on top of the API’s general rate limit.

Form Fields

file
required
The PDF, at most 1,046,528 bytes (1022 KB). The storage provider caps a request at 1 MiB. A larger document is recorded as private.
string
required
The SHA-256 of the exact file bytes, as 64 hex characters, with or without 0x.
string
required
true: you confirm the file holds no personal data, such as the names of signatories or other natural persons, private addresses or personal identifiers. Any other value refuses the upload with PERSONAL_DATA_CONFIRMATION_REQUIRED and nothing is pinned.

Response Fields

object

Error Codes