---
title: "Track a conversion attributed to a Pro link click"
method: POST
path: "/api/analytics/link-conversion"
tags: ["Conversion Attribution"]
---

# Track a conversion attributed to a Pro link click

`POST /api/analytics/link-conversion`

## Request

- Base URL: `https://workers.miniurl.com`
- URL: `https://workers.miniurl.com/api/analytics/link-conversion`
- Auth: one of:
  - HTTP bearer
  - none

Uses 30-day last-click attribution. Browser calls must provide the signed clickSignature received as mu_sig. Server calls may instead authenticate with the API key belonging to the clicked link's account. Safe retries use eventId or externalOrderId and return the original conversionId.

## Request body

- object
  - `clickId` string, required: Value captured from the mu_click redirect parameter.
  - `clickSignature` string: Value captured from mu_sig. Required unless the request uses the matching account API key.
  - `conversionType` string, required
  - `value` number: Non-negative amount. Send a refund as a positive value with conversionType=refund.
  - `currency` string: ISO 4217 currency code; required when value is provided.
  - `externalOrderId` string: Required for purchase, sale, and refund. Also acts as a deduplication key per conversion type.
  - `eventId` string: Stable idempotency key. Required when externalOrderId is absent.
  - `occurredAt` string, date-time: Defaults to receipt time. Must be after the click, no more than five minutes in the future, and inside the 30-day window.
  - `source` string
  - `metadata` unknown

## Response `200`

Duplicate retry accepted; returns the previously stored conversionId

## Other responses

- `201`: Conversion created
- `400`: Invalid input or malformed JSON
- `401`: Missing, invalid, expired, or wrong bearer token for this endpoint
- `403`: Requires a registered account or a higher plan
- `404`: Requested resource not found
- `409`: Conflict such as alias taken or email already registered
- `429`: Rate limit, token quota, or plan quota exceeded

---

[API](https://skmtc.dev/miniurl/apis/miniurl-agent-first-api.md) · [All operations](https://skmtc.dev/miniurl/apis/miniurl-agent-first-api/llms.txt) · [OpenAPI document](https://skmtc.dev/miniurl/apis/miniurl-agent-first-api/revisions/1d12196927db?raw)
