Documentation

Wheel embeds, URL params, result events, and API

Use this page from any embedded wheel to see the supported iframe contract. For credential creation, use the Developers service-client flow and request the service.wheel audience.

Iframe URLs

https://www.wheelofgiveaways.com/wheelofgiveaways?listName=summer-draw
https://www.wheelofgiveaways.com/customwheel?listName=creator-picks
https://www.wheelofgiveaways.com/crimsonwheel?wheel_type=member
https://www.wheelofgiveaways.com/pcgiveaway?chromeless=true&wheel_type=tier

Wheel pages are hosted at the root of www.wheelofgiveaways.com. Embedding domains should include parentOrigin with their exact origin.

URL Params

ParamUse
listNameStable wheel slug to load or create.
modeConsumer-defined mode such as giveaway, custom, or pcgiveaway-prize-tier.
host_parent_path / parentPathParent route used when the wheel builds share links.
parentOriginExact parent origin for cross-domain postMessage, for example https://partner.example.
brand_title / branding_title / titleTitle shown on the wheel.
brand_logo / brandingLogoSrc / logoLogo URL or data image used in the wheel.
brand_logo_placementbehind or center.
brand_colors / colorPaletteComma-separated hex palette, for example #B60100,#111111,#E7E7E7.
Theme colorsAPI settings: pageBackgroundColor, panelBackgroundColor, primaryTextColor, secondaryTextColor, borderColor, inputBackgroundColor, primaryButtonColor, and buttonTextColor.
theme_* / brand_* / branding_* / embed_*Preserved in share links for host-specific branding.
draw_slug / drawSlug / draw / slugDraw-room slug preserved in share links and result context.
wheel_type / wheelTypeDraw wheel category such as tier or member.
chromelessHides page chrome for embedded layouts when true.
transparent_background / transparent / background=transparentMakes the iframe document background transparent so only the wheel and controls render.
show_title, show_description, show_join_cta, show_spin, show_volumePC giveaway display controls.
show_code / show_code_animationShows the transparency code visualizer for spin and winner selection logic.
random_initial_rotationRandomizes initial wheel rotation when true.
visual_treatmentOptional renderer mode, currently odds-ring for PC tier odds.
weighted_text_positioning / weightedTextPositioningWhen true, slice labels move closer or farther from the center based on weight. Set false to keep all labels centered at the same distance.
text_size / textSize / label_text_size / labelTextSizeOverrides wheel slice label font size in pixels, clamped from 12 to 80.
entrant_text_size / entrantTextSize / prize_text_size / prizeTextSizeConcentric wheel label sizes for each ring, clamped from 12 to 80. Both default to 48. Parent sync messages can also set wheelFontSize for both rings, or textSizeOverride and innerTextSizeOverride separately.
spin_durationSpin duration in seconds, clamped by the wheel.
single_spinDisables another client-side spin after a result is selected.
data_sourceUse parent to wait for host-supplied data over postMessage for PC/member wheels.

Getting Results From The Iframe

Listen for TCM_WHEEL_SPIN_COMPLETE. Validate event.origin against the wheel origin before trusting the payload.

window.addEventListener("message", (event) => {
  if (event.origin !== "https://www.thecrimsonmarket.com") return;
  if (event.data?.type !== "TCM_WHEEL_SPIN_COMPLETE") return;

  const { result, context } = event.data;
  console.log(result.winner, context.listName, context.drawSlug);
});

The wheel posts height updates with IFRAME_HEIGHTand URL-sync requests with UPDATE_URL_BAR_ONLY. Cross-domain hosts must pass parentOrigin=https://their-origin.exampleso the wheel can target the parent safely.

Hosted pages can pass data_source=parent and send TCM_WHEEL_MEMBER_SEGMENTS_SYNC or TCM_WHEEL_PC_CONFIG_SYNC to keep the iframe on the same data snapshot as the parent page.

Public API

