---
title: "Conclude experiment"
method: POST
path: "/api/v2/experiments/{experiment_id}/conclude"
tags: ["Experiments"]
---

# Conclude experiment

`POST /api/v2/experiments/{experiment_id}/conclude`

## Request

- Base URL: `https://api.datadoghq.com`
- URL: `https://api.datadoghq.com/api/v2/experiments/{experiment_id}/conclude`
- Auth: one of:
  - API key in header `DD-API-KEY` and API key in header `DD-APPLICATION-KEY`
  - OAuth 2
    - Authorization code: `/oauth2/v1/authorize`
    - Token URL: `/oauth2/v1/token` scopes: `product_analytics_experiments_write`
- TypeScript: <https://skmtc.dev/datadog/apis/datadog-api-v2-collection/docs/api/v2/experiments/:experiment_id/conclude/post.ts> (a function with typed inputs; its response is checked against the schema)

Conclude an experiment on a winning variant. The experiment moves to DECISION_MADE status, the outcome is recorded in its conclusion, and for a flag-backed experiment the winning variant is rolled out to 100% of the linked feature flag allocation. `decision_variant_key` must match a variant in the experiment. Only an experiment that is currently running or ready for a decision can be concluded. Concluding is not reversible and is not idempotent: concluding an already-concluded experiment returns 409.

## Path parameters

- `experiment_id` string, uuid, required: The UUID of the experiment.

## Request body

- ExperimentsConcludeExperimentV2Request: Request to conclude an experiment with a winning variant.
  - `data` ExperimentsConcludeExperimentV2RequestData, required: Experiment conclusion resource with the experiment identifier and decision.
    - `attributes` ExperimentsConcludeExperimentV2RequestDataAttributes, required: Decision to record when concluding the experiment.
      - `decision_variant_key` string, required: Key of the winning variant. Must match a variant on the experiment and must not be blank.
    - `id` string: Identifier of the experiment to conclude.
    - `type` 'conclude-experiment-request', required: Conclude experiment request resource type.

## Response `204`

The experiment was concluded and the winning variant was rolled out to its linked feature flag allocation.

## Other responses

- `400`: Malformed experiment ID, malformed request body, or a missing decision_variant_key.
- `401`: Missing or invalid authentication (dd-api-key + dd-application-key headers, or a valid user session).
- `403`: Authenticated caller lacks the product_analytics_experiments_write permission, lacks permission to edit this experiment, or lacks contribute permission on the feature flag owning its allocation.
- `404`: No experiment with this ID exists for the organization.
- `409`: The experiment is not running or ready for a decision, its linked feature flag environment requires an approval for the rollout this would perform, or that flag has a pending suggestion for its allocations.
- `429`: Too many requests

---

[API](https://skmtc.dev/datadog/apis/datadog-api-v2-collection.md) - [All operations](https://skmtc.dev/datadog/apis/datadog-api-v2-collection/llms.txt) - [OpenAPI document](https://skmtc.dev/datadog/apis/datadog-api-v2-collection/revisions/3f70db624329?raw)
