Skip to main content
POST
Upload a sandbox document

Authorizations

X-Access-Client-Id
string
header
required

Client ID

X-Access-Secret
string
header
required

Client Access Key

Body

application/json

A library upload carrying the bytes as base64 content. The same endpoint also accepts multipart/form-data with a file part and the same metadata, where documents is sent as a JSON-encoded string.

filename
string
required

Name the entry is addressed by. Unique per client, compared without regard to case, and refused when it is one of Truv's own documented sandbox filenames.

Maximum string length: 255
Example:

"acme-w2-2025.pdf"

content
string
required

The file bytes, base64-encoded.

Example:

"JVBERi0xLjQKJc..."

documents
object[]

Test metadata describing the documents in the file. Omitting it declares one paystub for John Doe at Acme Inc., so a document-upload flow resolves the file without the entry having to describe it. A payroll scenario only needs the file itself, so it can be left out.

Response

One file in your sandbox document library, plus the test metadata describing it.

id
string
read-only

Unique identifier of the library entry. This is the value a scenario payload references as document_id.

Maximum string length: 64
Example:

"3f1c8a90b7d2416e9a5c0e4f2b8d6a17"

uploaded_file
object

The file half of a library entry.

documents
object[]

Test metadata describing the documents in the file, used by document-upload scenarios.

created_at
string<date-time>
read-only

Time when the entry was created.

Example:

"2026-09-17T10:11:02.104882Z"

updated_at
string<date-time>
read-only

Time when the entry was last updated.

Example:

"2026-09-17T10:11:02.104901Z"