Skip to main content

roll

GET /rolls​

Get recent rolls Retrieves a list of up to 20 recent rolls made in the Foundry world.

Parameters​

NameTypeRequiredSourceDescription
clientIdstring✓queryClient ID for the Foundry world
limitnumberqueryOptional limit on the number of rolls to return (default is 20)

Returns​

object - An array of recent rolls with details

Example Request​

GET /rolls


GET /lastroll​

Get the last roll Retrieves the most recent roll made in the Foundry world.

Parameters​

NameTypeRequiredSourceDescription
clientIdstring✓queryClient ID for the Foundry world

Returns​

object - The most recent roll with details

Example Request​

GET /lastroll


POST /roll​

Make a roll Executes a roll with the specified formula

Parameters​

NameTypeRequiredSourceDescription
clientIdstring✓queryClient ID for the Foundry world
formulastring✓bodyThe roll formula to evaluate (e.g., "1d20 + 5")
flavorstringbodyOptional flavor text for the roll
createChatMessagebooleanbodyWhether to create a chat message for the roll
speakerstringbodyThe speaker for the roll
whisperarraybodyUsers to whisper the roll result to

Returns​

object - Result of the roll operation

Example Request​

POST /roll
Content-Type: application/json

{
"formula": "example-value",
"flavor": "example-value",
"createChatMessage": true
}