# Experiment Management API Version Endpoints

> For AI agents: a documentation index is available at [/docs/llms.txt](/docs/llms.txt). Append `.md` to any page URL for markdown, or send `Accept: text/markdown`.

> **Note:** EU data residency
>
> The examples on this page use the default base URL `https://experiment.amplitude.com`. If your project uses Amplitude's EU data center, use `https://experiment.eu.amplitude.com` instead. For more information, refer to [Regions](https://amplitude.com/docs/apis/experiment/experiment-management-api#regions).

## List versions

```bash
GET https://experiment.amplitude.com/api/1/versions
```

Fetch a list of versions for all experiments or flags that the management API key can access. The list spans multiple projects when the key scope includes them.

### Query parameters

| Name | Description |
| --- | --- |
| `start` | The ISO 8601 formatted start time of versions to return (inclusive). |
| `end` | The ISO 8601 formatted end time of versions to return (exclusive). |
| `limit` | The max number of deployments to return. Capped at 1000. |
| `cursor` | The offset to start the "page" of results from. |

### Response

A successful request returns a `200 OK` response. The response body contains a JSON list of versions and a cursor to the next page.

Versions are ordered by creation time, descending.

> **Example:** Example cURL
>
> ```bash
> curl --request GET \
>     --url 'https://experiment.amplitude.com/api/1/versions?limit=3&cursor=3000&start=2023-01-01T00:00:00Z&end=2024-12-31T23:59:59Z' \
>     --header 'Accept: application/json' \
>     --header 'Authorization: Bearer <management-api-key>'
> ```

> **Example:** Example response
>
> ```json
>     {
>         "nextCursor": 3003,
>         "versions": [
>             {
>                 "createdAt": "2023-07-29T03:32:49.594Z",
>                 "createdBy": <userId>,
>                 "version": 3,
>                 "flagConfig": {
>                     "id": <id>,
>                     "projectId": <projectId>,
>                     "deployments": [<deploymentId>],
>                     "key": "flag-key",
>                     "name": "flag-key",
>                     "description": "feature flag access",
>                     "enabled": true,
>                     "evaluationMode": "remote",
>                     "bucketingKey": "amplitude_id",
>                     "bucketingSalt": "mHdQDzeE",
>                     "bucketingUnit": "User",
>                     "variants": [
>                         {
>                             "key": "on"
>                         }
>                     ],
>                     "rolloutPercentage": 0,
>                     "rolloutWeights": {
>                         "on": 1
>                     },
>                     "targetSegments": [
>                         {
>                             "name": "Segment 1",
>                             "conditions": [
>                                 {
>                                     "prop": "country",
>                                     "op": "is",
>                                     "type": "property",
>                                     "values": [
>                                         "United States"
>                                     ]
>                                 }
>                             ],
>                             "percentage": 0,
>                             "bucketingKey": "amplitude_id",
>                             "rolloutWeights": {
>                                 "on": 1
>                             }
>                         }
>                     ]
>                 }
>             },
>             {
>                 "createdAt": "2023-07-29T03:32:39.494Z",
>                 "createdBy": <userId>,
>                 "version": 2,
>                 "flagConfig": {
>                     "id": <id>,
>                     "projectId": <projectId>,
>                     "deployments": [<deploymentId>],
>                     "key": "flag-key",
>                     "name": "flag-key",
>                     "description": "feature flag access",
>                     "enabled": false,
>                     "evaluationMode": "remote",
>                     "bucketingKey": "amplitude_id",
>                     "bucketingSalt": "mHdQDzeE",
>                     "bucketingUnit": "User",
>                     "variants": [
>                         {
>                             "key": "on"
>                         }
>                     ],
>                     "rolloutPercentage": 0,
>                     "rolloutWeights": {
>                         "on": 1
>                     },
>                     "targetSegments": [
>                         {
>                             "name": "Segment 1",
>                             "conditions": [
>                                 {
>                                     "prop": "country",
>                                     "op": "is",
>                                     "type": "property",
>                                     "values": [
>                                         "United States"
>                                     ]
>                                 }
>                             ],
>                             "percentage": 0,
>                             "bucketingKey": "amplitude_id",
>                             "rolloutWeights": {
>                                 "on": 1
>                             }
>                         }
>                     ]
>                 }
>             },
>             {
>                 "createdAt": "2023-07-29T03:30:45.703Z",
>                 "createdBy": <userId>,
>                 "version": 1,
>                 "flagConfig": {
>                     "id": <id>,
>                     "projectId": <projectId>,
>                     "deployments": [],
>                     "key": "flag-key",
>                     "name": "flag-key",
>                     "description": "",
>                     "enabled": false,
>                     "evaluationMode": "remote",
>                     "bucketingKey": "amplitude_id",
>                     "bucketingSalt": "mHdQDzeE",
>                     "bucketingUnit": "User",
>                     "variants": [
>                         {
>                             "key": "on"
>                         }
>                     ],
>                     "rolloutPercentage": 0,
>                     "rolloutWeights": {
>                         "on": 1
>                     },
>                     "targetSegments": []
>                 }
>             }
>         ]
>     }
> ```
