---
title: "Polymarket Affiliate Link"
method: GET
path: "/v1/affiliate/polymarket/link"
tags: ["polymarket-affiliate"]
---

# Polymarket Affiliate Link

`GET /v1/affiliate/polymarket/link`

## 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/link`
- Auth: none declared

Resolve the Polymarket event link-out, attributed to storyflo when
the affiliate is configured + enabled.

FAILS OPEN: :func:`polymarket.build_event_url` returns the plain
``polymarket.com/event/<slug>`` when the affiliate is disabled or the
referral code is unset, and appends ``?<param>=<ref>`` only when both
are present. We therefore ALWAYS return 200 with a usable URL — the
editorial link must never break. The ``click_id`` is an opaque per-
render token for our own observability, not the affiliate conversion
key (Polymarket round-trips the ``?ref`` param).

## Query parameters

- `event` string, required: Polymarket event slug (the trailing segment of polymarket.com/event/<slug>). Comes from the per-story market_context.matched_market.url the FE already holds.
- `embedder` string, nullable: Embedder tenant slug. Reserved for downstream storyflo-internal sub-attribution (revenue split); Polymarket itself only ever sees storyflo's house referral code. Falls back to the house slug when omitted.

## 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)
