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
clientIdstringqueryClient ID for the Foundry world
limitnumberqueryOptional limit on the number of rolls to return (default is 20)
userIdstringquery, bodyFoundry user ID or username to scope permissions (omit for GM-level access)

Returns

array - An array of recent rolls with details

Try It Out


GET /lastroll

Get the last roll

Retrieves the most recent roll made in the Foundry world.

Parameters

NameTypeRequiredSourceDescription
clientIdstringqueryClient ID for the Foundry world
userIdstringquery, bodyFoundry user ID or username to scope permissions (omit for GM-level access)

Returns

object - The most recent roll with details

Try It Out


POST /roll

Make a roll

Executes a roll with the specified formula.

Parameters

NameTypeRequiredSourceDescription
formulastringbodyThe roll formula to evaluate (e.g., "1d20 + 5")
clientIdstringqueryClient ID for the Foundry world
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
userIdstringquery, bodyFoundry user ID or username to scope permissions (omit for GM-level access)

Returns

object - Result of the roll operation

Try It Out


GET /rolls/subscribe

Subscribe to real-time roll events via Server-Sent Events (SSE)

Opens a persistent SSE connection that streams roll events as they occur.

Parameters

NameTypeRequiredSourceDescription
clientIdstringqueryClient ID for the Foundry world
userIdstringqueryFoundry user ID or username to scope permissions (omit for GM-level access)

Returns

SSE stream - SSE event stream

Try It Out