---
title: "Record a conversion"
method: POST
path: "/v1/optimize/conversions"
tags: ["Optimize"]
---

# Record a conversion

`POST /v1/optimize/conversions`

## Request

- Base URL: `https://api.revdesk.com`
- URL: `https://api.revdesk.com/v1/optimize/conversions`
- Auth: HTTP bearer

Records a conversion for a test from your own systems (a closed order, a booked appointment, a signed contract) so the results reflect outcomes the tag cannot see. Send the tag's `visitor_id` so the conversion is credited to the arm that visitor saw; a conversion with neither `variant_id` nor a known `visitor_id` is stored but cannot count toward an arm. Repeat sends with the same `metadata.order_id` are ignored.

## Headers

- `Idempotency-Key` string

## Request body

- object
  - `test_id` string, required
  - `variant_id` string
  - `visitor_id` string
  - `value` number
  - `currency` string
  - `occurred_at` string, date-time
  - `metadata` object

## Response `201`

Success

- object
  - `data` object, required
    - `recorded` boolean, required
    - `test_id` string, required
    - `variant_id` string, nullable, required

## Other responses

- `400`: Validation error
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not found
- `409`: Conflict (incl. idempotency conflicts)
- `429`: Rate limited

---

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