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-drawhttps://www.wheelofgiveaways.com/customwheel?listName=creator-pickshttps://www.wheelofgiveaways.com/crimsonwheel?wheel_type=memberhttps://www.wheelofgiveaways.com/pcgiveaway?chromeless=true&wheel_type=tierWheel pages are hosted at the root of www.wheelofgiveaways.com. Embedding domains should include parentOrigin with their exact origin.
URL Params
| Param | Use |
|---|---|
| listName | Stable wheel slug to load or create. |
| mode | Consumer-defined mode such as giveaway, custom, or pcgiveaway-prize-tier. |
| host_parent_path / parentPath | Parent route used when the wheel builds share links. |
| parentOrigin | Exact parent origin for cross-domain postMessage, for example https://partner.example. |
| brand_title / branding_title / title | Title shown on the wheel. |
| brand_logo / brandingLogoSrc / logo | Logo URL or data image used in the wheel. |
| brand_logo_placement | behind or center. |
| brand_colors / colorPalette | Comma-separated hex palette, for example #B60100,#111111,#E7E7E7. |
| Theme colors | API 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 / slug | Draw-room slug preserved in share links and result context. |
| wheel_type / wheelType | Draw wheel category such as tier or member. |
| chromeless | Hides page chrome for embedded layouts when true. |
| transparent_background / transparent / background=transparent | Makes the iframe document background transparent so only the wheel and controls render. |
| show_title, show_description, show_join_cta, show_spin, show_volume | PC giveaway display controls. |
| show_code / show_code_animation | Shows the transparency code visualizer for spin and winner selection logic. |
| random_initial_rotation | Randomizes initial wheel rotation when true. |
| visual_treatment | Optional renderer mode, currently odds-ring for PC tier odds. |
| weighted_text_positioning / weightedTextPositioning | When 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 / labelTextSize | Overrides wheel slice label font size in pixels, clamped from 12 to 80. |
| spin_duration | Spin duration in seconds, clamped by the wheel. |
| single_spin | Disables another client-side spin after a result is selected. |
| data_source | Use 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| Endpoint | Scope | Use |
|---|---|---|
| POST /api/v1/wheels | wheel:write | Create or update a wheel with listName, entries, optional prizes, and settings. |
| GET /api/v1/wheels/{listName} | wheel:read | Read participants, custom entries, settings, and last draw result. |
| PUT /api/v1/wheels/{listName} | wheel:write | Replace custom entries or update settings/branding. |
| POST /api/v1/wheels/{listName} | wheel:write | Add a giveaway participant with duplicate, fingerprint, VPN, and jail rules. |
| PUT /api/v1/wheels/{listName}/entries | wheel:write | Replace all custom entries. |
| POST /api/v1/wheels/{listName}/entries | wheel:write | Append custom entries. |
| POST /api/v1/wheels/{listName}/spin | wheel:spin | Spin 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" |
| colorPalette | Up to 12 wheel-slice hex colors |
| brandingLogoSrc / brandingLogoPlacement | Data-image logo and "behind" or "center" placement |
| wheelFontSize / labelPositionMode | Text size 12–80 and "equal" or "weighted" positioning |
| spinDurationSeconds | Spin duration from 5 to 120 seconds |
| pageBackgroundColor / panelBackgroundColor | Page and panel hex colors |
| primaryTextColor / secondaryTextColor | Heading and supporting-text hex colors |
| borderColor / inputBackgroundColor | Border and field background hex colors |
| primaryButtonColor / buttonTextColor | Primary action background and text hex colors |
| innerRingColor / outerRimColor | Concentric inner ring and outer rim hex colors |
| pointerColor / pointerStrokeColor / centerHubColor | Pointer surface, pointer outline, and center hub hex colors |
| importMode | "overwrite" or "append" |
| panelOrder / hiddenPanels | Ordered panel-id array and audience-hidden panel-id array |
| requireLoginToJoin | Require authenticated entrants |
| disableDuplicateIP / disableDuplicateFingerprint / disableVPN | Duplicate and network protection switches |
| creatorOnlySpin / singleSpinDraw | Spin authorization and one-result controls |
| prizesEnabled / stageOrder | Enable 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"]
}
}'