This documentation URL will be retired soon. Start using the Ranla API at https://api.ranla.ai. Docs: docs.ranla.ai.

Conversions

Record that a conversion goal happened, and list conversions already attributed to a campaign.

A goal is what winning is — a purchase, a page visit, a survey response, a waitlist signup, or a qualified lead. You create the goal in the dashboard. This API records conversions against its key.

Base URL: https://api.supersendtx.com


Authentication

Authorization: Bearer stx_…

Goal types

Only a revenue goal stores money. The others are count-only: value_cents is always 0, even if you send an amount.

Type What winning is value_cents
revenue Money changed hands Stored
visit They reached a page Always 0
feedback They answered a survey Always 0
waitlist They asked to be let in Always 0
qualify They proved they are a prospect Always 0

Record

POST /conversions

Identify the person with at least one of click_id, contact_id, or email. click_id is the stx_cid value on campaign links — the strongest signal. Recording a conversion never creates a contact.

Omit goal to use the account's primary goal.

Idempotent on (goal, external_id): send the same external_id twice and the second call returns the first conversion with duplicate: true.

{
  "goal": "revenue",
  "email": "[email protected]",
  "value_cents": 4900,
  "currency": "usd",
  "external_id": "ch_123"
}

Count-only — no amount:

{
  "goal": "waitlist",
  "email": "[email protected]"
}
{
  "conversion": {
    "id": "conv_1",
    "goal_id": "goal_1",
    "contact_id": null,
    "email": "[email protected]",
    "value_cents": 0,
    "currency": "usd",
    "external_id": null,
    "source": "api",
    "occurred_at": "2026-09-05T12:00:00.000Z",
    "attributed_campaign_id": "camp_1",
    "attributed_variant_id": "var_A",
    "attributed_recipient_id": "rcp_1",
    "attribution_kind": "click",
    "created_at": "2026-09-05T12:00:00.000Z"
  },
  "duplicate": false
}

attribution_kind is how the conversion was tied to a campaign, strongest first: click, open, send, or none.


List

GET /conversions

Query: limit, cursor, optional goal, goal_id, campaign_id, email.

{
  "data": [],
  "has_more": false,
  "next_cursor": null
}

SDK

import { SuperSendTX } from 'supersendtx'

const client = new SuperSendTX(process.env.SUPERSENDTX_API_KEY!)

await client.conversions.create({
  goal: 'revenue',
  email: '[email protected]',
  value_cents: 4900,
  external_id: 'ch_123',
})

await client.conversions.create({
  goal: 'waitlist',
  email: '[email protected]',
})

const { data } = await client.conversions.list({ goal: 'waitlist' })

CLI

supersendtx conversions record --goal revenue --email [email protected] --value-cents 4900 --external-id ch_123
supersendtx conversions record --goal waitlist --email [email protected]
supersendtx conversions list --goal waitlist

OpenAPI

openapi/supersendtx.yaml