---
title: "Adopt a completed A/B test's winning framework"
method: POST
path: "/api/ab-tests/{id}/adopt"
tags: ["A/B tests"]
---

# Adopt a completed A/B test's winning framework

`POST /api/ab-tests/{id}/adopt`

## Request

- Base URL: `https://api.setluca.com`
- URL: `https://api.setluca.com/api/ab-tests/{id}/adopt`
- Auth: API key in cookie `luca.session_token`

Switches the coach onto the winning framework. It's a no-op that returns `adopted: false` unless the test is completed and its winner points at a real framework.

**Session-only.** This endpoint isn't on the API-key allowlist. An organization API key gets a 403 here, whatever scopes it holds.

## Path parameters

- `id` string, uuid, required

## Headers

- `Luca-API-Version` '1'

## Response `200`

ok

- AdoptAbTestResponse
  - `adopted` boolean, required
  - `frameworkId` string

## Other responses

- `401`: unauthorized
- `404`: not found
- `429`: rate limited
- `500`: internal error
- `503`: service unavailable

---

[API](https://skmtc.dev/setluca/apis/luca-api.md) · [All operations](https://skmtc.dev/setluca/apis/luca-api/llms.txt) · [OpenAPI document](https://skmtc.dev/setluca/apis/luca-api/revisions/90a200e4100b?raw)
