---
title: "Start bandit"
method: POST
path: "/api/v2/experiments/bandits/{bandit_id}/start"
tags: ["Experiments"]
---

# Start bandit

`POST /api/v2/experiments/bandits/{bandit_id}/start`

## Request

- Base URL: `https://api.datadoghq.com`
- URL: `https://api.datadoghq.com/api/v2/experiments/bandits/{bandit_id}/start`
- 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`

Start a draft bandit. Its targeting rule is published serving every arm equally, and each refresh then shifts traffic toward the arms that do best. The bandit starts exactly as it is configured; set it up with PATCH `/api/v2/experiments/bandits/{bandit_id}` first. It needs a flag, at least two arms, a subject type, a metric, and an exposure SQL model. The request is idempotent: a bandit that is already running still returns 204, so a retry after a timeout is safe. Stop is not idempotent. A start is blocked when the flag environment requires an approval or a pending change request touches the flag's targeting rules; retrying alone does not resolve an approval requirement. Bandits must be enabled for the organization.

## Path parameters

- `bandit_id` string, uuid, required: The UUID of the bandit.

## Response `204`

The bandit is running. Get the bandit to read its status and active policy.

## Other responses

- `400`: Malformed bandit ID (not a valid UUID).
- `401`: Missing or invalid authentication (dd-api-key + dd-application-key headers, or a valid user session).
- `403`: Bandits or bandit starts are not enabled for the organization, the caller lacks the product_analytics_experiments_write permission, or the caller lacks edit access to the bandit's flag or environment.
- `404`: No bandit with this ID exists for the organization.
- `409`: The bandit is paused or has ended, its setup is incomplete, or an approval or a pending change request blocks the start.
- `429`: Too many requests

## Changes

- **2026-11-20** `3b1c63e31740`: 4 warning
  - the optional response header `X-RateLimit-Limit` removed for the status `429`
  - the optional response header `X-RateLimit-Period` removed for the status `429`
  - the optional response header `X-RateLimit-Remaining` removed for the status `429`
  - the optional response header `X-RateLimit-Reset` removed for the status `429`
- **2026-11-19** `8623cd014a4f`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/datadog/apis/datadog-api-v2-collection/changes/api/v2/experiments/bandits/:bandit_id/start/post.md)

---

[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/4ba32926196d?raw)
