curl --request POST \
--url http://localhost:3333/v1/trust-portal/documents/upload \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"organizationId": "org_6914cd0e16e4c7dccbb54426",
"fileName": "security-overview.pdf",
"fileData": "<string>",
"fileType": "application/pdf",
"description": "Overview of our security program"
}
'{
"id": "tdoc_abc123",
"name": "security-overview.pdf",
"createdAt": "2026-01-02T10:15:00.000Z",
"updatedAt": "2026-01-02T10:15:00.000Z",
"description": "Overview of our security program"
}Stores a document in the organization assets bucket and registers it for the trust portal.
curl --request POST \
--url http://localhost:3333/v1/trust-portal/documents/upload \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"organizationId": "org_6914cd0e16e4c7dccbb54426",
"fileName": "security-overview.pdf",
"fileData": "<string>",
"fileType": "application/pdf",
"description": "Overview of our security program"
}
'{
"id": "tdoc_abc123",
"name": "security-overview.pdf",
"createdAt": "2026-01-02T10:15:00.000Z",
"updatedAt": "2026-01-02T10:15:00.000Z",
"description": "Overview of our security program"
}API key for authentication
Organization ID (required for session auth, optional for API key auth)
Organization ID that owns the document
"org_6914cd0e16e4c7dccbb54426"
Original file name
"security-overview.pdf"
Base64-encoded file contents (no data URL prefix)
MIME type (optional)
"application/pdf"
Optional description shown in the trust portal
"Overview of our security program"
Document uploaded successfully
Was this page helpful?