---
title: "Record Click"
method: POST
path: "/affiliate/click"
tags: ["affiliate"]
---

# Record Click

`POST /affiliate/click`

## Request

- Base URL: `https://api.framesail.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.framesail.com/affiliate/click`
- Auth: none declared

Count a visit that arrived through ?ref=CODE.

Unauthenticated by design — the visitor is a stranger, and the ping fires
on arrival, long before anyone signs in (same posture as /affiliate/apply;
the limiter keys anonymous callers by IP).

Counted server-side rather than read back out of PostHog because
ad-blockers eat posthog-js, and a number that decides who gets paid has to
survive an affiliate comparing it against their own platform stats.

Always 200 {"received": true}: an unknown or deactivated code is a no-op,
and saying so would turn this into a code oracle.

## Request body

- ClickRequest: One visit through an affiliate's ?ref= link, pinged from the browser. Unauthenticated — the visitor is a stranger, not a Framesail user. The code is untrusted: the backend resolves it against billing.affiliates and drops anything that isn't an active code, exactly like checkout does.
  - `code` string, required
  - `path` string

## Response `200`

Successful Response

- ClickResponse
  - `received` boolean

## Other responses

- `422`: Validation Error

---

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