---
title: "Create an A/B test from a campaign step"
method: POST
path: "/campaigns/ab-tests"
---

# Create an A/B test from a campaign step

`POST /campaigns/ab-tests`

## Request

- Base URL: `https://sendinel.ai/api/v1`
- URL: `https://sendinel.ai/api/v1/campaigns/ab-tests`
- Auth: one of:
  - HTTP bearer
  - OAuth 2 (authorization code, authorization URL `https://sendinel.ai/oauth/authorize`, token URL `https://sendinel.ai/oauth/token`)

## Request body

- object
  - `step_id` string, uuid, required
  - `name` string, required
  - `metric` 'open_rate' | 'click_rate' | 'conversion'
  - `split_ratio` integer
  - `test_type` 'full' | 'subject_only'

## Response `200`

A/B test created

---

[API](https://skmtc.dev/sendinel/apis/sendinel-api.md) · [All operations](https://skmtc.dev/sendinel/apis/sendinel-api/llms.txt) · [OpenAPI document](https://skmtc.dev/sendinel/apis/sendinel-api/revisions/20b2c6d5616d?raw)
