> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cocoondata.com/llms.txt
> Use this file to discover all available pages before exploring further.

# <access-service>/api/v1/objects/{itemId}/versions/{versionId}

## URL structure&#x20;

```text theme={null}
https://access-service.xy-company.com/api/v1/objects/{objectId}/versions/{versionId}
```

where `{objectId}` is the ID of a file object/Secure Object and `{versionId}` is the ID of one of its versions.

## Supported methods and overview&#x20;

* `PUT` - used to set the active version (specified by `versionId`) of a file object/[Secure Object](/3.3/api/working-with-files-and-folders-fundamentals.md#secure-object) (specified by `objectId`).
* `DELETE` - Used to permanently delete a version (specified by `versionId`) of a file object (specified by `objectId`).

> [!NOTE]
>
> Both of these methods take no other parameters.

## Detailed description&#x20;

This API endpoint serves a number of purposes:

* Sets the active version (specified by `versionId`) of a file object (specified by `objectId`).
* Deletes a version (specified by `versionId`) of a file object (specified by `objectId`). \

  **Note:** A successful request using this method also deletes this version's content (via the Covata Platform's Content Service) automatically.

## Supported roles and conditions&#x20;

This API endpoint supports requests utilizing Covata user accounts with the following [roles](/3.3/admin-org/administering-users-within-an-organisation.md#an-organisation-users-roles) (as described in the [Organization Administrator's Guide](/3.3/admin-org.md)) and conditions:

* [Originator](/3.3/admin-org/administering-users-within-an-organisation.md#originator-role) - when this user owns the file object whose ID is specified by `{itemId}` in the request's URL.
* **Originator**, [Collaborator](/3.3/admin-org/administering-users-within-an-organisation.md#collaborator-role) and [Ad hoc](/3.3/admin-org/administering-users-within-an-organisation.md#adhoc-role) - when this user is a collaborator with the **Rename** [permission](/3.3/api/access-service-api-v1-permissions-sets.md) on the file object whose ID is specified by `{itemId}` in the URL. (The **Rename** permission restricts access to collaborators who have been applied either the **Modify** or **Manage** *permission set* on this file object.)

The Covata Platform's resources available to a Covata user meeting the criteria above is determined by the access token submitted in the [header](/3.3/api/access-service-api-v1-objects-objectid-versions-versionid.md#access-service-api-v1-objects-objectid-versions-versionid-required-headers) of requests to this endpoint.

## Required headers&#x20;

The appropriate access token as the `Bearer` token:

* `Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJleHAiOjE0NjcwMTY2NjYsInVzZXJfbmFtZSI6ImFsZXgub...`

## Returns&#x20;

If the request succeeded, then an HTTP response status `200 OK` is returned.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.