On this page

Experiment Management API Holdout Group Endpoints

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.

List

bash
GET https://experiment.amplitude.com/api/1/holdouts

Fetch a list of holdout groups with their configuration details.

Query parameters

Response

A successful request returns a 200 OK response and a list of holdout groups encoded as JSON in the response body.

bash
curl --request GET \
--url 'https://experiment.amplitude.com/api/1/holdout?limit=1000' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <management-api-key>'

Get details

bash
GET https://experiment.amplitude.com/api/1/holdouts/<id>

Fetch the configuration details of a holdout group.

Path variables

Response

A successful request returns a 200 OK response and a JSON object with the holdout group's details.

bash
curl --request GET \
    --url 'https://experiment.amplitude.com/api/1/holdouts/<id>' \
    --header 'Accept: application/json' \
    --header 'Authorization: Bearer <management-api-key>'

Edit

bash
PATCH https://experiment.amplitude.com/api/1/holdouts/{id}

Edit a holdout group.

Path variables

Request body

Example request

json
{
  "name": "updated name",
  "description": "updated description",
  "experiments": [123],
  "individualInclusion": ["x@amplitude.com"]
}

Response

A successful request returns a 200 OK response.

Request

curl
curl --request PATCH \
    --url 'https://experiment.amplitude.com/api/1/holdouts/<id>' \
    --header 'Content-Type: application/json' \
    --header 'Accept: application/json' \
    --header 'Authorization: Bearer <management-api-key>' \
    --data '{"name": "updated name"}'

Create

bash
POST https://experiment.amplitude.com/api/1/holdouts

Create a new holdout group.

Request body

Example request

json
{
    "projectId": <projectId>,
    "name": "Example Holdout",
  	"key": "example-holdout",
    "holdoutPercentage": 5,
    "evaluationMode": "local",
    "bucketingKey": "device_id",
    "experiments": [21197],
    "individualInclusion": ["x@amplitude.com"],
    "individualExclusion": ["y@amplitude.com"],
}

Response

A successful request returns a 200 OK response and a JSON object with the holdout group's ID and URL.

bash
curl --request POST \
    --url 'https://experiment.amplitude.com/api/1/holdouts' \
    --header 'Content-Type: application/json' \
    --header 'Accept: application/json' \
    --header 'Authorization: Bearer <management-api-key>' \
    --data '{"projectId":"<projectId>","name":"Example Holdout","holdoutPercentage":5}'

Was this helpful?