Create a service client in the Developers portal, request audience service.wheel, and grant the needed scopes: wheel:read, wheel:write, and wheel:spin.

curl -u "$CLIENT_ID:$CLIENT_SECRET" \
  -d grant_type=client_credentials \
  -d resource=service.wheel \
  -d scope="wheel:read wheel:write wheel:spin" \
  https://www.thecrimsonmarket.com/mana/oauth/token
EndpointScopeUse
POST /api/v1/wheelswheel:writeCreate or update a wheel with listName, entries, optional prizes, and settings.
GET /api/v1/wheels/{listName}wheel:readRead participants, custom entries, settings, and last draw result.
PUT /api/v1/wheels/{listName}wheel:writeReplace custom entries or update settings/branding.
POST /api/v1/wheels/{listName}wheel:writeAdd a giveaway participant with duplicate, fingerprint, VPN, and jail rules.
PUT /api/v1/wheels/{listName}/entrieswheel:writeReplace all custom entries.
POST /api/v1/wheels/{listName}/entrieswheel:writeAppend custom entries.
POST /api/v1/wheels/{listName}/spinwheel:spinSpin a custom or participant wheel and persist the result.

Complete settings contract

Send these fields inside settings or branding. Colors use six-digit hex values; unknown fields are ignored.

appearanceMode"dark" or "light"
colorPaletteUp to 12 wheel-slice hex colors
brandingLogoSrc / brandingLogoPlacementData-image logo and "behind" or "center" placement
wheelFontSize / labelPositionModeText size 12–80 and "equal" or "weighted" positioning
spinDurationSecondsSpin duration from 5 to 120 seconds
pageBackgroundColor / panelBackgroundColorPage and panel hex colors
primaryTextColor / secondaryTextColorHeading and supporting-text hex colors
borderColor / inputBackgroundColorBorder and field background hex colors
primaryButtonColor / buttonTextColorPrimary action background and text hex colors
innerRingColor / outerRimColorConcentric inner ring and outer rim hex colors
pointerColor / pointerStrokeColor / centerHubColorPointer surface, pointer outline, and center hub hex colors
importMode"overwrite" or "append"
panelOrder / hiddenPanelsOrdered panel-id array and audience-hidden panel-id array
requireLoginToJoinRequire authenticated entrants
disableDuplicateIP / disableDuplicateFingerprint / disableVPNDuplicate and network protection switches
creatorOnlySpin / singleSpinDrawSpin authorization and one-result controls
prizesEnabled / stageOrderEnable Entrants & Prizes in One Wheel and choose "entrant-first" or "prize-first"
curl -X PUT https://www.wheelofgiveaways.com/api/v1/wheels/demo/entries \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "entries": [
      { "name": "Alice", "weight": 1, "color": "#E11D48" },
      { "name": "Bob", "weight": 2, "color": "#2563EB" }
    ],
    "prizes": [
      { "name": "Grand Prize", "weight": 1, "color": "#22C55E" },
      { "name": "Runner-up Prize", "weight": 2, "color": "#F59E0B" }
    ],
    "settings": {
      "spinDurationSeconds": 30,
      "colorPalette": ["#B60100", "#111111", "#E7E7E7"],
      "pageBackgroundColor": "#F7F7F8",
      "panelBackgroundColor": "#FFFFFF",
      "primaryTextColor": "#111827",
      "secondaryTextColor": "#4B5563",
      "borderColor": "#CBD5E1",
      "inputBackgroundColor": "#FFFFFF",
      "primaryButtonColor": "#B60100",
      "buttonTextColor": "#FFFFFF",
      "wheelFontSize": 48,
      "outerRimColor": "#B60100",
      "pointerColor": "#111827",
      "pointerStrokeColor": "#B60100",
      "centerHubColor": "#202020",
      "prizesEnabled": true,
      "stageOrder": "entrant-first",
      "panelOrder": ["wheel", "entries", "branding", "currentEntries", "jail", "code"],
      "hiddenPanels": ["code"]
    }
  }'