# 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](/provisioning/api-reference/roles.md) 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](/provisioning/api-reference/memberships.md)
* [Permissions](/provisioning/api-reference/permissions.md)
* [Roles](/provisioning/api-reference/roles.md)

{% 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 %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.commercelayer.io/provisioning/api-reference/versions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
