Set Versioning

Enable, suspend, or disable versioning for a bucket.
EndpointMethodAdmin Required
/api/v1/buckets/:bucketName/versioningPUTNo

Updates the versioning status of a bucket you own.

Path Parameters

bucketName
string required
The name of the bucket.

Request Body

status
string required
New versioning status: Enabled, Suspended, or Disabled.

Example

{
    "status": "Enabled"
}

Response

Returns the updated versioning status:

{
    "status": "Enabled"
}

Versioning Behavior

StatusEffect
EnabledAll object uploads create new versions. Deletes create delete markers.
SuspendedNew uploads don't create versions. Existing versions are preserved.
DisabledVersioning is completely disabled. Overwrites replace objects.
Once versioning has been enabled on a bucket, it cannot be fully disabled—only suspended. Use Suspended to stop creating new versions while keeping existing ones.

Errors

StatusReason
400Invalid versioning status
404Bucket not found (or not owned by you)