/v1/asset-objects/{uid}/completeMarks an object created with Create an upload as ready
after you have PUT its bytes to the presigned upload_url. Send no request body.
The file is checked in storage first. If it is not there yet, the call fails with 409
(the file has not been uploaded yet; upload it to upload_url before completing) and the
object stays pending_upload, so you can upload and complete again. The object's
size_bytes and ETag are then taken from storage, not from the size_bytes you sent when
creating the upload.
Completing an object that is already ready is safe and returns it unchanged. The storage
allowance is checked again here with the stored size. If completing the upload would take
your account past its free file storage, the call fails with 403 and the uploaded file
is removed from storage; the object stays pending_upload.
Requires the resource write permission (owner, admin or developer role).
Authentication
Send your API key as Authorization: Bearer <token>. The request is scoped to the workspace in X-Workspace-Slug.
Path parameters
uidstringRequiredThe object's uid (the object_id returned by Create an upload).
Headers
X-Workspace-SlugstringRequiredSlug of the workspace the request acts on. You can also pass it as the workspace_slug query parameter.
Response
The object is ready.
successbooleanRequiredtrue when the request succeeded.
messagestringRequiredHuman-readable status message.
dataobjectShow attributesHide attributes
uidstringRequiredUnique identifier of the object.
bucket_uidstringRequiredUID of the bucket the object belongs to.
keystringRequiredFull object key inside the S3 bucket.
filenamestringRequiredOriginal file name sent when the upload was created, or the last part of the key for objects written directly over S3.
content_typestringRequiredMIME type of the object.
size_bytesintegerRequiredSize of the object in bytes. Until the upload is completed this is the size_bytes sent when the upload was created; completing it replaces it with the size stored in the bucket.
statusstringRequiredpending_upload until the upload is completed, then ready.
One ofpending_uploadreadyfaileddeleted
public_urlstringRequiredPermanent URL of the object on the public assets host. Only readable without a signature in public buckets.
read_urlstringURL to read the object. A presigned URL in private buckets, otherwise the public URL.
read_url_expires_atstring (date-time)When read_url stops working. Only present when it is signed.
read_url_is_signedbooleanRequiredtrue when read_url is a presigned, expiring URL.
created_atstring (date-time)RequiredWhen the object record was created.
last_failurestringWhy the object failed, if it did. Omitted otherwise.
Errors
| Status | Meaning |
|---|---|
401 | The API key is missing, invalid, expired or revoked. |
403 | Your role cannot upload, you cannot access the workspace, or completing the upload would exceed your account's free file storage allowance. |
404 | The object (or its bucket) does not exist in this workspace. |
409 | The object is neither pending_upload nor ready (asset upload cannot be completed), or the file has not reached storage yet. |
Errors use the standard error format.