Skip to main content
POST
/
v1
/
files
/
{file_id}
/
complete
Complete a file
curl --request POST \
  --url https://api.sandbox.trycollate.ai/v1/files/{file_id}/complete \
  --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.

Call this endpoint after the bytes are uploaded to the URL returned by Create a file. Collate validates the uploaded object, records its size, and moves the file from pending_upload to ready. Files that fail validation move to failed and cannot be attached.

Returns

Returns the updated file.

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.