Skip to content

Count one landing on a referral link

POST
/api/partner/clicks/
curl --request POST \
--url http://localhost:8000/api/partner/clicks/ \
--header 'Content-Type: application/json' \
--data '{ "slug": "amb-kartiki" }'

Public: the app sends it once per page load that carries utm_source=amb-<slug>, before it strips the campaign params (#2517). It adds one to that ambassador’s count for the UTC day and keeps nothing about the visitor — no cookie, no IP, no id. 204 whether or not an ambassador carries the slug, so the endpoint reveals no codes; 400 when the body is not a slug; 429 past the per-IP rate. JSON or form-encoded (navigator.sendBeacon).

  • None

POST /api/partner/clicks/ — one landing on a referral link.

object
slug
required

The utm_source the link carried, amb-<name>.

string
>= 1 characters <= 64 characters /^amb-[a-z0-9]+(?:-[a-z0-9]+)*$/

Examples

ExampleALandingOnKartiki'sLink

A landing on Kartiki's link

{
"slug": "amb-kartiki"
}

No response body

Media typeapplication/json
object
detail
required

Human-readable message, or a stable machine code for the cases a client branches on. The standard envelope for 400 (validation — a field-keyed object may appear instead), 401 (missing / invalid credentials), 403 (authenticated but not permitted), and 404 (absent — cross-team records are collapsed to 404 so the API never leaks the existence of another team’s data).

string

Example generated

{
"detail": "example"
}
Media typeapplication/json
object
detail
required

429 — rate limit exceeded. Honour the Retry-After response header (seconds to wait) before retrying; it is sent on every 429.

string

Example generated

{
"detail": "example"
}