On this page

Experiment Management API Mutex 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 mutex groups

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

Returns a list of mutex groups with their configuration details.

Query parameters

Response

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

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

Get mutex group details

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

Returns the configuration details of a single mutex group.

Path variables

Response

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

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

Edit a mutex group

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

Updates a mutex group's name, description, or archive state.

Path variables

Request body

Example request

json
{
  "name": "updated name",
  "description": "updated description"
}

Response

A successful request returns a 200 OK response.

Request

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

Edit mutex group slots

bash
PATCH https://experiment.amplitude.com/api/1/mutexes/{id}/slots/{slotIndex}

Updates the contents of a mutex group slot.

Path variables

Request body

Example request

json
{
  "experiments": [123, 456],
  "individuals": ["x@amplitude.com", "y@amplitude.com", "abcde-12345"]
}

Response

A successful request returns a 200 OK response.

Request

curl
curl --request PATCH \
    --url 'https://experiment.amplitude.com/api/1/mutexes/<id>/slots/<slotIndex>' \
    --header 'Content-Type: application/json' \
    --header 'Accept: application/json' \
    --header 'Authorization: Bearer <management-api-key>' \
    --data '{"experiments": [123, 456]}'

Create a mutex group

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

Creates a new mutex group.

Request body

slots

The slots field contains these objects.

Example request

json
{
  "projectId": "<projectId>",
  "name": "Example Mutex Group",
  "key": "example-mutex",
  "description": "An example mutex group",
  "evaluationMode": "remote",
  "slots": [
    {
      "percentage": 40,
      "experiments": [123],
      "holdouts": [456]
    },
    {
      "percentage": 60,
      "experiments": [789],
      "individuals": ["x@amplitude.com"]
    }
  ]
}

Response

A successful request returns a 200 OK response and a JSON object with the mutex group's id and url.

bash
curl --request POST \
    --url 'https://experiment.amplitude.com/api/1/mutexes' \
    --header 'Content-Type: application/json' \
    --header 'Accept: application/json' \
    --header 'Authorization: Bearer <management-api-key>' \
    --data '{"projectId":"<projectId>","slots":[{"percentage":40},{"percentage":60}]}'

Was this helpful?