/v1/asset-buckets/{uid}Queues deletion of the bucket and returns 202 Accepted with the operation_id of the
delete operation. The bucket moves to deleting straight away. Poll
Get an operation to follow it.
When the operation succeeds, every object in the bucket is deleted and all of the
bucket's access keys are revoked. This cannot be undone. If deletion fails, the bucket's
status becomes failed and last_failure explains why.
Send X-Idempotency to make retries safe. The key is checked before the bucket's state, so
repeating a delete with the same key returns the original operation with 200 OK and
is_replay: true instead of 409 or 404. Reusing it for a different action or bucket
returns 409 with action: idempotency_key_reused.
The returned bucket omits free_storage_bytes and max_image_size_bytes.
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 bucket's uid.
Headers
X-Workspace-SlugstringRequiredSlug of the workspace the request acts on. You can also pass it as the workspace_slug query parameter.
X-IdempotencystringOptional key that makes retries safe. Repeating a request with a key already used for
the same action returns the original operation with 200 OK and is_replay: true
instead of queuing it again. Reusing it for a different action or bucket returns 409
with action: idempotency_key_reused.
Response
The delete operation was queued.
successbooleanRequiredtrue when the request succeeded.
messagestringRequiredHuman-readable status message.
dataobjectShow attributesHide attributes
operation_idstringRequiredID of the queued operation. Pass it to Get an operation.
bucketobjectRequiredShow attributesHide attributes
uidstringRequiredUnique identifier of the bucket.
namestringRequiredDisplay name of the bucket.
slugstringRequiredURL-safe version of the name. Unique within the workspace.
statusstringRequiredLifecycle state. Uploads, access keys and CORS changes need ready.
One ofprovisioningreadyfaileddeletingdeleted
visibilitystringRequiredpublic objects are served from their public URL. private objects need a signed read URL.
One ofpublicprivate
public_base_urlstringRequiredBase URL recorded for the bucket on the public assets host. Use each object's public_url or read_url to fetch objects, rather than building URLs from this value.
s3_bucket_namestringRequiredName of the underlying S3 bucket. Use it as the bucket name with S3 clients.
key_prefixstringKey prefix under which uploads made through the API are stored. Omitted when it cannot be derived.
storage_used_bytesintegerTotal size of the bucket's ready objects, in bytes. Omitted when zero.
free_storage_bytesintegerYour account's free file storage allowance in bytes. Omitted on some responses (for example after updating allowed origins or deleting).
max_image_size_bytesintegerMaximum size of a single upload, in bytes. Despite the name it applies to every file type. Omitted on some responses.
created_atstring (date-time)RequiredWhen the bucket was created.
last_failurestringWhy the last create or delete failed. Omitted when there was no failure.
cors_originsarray of stringsRequiredBrowser origins allowed to make cross-origin requests. The console's own origin is always allowed and is not listed. Set with Set bucket allowed origins.
statusstringRequiredStatus of the operation. queued for a new request; the original operation's current status on a replay.
One ofqueuedrunningsucceededfailed
events_urlstringRequiredPath of the operation's progress event stream.
is_replaybooleanRequiredtrue when an X-Idempotency key was reused and the original operation is returned instead of a new one.
is_completedbooleantrue when a replayed operation has already finished. Omitted unless true.
Response
Replay. The X-Idempotency key was already used for this action, so the original
operation is returned and nothing is queued. status is the operation's current status.
bucket is the bucket's current state, or only uid, slug and status: deleted once
it is gone.
successbooleanRequiredtrue when the request succeeded.
messagestringRequiredHuman-readable status message.
dataobjectShow attributesHide attributes
operation_idstringRequiredID of the queued operation. Pass it to Get an operation.
bucketobjectRequiredShow attributesHide attributes
uidstringRequiredUnique identifier of the bucket.
namestringRequiredDisplay name of the bucket.
slugstringRequiredURL-safe version of the name. Unique within the workspace.
statusstringRequiredLifecycle state. Uploads, access keys and CORS changes need ready.
One ofprovisioningreadyfaileddeletingdeleted
visibilitystringRequiredpublic objects are served from their public URL. private objects need a signed read URL.
One ofpublicprivate
public_base_urlstringRequiredBase URL recorded for the bucket on the public assets host. Use each object's public_url or read_url to fetch objects, rather than building URLs from this value.
s3_bucket_namestringRequiredName of the underlying S3 bucket. Use it as the bucket name with S3 clients.
key_prefixstringKey prefix under which uploads made through the API are stored. Omitted when it cannot be derived.
storage_used_bytesintegerTotal size of the bucket's ready objects, in bytes. Omitted when zero.
free_storage_bytesintegerYour account's free file storage allowance in bytes. Omitted on some responses (for example after updating allowed origins or deleting).
max_image_size_bytesintegerMaximum size of a single upload, in bytes. Despite the name it applies to every file type. Omitted on some responses.
created_atstring (date-time)RequiredWhen the bucket was created.
last_failurestringWhy the last create or delete failed. Omitted when there was no failure.
cors_originsarray of stringsRequiredBrowser origins allowed to make cross-origin requests. The console's own origin is always allowed and is not listed. Set with Set bucket allowed origins.
statusstringRequiredStatus of the operation. queued for a new request; the original operation's current status on a replay.
One ofqueuedrunningsucceededfailed
events_urlstringRequiredPath of the operation's progress event stream.
is_replaybooleanRequiredtrue when an X-Idempotency key was reused and the original operation is returned instead of a new one.
is_completedbooleantrue when a replayed operation has already finished. Omitted unless true.
Errors
| Status | Meaning |
|---|---|
401 | The API key is missing, invalid, expired or revoked. |
403 | You cannot access the workspace, your role does not allow this action, or the account is suspended. |
404 | The bucket does not exist in this workspace or was already deleted. |
409 | The bucket is already being deleted, or the X-Idempotency key was already used for a different action or bucket (action: idempotency_key_reused). |
Errors use the standard error format.