Skip to content

Record a referral-link click​

POST
/referrals/clicks

Called by the FundlyHub web app when a visitor opens a referral link (/r/{code}); not for third-party clients. Returns where to redirect and the visitor id to set as a cookie. Records a click classified as human, bot or unknown, and stamps the code into utm_content. When the visitor is signed in, the code is also remembered on their profile for attribution.

An unknown code still answers 200 with resolved: false and a target_path of the home page.

Authentication is optional. Rate limited per caller: 120 requests/minute, on top of the global per-IP limiter. Past the limit the answer is 429 with Retry-After.

Authorizations​

BearerAuth

In the browser, authentication rides on the httpOnly session cookies set by /cognito/signin or the Google / Apple sign-in at /cognito/oauth/{provider}. For scripts and for Swagger UI testing, paste an API key (fh_live_…, created with POST /api-keys); a Cognito JWT is accepted too. Sign-in does not return a token in its body.

Type
HTTP (bearer)
or

Request Body​

application/json
JSON
{
"code": "string",
"user_agent": "string",
"request_method": "GET",
"referer": "string",
"visitor_id": "string",
"ip": "string",
"utm_source": "string",
"utm_medium": "string",
"utm_campaign": "string",
"utm_content": "string",
"entry_point": "redirect"
}

Responses​

Click processed

application/json
JSON
"string"

Playground​

Server
Authorization
Body

Samples​

Powered by VitePress OpenAPI

Built with VitePress