Skip to main content
POST
/
v1
/
files
/
upload
/
{file_id}
/
complete
curl -X POST \
  'https://api.retab.com/v1/files/upload/file_a1b2c3d4e5f6/complete' \
  -H "Api-Key: $RETAB_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{}'
{
  "fileId": "file_a1b2c3d4e5f6",
  "filename": "invoice.pdf",
  "storageUrl": "https://storage.retab.com/file_a1b2c3d4e5f6"
}
Complete a direct-to-storage upload after the file bytes have been written to the signed uploadUrl. Retab verifies that the object exists, matches the expected size from the upload session, and belongs to the authenticated organization. The response includes the durable storageUrl to use in later document requests.
curl -X POST \
  'https://api.retab.com/v1/files/upload/file_a1b2c3d4e5f6/complete' \
  -H "Api-Key: $RETAB_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{}'
{
  "fileId": "file_a1b2c3d4e5f6",
  "filename": "invoice.pdf",
  "storageUrl": "https://storage.retab.com/file_a1b2c3d4e5f6"
}

Path Parameters

file_id
string
required
File ID returned by POST /v1/files/upload.

Request Parameters

sha256
string
Optional SHA-256 checksum. Required only if the upload session was created with sha256.

Response Fields

fileId
string
Unique identifier for the uploaded file, prefixed with file_.
filename
string
The filename of the uploaded document.
storageUrl
string
Durable Retab storage URL to use in later MIMEData requests.

Authorizations

Api-Key
string
header
required

Path Parameters

file_id
string
required

Query Parameters

access_token
string | null

Body

application/json
sha256
string | null

Optional SHA-256 checksum

Pattern: ^[a-fA-F0-9]{64}$

Response

Successful Response

fileId
string
required

Underlying file ID

filename
string
required

Filename

storageUrl
string
required

Opaque Retab storage URL