[Yandex Cloud documentation](../../../../index.md) > [Yandex Object Storage](../../../index.md) > API reference > [AWS S3 REST](../../index.md) > [REST](../index.md) > Bucket > PutBucketVersioning

# Object Storage API, Amazon S3-compatible REST: PutBucketVersioning

Enables or suspends bucket versioning.

Versioning can take one of the two statuses:
- `Enabled`: Turns on version management for objects in the bucket. All new objects added to the bucket will get a unique version ID.
- `Suspended`: Suspends version management for objects in the bucket. All new objects added to the bucket will get `null` for the version ID.

{% note info %}

With [object version lock](../../../concepts/object-lock.md) on, versioning cannot be paused.

{% endnote %}

For more information on getting started with the API and the general request format, see [How to use the S3 API](../../index.md).

## Request {#request}

```http
PUT /{bucket}?versioning HTTP/2
```

### Path parameters {#path-parameters}

Parameter | Description
----- | -----
`bucket` | Bucket name.

### Query parameters {#request-params}

Parameter | Description
----- | -----
`versioning` | Required parameter that indicates the type of operation.

### Data schema {#request-scheme}

```xml
<?xml version="1.0" encoding="UTF-8"?>
<VersioningConfiguration>
   <Status>string</Status>
</VersioningConfiguration>
```

Element | Description
----- | -----
`Status` | Bucket versioning status.<br/><br/>Type: String.<br/>The possible values are: `Enabled \| Suspended`

### Headers {#request-headers}
Use only [common headers](../common-request-headers.md) in your requests.

## Response {#response}

### Headers {#response-headers}

Responses can only contain [common headers](../common-response-headers.md).

### Response codes {#response-codes}

For a list of possible responses, see [Responses](../response-codes.md).

A successful response does not contain any additional data.

#### Related articles {#related-articles}

* [Bucket in Object Storage](../../../concepts/bucket.md)

* [Managing bucket versioning](../../../operations/buckets/versioning.md)

#### Useful links {#see-also}

* [Getting started with the AWS S3 API in Yandex Object Storage](../../s3-api-quickstart.md)

* [Debugging requests using the AWS CLI](../../signing-requests.md#debugging)

* [Example of sending a signed request using curl](../../../api-ref/authentication.md#s3-api-example)

* [Code example for generating a signature](../../../concepts/pre-signed-urls.md#code-examples)