Track referral link click (PUBLIC)
Overview
Public attribution endpoint: records a click on a referral link identified by its referral code and increments that code's total_click counter. Called by the SPA/landing page before login. Returns the referring company's public identity so the sign-up flow can pre-attribute the lead.
Prerequisites
- No authentication — this endpoint is public.
Base URL
| Environment | URL |
|---|---|
| Production | https://production-api.shoutaboutus.com |
| Development | https://development-api.shoutaboutus.com |
Endpoint
POST /api/v1/referral/click
Authentication
-
No bearer token required.
-
Public — no auth. Lives in the pre-login reference group.
Rate limit
- 100 requests/min per IP.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
code | string | Required | Must be an existing referral code. The referral code that was clicked. |
ip | string | Optional | Client IP recorded against the click for attribution/dedup. |
{
"code": "AbCdEf1234",
"ip": "192.168.1.1"
}How it works
200—{ data: { status, message, company } };companyis{ id, name,bundle_id}of the referring company (ornull).422—codemissing or not found inreferral_codes.400—{ status: error }if the click row fails to persist ('Something went wrong! Please try again.').
Response
200 OK · 200
200{
"data": {
"status": "success",
"message": "Click added successfully",
"company": {
"id": 1,
"name": "Example Name",
"bundle_id": 1
}
}
}422 Validation error · 422
422{
"message": "The selected code is invalid.",
"errors": {
"code": [
"The selected code is invalid."
]
}
}Errors
| Status | Meaning |
|---|---|
400 | Returned { status: error } if the click row fails to persist |
422 | Validation error |
500 | Unexpected server error |
Example request
curl --request POST \
--url "https://production-api.shoutaboutus.com/api/v1/referral/click" \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{"code": "AbCdEf1234", "ip": "192.168.1.1"}'Updated 9 days ago
Did this page help you?
