# Versions

Versions are associated with [some of the Provisioning API resources](#versionable-resources) and are created upon every update or cancellation of the related resource to help you track the history of each resource's data changes.

{% hint style="info" %}
[Roles](https://docs.commercelayer.io/provisioning/api-reference/roles) are tracked also across creation. This is the only exception. For all other versionable resources creation is not tracked by the versions API.
{% endhint %}

Each version object contains information about the event that generated it (one of `update` or `destroy` — for roles, also `create`), the type of resource that has been modified, the request involved, the application, worker, or user that triggered the change, and more. You can find the changes history inside the `changes` object which shows, for each modified attribute, the values before and after the change. Changes to non-fetchable attributes (i.e. that are not exposed to the user in the single resource object) are tracked anyway by the versions API but you won't be able to see the modified values.

{% hint style="warning" %}
For any resource, the related changes history is stored for 1 year.
{% endhint %}

## Versionable resources

At the moment, these are the resources that support versioning:

* [Memberships](https://docs.commercelayer.io/provisioning/api-reference/memberships)
* [Permissions](https://docs.commercelayer.io/provisioning/api-reference/permissions)
* [Roles](https://docs.commercelayer.io/provisioning/api-reference/roles)

{% hint style="info" %}
This is an **immutable API**, meaning that create, update, and delete operations are not allowed on this endpoint. You can only fetch a list of versions or a specific single one.
{% endhint %}
