Skip to content

Management API Deployment Endpoints

Name
Description
List deployments List deployments that experiments or flags can be assigned to.
Create deployment Create a deployment.
Edit deployment Edit a deployment.

List deployments

GET https://experiment.amplitude.com/api/1/deployments

Fetch a list of deployments that experiments or flags can be assigned to.

Query parameters

Name Description
limit The max number of deployments to be returned. Capped at 1000.
cursor The offset to start the "page" of results from.

Response

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

Example cURL

curl --request GET \
  --url 'https://experiment.amplitude.com/api/1/deployments?limit=1000' \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer <management-api-key>'
Example response (click to open)
    {
        "deployments": [
            {
                "id": <id>,
                "projectId": <projectId>,
                "label": "deployment-1",
                "key": <key>,
                "deleted": true
            },
            {
                "id": <id>,
                "projectId": <projectId>,
                "label": "deployment-2",
                "key": <key>,
                "deleted": false
            }
        ]
    }

Create deployment

POST https://experiment.amplitude.com/api/1/deployments

Create a deployment that experiments or flags can be assigned to.

Query parameters

Name Description
projectId Required
label Required
type Required
Example request (click to open)
{
    "projectId":"<projectId>",
    "label": "hello-world",
    "type": "client"
}

Response

A successful request returns a 200 OK response and a deployment's id.

Example cURL

curl --request POST \
  --url 'https://experiment.amplitude.com/api/1/deployments' \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer <management-api-key>'
Example response (click to open)
    {
        "id": <id>
    }

Edit deployment

PATCH https://experiment.amplitude.com/api/1/deployments/<id>

Edit a deployment that experiments or flags can be assigned to.

Query parameters

Name Description
label Optional
archive Optional
Example request (click to open)
{
    "label": "updated-label"
}

Response

A successful request returns a 200 OK response and OK text.

Example cURL

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

Was this page helpful?