Dashboard
How it Works Documentation Quick Start PAPI — Pages & Assets MAPI — Dynamic Data Integrations SAPI — Sessions & Forms MCP Server OpenClaw Skill Tools Deploy Dashboard
Prediction Game

Prediction Game

⚡ Built-in — Platform Built-in

Add a prediction game to any website. Participants predict outcomes of events (matches, questions, categories) and compete on a leaderboard. Events live in MAPI entities — fully flexible per use case.

⚡ Built-in — No Setup Required This integration is built into the WebsitePublisher platform. All endpoints are available immediately — no API key needed.

Endpoints (13)

POST configure

Create or update a prediction game. Points the game at a MAPI entity that holds the events to predict. Configures prediction type and scoring rules.

Field Type Required Description
game_slug string ✓ Yes Unique slug for this game (e.g. "wk2026", "oscars2027").
name string ✓ Yes Display name of the game (e.g. "WK Poule 2026").
entity_name string ✓ Yes MAPI entity name (plural) holding the events (e.g. "matches", "questions").
prediction_type string ✓ Yes Type of prediction: exact_score, pick_one, pick_multiple, number, free_text, rank.
scoring_rules object ✓ Yes Scoring rules JSON. Structure depends on prediction_type.
description string No Optional game description.
event_id_field string No MAPI field used as unique event identifier. Default: "id".
deadline_field string No MAPI field containing per-event deadline (datetime). Omit for a global deadline.
deadline_global string No Global deadline datetime (ISO 8601). Used when no per-event deadline field.
prediction_schema object No Optional: define prediction input fields for the snippet form.
display_config object No Snippet rendering config: event_title_template, group_by_field, sort_by_field, sort_direction.
POST list_games

List all prediction games for this project.

No input parameters required.

POST remove_game

Remove a prediction game and all associated participants and entries.

Field Type Required Description
game_slug string ✓ Yes
POST add_participant

Add a participant to a prediction game by name and optional email.

Field Type Required Description
game_slug string ✓ Yes
display_name string ✓ Yes
email string No
is_admin boolean No Whether this participant can manage outcomes.
POST set_outcome

Set the actual outcome of an event after it has concluded.

Field Type Required Description
game_slug string ✓ Yes
event_ref string ✓ Yes MAPI record ID of the event.
outcome object ✓ Yes The actual outcome. Structure matches prediction_type.
POST calculate_scores

Calculate scores for all predictions of an event or the entire game. Updates points_earned on entries and rank on participants.

Field Type Required Description
game_slug string ✓ Yes
event_ref string No Calculate for a specific event only. Omit to recalculate entire game.
POST get_leaderboard

Get the current leaderboard for a prediction game.

Field Type Required Description
game_slug string ✓ Yes
limit integer No Max participants to return. Default: all.
POST get_snippet

Get an embeddable HTML+JS snippet for a prediction game. Paste directly into a PAPI page.

Field Type Required Description
game_slug string ✓ Yes
snippet_type string ✓ Yes Which snippet to generate: predict_form, leaderboard, my_predictions, event_list.
POST predict

Submit or update a prediction. Called from browser with SAPI Visitor Auth.

Field Type Required Description
game_slug string ✓ Yes
event_ref string ✓ Yes
prediction object ✓ Yes
POST delete-prediction

Delete an existing prediction. Only allowed before the MAPI deadline and before an outcome has been set. Called from browser with SAPI Visitor Auth.

Field Type Required Description
game_slug string ✓ Yes
event_ref string ✓ Yes
POST my-predictions

Get all predictions for the current visitor.

Field Type Required Description
game_slug string ✓ Yes
POST events

Get all events with deadline status. Reads from the configured MAPI entity.

Field Type Required Description
game_slug string ✓ Yes
POST public-leaderboard

Get the public leaderboard. No authentication required.

Field Type Required Description
game_slug string ✓ Yes
limit integer No

MCP Tool Names

When using this integration through an AI assistant (Claude, ChatGPT, Cursor, etc.), the endpoints are available as MCP tools:

EndpointMCP Tool Name
configure prediction_game_configure
list_games prediction_game_list_games
remove_game prediction_game_remove_game
add_participant prediction_game_add_participant
set_outcome prediction_game_set_outcome
calculate_scores prediction_game_calculate_scores
get_leaderboard prediction_game_get_leaderboard
get_snippet prediction_game_get_snippet
predict prediction_game_predict
delete-prediction prediction_game_delete_prediction
my-predictions prediction_game_my_predictions
events prediction_game_events
public-leaderboard prediction_game_public_leaderboard
← Back to all integrations