Skip to Content

Confirm an uploaded file

You're viewing API version 2026-09, which is deprecated and stops working on October 1, 2027. To move your integration, see Upgrading to 2026-10.
POST
/api/v1/files/{id}/confirm

Confirm a previously-created file after its bytes have been uploaded to the presigned URL.

The server reads the persisted object back from storage (HeadObject), verifies the size and — when the backend records it — that the SHA-256 matches the checksum supplied at create time, then flips the file from PENDING to CONFIRMED.

When to call: right after the upload PUT returns 200. It is optional but recommended — a file is otherwise confirmed lazily the first time it is fetched via GET /api/v1/files/:id. Idempotent: confirming an already-confirmed file returns its recorded state.

Authorization

headerAuthorizationBearer <token>

Personal API key, e.g. Authorization: Bearer sajn_sk_.... Not scope-limited — acts as the issuing user.

Path Parameters

id*string

Header Parameters

authorization*string

Bearer token for API authentication

Idempotency-Key?string

Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header Idempotent-Replayed: true); the same key with a different request returns 400.

Lengthlength <= 255

Response Body

File confirmation result

application/json
  1. response

File confirmation result

id*string

The confirmed file id

status*"CONFIRMED"

File status after confirmation

Value in"CONFIRMED"
size*number

Size in bytes of the persisted object, read back from storage

checksumVerified*boolean

Whether the storage backend reported a SHA-256 that matched the checksum recorded at create time. False when the backend did not record one (confirmed on size alone).

Example Request
curl -X POST 'https://app.sajn.se/api/v1/files/string/confirm' \  -H 'authorization: string'
Example Response
{  "id": "string",  "status": "CONFIRMED",  "size": 0,  "checksumVerified": true}

Was this page helpful?