# Experiment Management API

> 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`.

Use the Experiment management API to programmatically create and control flags and experiments.

## Endpoints

| API | Description |
| --- | --- |
| [Flag APIs](https://amplitude.com/docs/apis/experiment/experiment-management-api-flags) | Flag APIs to create, edit, and display flags, and their properties. |
| [Experiment APIs](https://amplitude.com/docs/apis/experiment/experiment-management-api-experiments) | Experiment APIs to create, edit, and display experiments, and their properties. |
| [Mutex APIs](https://amplitude.com/docs/apis/experiment/experiment-management-api-mutexs) | Mutex APIs to create, edit, and display mutex groups and their properties. |
| [Holdout APIs](https://amplitude.com/docs/apis/experiment/experiment-management-api-holdouts) | Holdout APIs to create, edit, and display holdout groups and their properties. |
| [Deployment APIs](https://amplitude.com/docs/apis/experiment/experiment-management-api-deployments) | Deployment APIs to create, edit, and display deployments that flags or experiments can be assigned to. |
| [Version APIs](https://amplitude.com/docs/apis/experiment/experiment-management-api-version-endpoints) | Version APIs to display a list of versions of flags or experiments that the management API key has access to. |

## Management API Key

To create and revoke management API keys, select **Management API** in the bottom left of the sidebar. For more information, refer to the [comprehensive guide to all Amplitude keys](https://amplitude.com/docs/apis/keys-and-tokens).

## Authorization

The management API uses the HTTP Authorization header for authentication.

The header must be: `Authorization: Bearer <management-api-key>`.

> **Warning:** Management API keys
>
> Management API keys are different from the deployment keys used to fetch flag variants. Create and manage management API keys through the Management API link in the Experiment sidebar.

## Rate limiting

API limits are per project and impose the following restrictions:

| Limit (requests) | Duration |
| --- | --- |
| 100 | 1 second |
| 100000 | Daily. The daily limit resets at the end of the day UTC time. |

## Regions

| Data residency | Base URL |
| --- | --- |
| Default | `https://experiment.amplitude.com` |
| EU | `https://experiment.eu.amplitude.com` |

## Conventions

### Status codes

The API uses meaningful status codes to communicate the result of requests.

| Code | Meaning |
| --- | --- |
| 200 | Success |
| 400 | Input is missing or invalid |
| 401 | Invalid or revoked API key |
| 403 | API key doesn't have access to the specified environment |
| 429 | Too many requests |

### Cursors

Endpoints that list resources such as `/experiments` return a limited number of items per request. To fetch the next page of items, pass the `nextCursor` value returned from the first request as the `cursor` parameter of the next request. Chain multiple requests together to fetch the complete set of items.
