v1

latestOpenAPI 3.1.02026-07-173384141.4 KB
files_v2

get/documents/v2/files/{file_id}/metadata

Path parameters

file_idstring required

The public ID of the file to retrieve metadata for the file. Only files created with the V2 API will be returned.

Response

Information about the uploaded file

file_idstring required

The ID of the file

This ID is used to reference the file in parse, datasets, and other operations.

file_namestring nullable

The name of the file.

This is taken from the multipart form data or the file metadata.

It is not guaranteed to be unique, and it may not match the original file name.

mime_type'application/pdf' | 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' | 'application/vnd.openxmlformats-officedocument.presentationml.presentation' | 'application/vnd.apple.keynote' | 'image/jpeg' | 'text/plain' | 'text/html' | 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' | 'application/vnd.ms-excel.sheet.macroEnabled.12' | 'application/vnd.ms-excel' | 'text/csv' | 'image/png' required
file_sizeinteger required

The file size in bytes.

This is determined from the Content-Length header of the request, or from the file metadata.

This is not guaranteed to be accurate, as the file may be compressed or encoded in a way that changes its size.

checksum_sha256string required

The SHA256 checksum of the file.

This is calculated from the file content and is used to verify the integrity of the file.

created_atstring required

The creation date and time of the file.

This is in RFC 3339 format.

labelsobject

Labels submitted at the time of file upload.

This is a map of label names to their values.

Example response

{
  "file_id": "file_12345",
  "file_name": "example.pdf",
  "file_size": 100000,
  "checksum_sha256": "d3242c5c1d369d233fa65183bdd4c486eba109ceb13490ed291384eaffbe743b",
  "created_at": "2023-10-01T12:00:00Z",
  "labels": {
    "priority": "high",
    "source": "email"
  }
}