---
title: "Send a copy variant to an A/B test"
method: POST
path: "/v1/ai/copy-variants/{index}/send-to-ab"
tags: ["AI"]
---

# Send a copy variant to an A/B test

`POST /v1/ai/copy-variants/{index}/send-to-ab`

## Request

- Base URL: `https://app.getshareglow.com`
- URL: `https://app.getshareglow.com/v1/ai/copy-variants/{index}/send-to-ab`
- Auth: HTTP bearer

Adds cached variant `index` to a link as a new A/B variant. No AI call.

## Path parameters

- `index` integer, required

## Request body

- object
  - `linkId` string, required

## Response `201`

Variant added

- object

## Other responses

- `202`: Queued for approval. The workspace requires approvals, so the variant is added only after an owner approves it. The approval is attributed to the workspace owner.
- `400`: Validation failed (`bad_request`, `invalid_url`, ...).
- `401`: Missing, unknown or revoked API key.
- `402`: A plan cap or feature gate blocked the call (`plan_limit_exceeded`; `details` names the resource and limit).
- `403`: The API key is valid but lacks the scope this endpoint needs (images, templates, scan, links, monitors or ai).
- `404`: The id does not exist in this workspace (`not_found`, `link_not_found`, `template_not_found`).
- `413`: The JSON body is over 1 MB (`payload_too_large`).
- `429`: Daily call limit reached. Retry after the `Retry-After` seconds.

---

[API](https://skmtc.dev/getshareglow/apis/shareglow-api.md) · [All operations](https://skmtc.dev/getshareglow/apis/shareglow-api/llms.txt) · [OpenAPI document](https://skmtc.dev/getshareglow/apis/shareglow-api/revisions/3ea838c40d3c?raw)
