Skip to main content
POST
/
v1
/
trust-portal
/
documents
/
upload
Upload an additional trust portal document
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"
}

Authorizations

X-API-Key
string
header
required

API key for authentication

Headers

X-Organization-Id
string

Organization ID (required for session auth, optional for API key auth)

Body

application/json
organizationId
string
required

Organization ID that owns the document

Example:

"org_6914cd0e16e4c7dccbb54426"

fileName
string
required

Original file name

Example:

"security-overview.pdf"

fileData
string
required

Base64-encoded file contents (no data URL prefix)

fileType
string

MIME type (optional)

Example:

"application/pdf"

description
string

Optional description shown in the trust portal

Example:

"Overview of our security program"

Response

201 - application/json

Document uploaded successfully

id
string
required
Example:

"tdoc_abc123"

name
string
required
Example:

"security-overview.pdf"

createdAt
string
required
Example:

"2026-01-02T10:15:00.000Z"

updatedAt
string
required
Example:

"2026-01-02T10:15:00.000Z"

description
object
Example:

"Overview of our security program"