Modbot Docs
APIAPI referenceGiveaways

Preview giveaway rules

POST/api/giveaways/preview

How many people match a rule tree right now, and the first page of them. Figures counted from presence reports are close rather than exact; fromPolledData says when that is so, and closeCalls counts the people near a threshold. A rule reaching further back than the facts Modbot still keeps comes back in unanswerable instead of an answer.

Needs the RunGiveaways permission.

AuthorizationBearer <token>

An API key, made on Settings, API keys. Every key starts with mbk_.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/problem+json

application/problem+json

application/problem+json

curl -X POST "https://example.com/api/giveaways/preview" \  -H "Content-Type: application/json" \  -d '{    "rules": null,    "exclusions": null,    "weighting": null,    "weightCap": null,    "entryWay": null  }'
{  "total": 0,  "inDraw": 0,  "totalWeight": 0,  "closeCalls": 0,  "fromPolledData": true,  "unanswerable": null,  "stopped": true,  "people": [    {      "position": 0,      "key": "string",      "vrChatUserId": null,      "discordUserId": null,      "name": null,      "weight": 0,      "measured": 0.1,      "keptOut": "string",      "keptOutLabel": "string",      "because": null,      "fromPolledData": true,      "closeCall": true,      "winnerRank": null,      "purged": true    }  ]}

Modbot is not endorsed by or affiliated with VRChat Inc. or Discord Inc. VRChat is a trademark of VRChat Inc. Discord is a trademark of Discord Inc. SteamVR is a trademark of Valve Corporation. Windows is a trademark of Microsoft Corporation. Docker is a trademark of Docker, Inc. PostgreSQL is a trademark of the PostgreSQL Community Association of Canada. Railway is a trademark of Railway Corp. Other names are trademarks of their respective owners; see Legal. Modbot and its logo are trademarks of the Modbot project. Open source under AGPL-3.0.