---
title: "Polymarket Click Beacon"
method: POST
path: "/v1/affiliate/polymarket/click"
tags: ["polymarket-affiliate"]
---

# Polymarket Click Beacon

`POST /v1/affiliate/polymarket/click`

## Request

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

Fire-and-forget click beacon from the FE Polymarket bet-card.

Accepts ``{click_id?, embedder_slug?, event?}`` and persists a zero-
amount ``click`` :class:`EmbedderRevenueEvent` attributed to the
embedder (so the affiliate roll-up can build a click→deposit funnel
without a second table — same shape the embed click-broker uses).

Best-effort discipline (matches the rest of the affiliate surface):
  * Unknown / omitted embedder slug → fall back to the house embedder
    if one exists, else log-only (no DB row) and still 200. We never
    500 a beacon.
  * Replay within the same UTC day → IntegrityError on the
    ``dub_event_id`` UNIQUE constraint → rollback + NOOP, still 200.
  * Any other persist failure → rollback + log, still 200.

Intentionally NOT FF-gated: ``POLYMARKET_AFFILIATE_ENABLED`` only
controls whether :func:`polymarket_affiliate_link` mints an
attributed URL; if the operator temporarily flips it off we still
want to log the clicks the card is sending so we don't lose tracking
on a transient disable.

## Request body

- object

## Response `200`

Successful Response

- object

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/storyflo/apis/storyflo-inference-router.md) · [All operations](https://skmtc.dev/storyflo/apis/storyflo-inference-router/llms.txt) · [OpenAPI document](https://skmtc.dev/storyflo/apis/storyflo-inference-router/revisions/c3a1a735ac7a?raw)
