Skip to main content
GET
/
v1
/
files
/
{file_id}
Retrieve a file
curl --request GET \
  --url https://api.sandbox.trycollate.ai/v1/files/{file_id} \
  --header 'Authorization: Bearer <token>'
{
  "id": "<string>",
  "status": "pending_upload",
  "fileName": "<string>",
  "contentType": "application/pdf",
  "purpose": "authorization_attachment",
  "createdAt": "2023-11-07T05:31:56Z",
  "sizeBytes": 123,
  "completedAt": "2023-11-07T05:31:56Z",
  "downloadUrl": "<string>"
}

Documentation Index

Fetch the complete documentation index at: https://docs.trycollate.ai/llms.txt

Use this file to discover all available pages before exploring further.

Use this endpoint to check whether a file is pending_upload, ready, or failed. Ready files include a short-lived authenticated downloadUrl.

Returns

Returns the file. Returns 404 file_not_found if the file is unknown to the authenticated organization.

Authorizations

Authorization
string
header
default:your-api-key
required

API key passed as Authorization: Bearer <API_KEY>.

Path Parameters

file_id
string
required

File ID returned by POST /v1/files.

Response

Successful Response

id
string
required

Stable file ID.

status
enum<string>
required

Current upload and validation status.

Available options:
pending_upload,
uploaded,
ready,
failed
fileName
string
required

Original file name supplied at create time.

contentType
enum<string>
required

Validated MIME type for the file.

Available options:
application/pdf,
image/jpeg,
image/png
purpose
enum<string>
required

Public purpose for the uploaded file.

Available options:
authorization_attachment
createdAt
string<date-time>
required

Time when the file resource was created.

sizeBytes
integer | null

Stored file size after upload completion.

completedAt
string<date-time> | null

Time when the uploaded file was marked ready.

downloadUrl
string | null

Authenticated download URL when the file is ready.