Skip to main content
POST
/
v1
/
buckets
/
{bucket_identifier}
/
uploads
/
{upload_id}
/
confirm
Confirm Upload
curl --request POST \
  --url https://api.mixpeek.com/v1/buckets/{bucket_identifier}/uploads/{upload_id}/confirm \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'X-Namespace: <x-namespace>' \
  --data '{
  "description": "Confirm with ETag for integrity verification (recommended)",
  "etag": "d41d8cd98f00b204e9800998ecf8427e",
  "file_size_bytes": 52428800
}'
{
  "completed_at": "2024-01-15T10:35:00Z",
  "description": "Synchronous confirmation with object creation",
  "etag": "d41d8cd98f00b204e9800998ecf8427e",
  "file_hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
  "file_size_bytes": 52428800,
  "object_id": "obj_xyz789",
  "status": "COMPLETED",
  "upload_id": "upl_abc123",
  "verified_at": "2024-01-15T10:35:00Z"
}

Authorizations

Authorization
string
header
required

Bearer token authentication using your API key. Format: 'Bearer your_api_key'. To get an API key, create an account at mixpeek.com/start and generate a key in your account settings.

Headers

Authorization
string
required

REQUIRED: Bearer token authentication using your API key. Format: 'Bearer sk_xxxxxxxxxxxxx'. You can create API keys in the Mixpeek dashboard under Organization Settings.

Examples:

"Bearer sk_live_abc123def456"

"Bearer sk_test_xyz789"

X-Namespace
string
required

REQUIRED: Namespace identifier for scoping this request. All resources (collections, buckets, taxonomies, etc.) are scoped to a namespace. You can provide either the namespace name or namespace ID. Format: ns_xxxxxxxxxxxxx (ID) or a custom name like 'my-namespace'

Examples:

"ns_abc123def456"

"production"

"my-namespace"

Path Parameters

bucket_identifier
string
required

The unique identifier of the bucket

upload_id
string
required

The unique identifier of the upload

Query Parameters

async
boolean
default:false

Process confirmation asynchronously (recommended for files >= 100MB)

Body

application/json

Request to confirm S3 upload completion and optionally create bucket object.

After uploading your file to S3 using the presigned URL, call this endpoint to verify the upload succeeded and optionally create a bucket object.

The system will:

  1. Verify the S3 object exists
  2. Validate ETag matches (if provided) - RECOMMENDED for integrity checking
  3. Validate file size matches (if provided)
  4. Create bucket object (if create_object_on_confirm was true)
  5. Update upload status to COMPLETED

Examples: - Confirm with ETag for integrity verification (recommended) - Confirm without ETag (less safe, but faster) - Async confirmation for large files

etag
string | null

S3 ETag returned from the upload. OPTIONAL but RECOMMENDED. After uploading to S3, the response includes an ETag header. Providing this ensures the file wasn't corrupted during upload. If provided and doesn't match S3's ETag, confirmation will fail with error. Format: Usually an MD5 hash, may be enclosed in quotes.

Examples:

"d41d8cd98f00b204e9800998ecf8427e"

"\"a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6\""

file_size_bytes
integer | null

Actual file size uploaded, in bytes. OPTIONAL but RECOMMENDED. If provided, will be validated against the actual S3 object size. Mismatch indicates upload corruption or network issues. If not provided, size validation is skipped.

Required range: x >= 1
Examples:

10485760

52428800

Response

Successful Response

Response from upload confirmation.

upload_id
string
required

Upload ID that was confirmed

status
enum<string>
required

Updated upload status (COMPLETED or PROCESSING)

Available options:
PENDING,
IN_PROGRESS,
PROCESSING,
COMPLETED,
FAILED,
CANCELED,
UNKNOWN,
SKIPPED,
DRAFT,
ACTIVE,
ARCHIVED,
SUSPENDED
etag
string | null

S3 ETag from uploaded object

file_size_bytes
integer | null

Actual file size from S3

file_hash
string | null

File content hash (from ETag)

verified_at
string<date-time> | null

When verification completed

completed_at
string<date-time> | null

When upload completed

object_id
string | null

Created bucket object ID (if create_object_on_confirm was true)

task_id
string | null

Task ID for async processing (if async=true)

message
string | null

Confirmation message