Sandbox

Update a sandbox document

Changed on

Partially updates a library entry's metadata. The file itself is set at create and cannot be replaced. PUT behaves identically.

patch/v1/sandbox/documents/{document_id}/

Request

  • Base URL
    https://prod.truv.com
  • URL
    https://prod.truv.com/v1/sandbox/documents/{document_id}/
  • Auth
    API key in header X-Access-Client-Id and API key in header X-Access-Secret

Request body

filenamestring

Name the entry is addressed by. A rename is refused while a document-upload scenario still matches on the old name.

status'successful' | 'invalid' | 'duplicate' | 'failed'

File-level processing outcome. A successful entry must declare at least one document.

validationsobject

Per-check validation results. Declaring a failure means saying which check failed.

last_errorstring

Message surfaced for a failed file.

Example request

{
  "filename": "acme-w2-2025.pdf",
  "documents": [
    {
      "document_type": "PAYSTUB",
      "identity": {
        "full_name": "John Doe",
        "first_name": "John",
        "last_name": "Doe",
        "ssn": "991-91-9991"
      },
      "company_name": "Acme Inc.",
      "start_page": 1,
      "end_page": 2
    }
  ],
  "status": "invalid",
  "validations": {
    "is_readable": false
  },
  "last_error": "The file could not be read."
}

Response

idstring

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

created_atstring date-time

Time when the entry was created.

updated_atstring date-time

Time when the entry was last updated.

Example response

{
  "id": "3f1c8a90b7d2416e9a5c0e4f2b8d6a17",
  "uploaded_file": {
    "file_id": "3f1c8a90b7d2416e9a5c0e4f2b8d6a17",
    "filename": "acme-w2-2025.pdf",
    "mime_type": "application/pdf",
    "size": 48219,
    "md5": "9f2b1c0d4e6a8b3f5c7d9e1a2b4c6d8e",
    "file": "https://s3.amazonaws.com/...",
    "status": "successful",
    "validations": {
      "is_viable_size": true,
      "is_supported_type": true,
      "is_accessible": true,
      "is_valid": true,
      "is_readable": true,
      "is_unique": true
    }
  },
  "documents": [
    {
      "document_type": "PAYSTUB",
      "identity": {
        "full_name": "John Doe",
        "first_name": "John",
        "last_name": "Doe",
        "ssn": "991-91-9991"
      },
      "company_name": "Acme Inc.",
      "start_page": 1,
      "end_page": 2
    }
  ],
  "created_at": "2026-09-17T10:11:02.104882Z",
  "updated_at": "2026-09-17T10:11:02.104901Z"
}

Changes