Skip to main content

Dnd5e

GET /dnd5e/get-actor-details

Get detailed information for a specific D&D 5e actor

Retrieves comprehensive details about an actor including stats, inventory, spells, features, and other character information based on the requested details array.

Required scope: dnd5e

Parameters

NameTypeRequiredSourceDescription
actorUuidstringbody, queryUUID of the actor
detailsarraybody, queryArray of detail types to retrieve (e.g., ["resources", "items", "spells", "features"])
clientIdstringqueryClient ID for the Foundry world
userIdstringquery, bodyFoundry user ID or username to scope permissions (omit for GM-level access)

Returns

object - Actor details object containing requested information

Try It Out

Code Examples

const baseUrl = 'http://localhost:3010';
const path = '/dnd5e/get-actor-details';
const params = {
clientId: 'fvtt_099ad17ea199e7e3',
actorUuid: 'Actor.S6Nh5SfYPcyyUhRg',
details: '["resources","items","features","spells"]'
};
const queryString = new URLSearchParams(params).toString();
const url = `${baseUrl}${path}?${queryString}`;

const response = await fetch(url, {
method: 'GET',
headers: {
'x-api-key': 'your-api-key-here'
}
});
const data = await response.json();
console.log(data);

Response

Status: 200

{
"type": "get-actor-details-result",
"requestId": "get-actor-details_1778896443165",
"data": {
"uuid": "Actor.S6Nh5SfYPcyyUhRg",
"resources": {
"primary": { 5 keys },
"secondary": { 5 keys },
"tertiary": { 5 keys }
},
"spells": [
0: { 11 keys }
],
"items": [
0: { 11 keys },
1: { 11 keys },
2: { 11 keys },
3: { 11 keys },
4: { 11 keys },
5: { 11 keys },
6: { 11 keys },
7: { 11 keys },
8: { 11 keys },
9: { 11 keys },
10: { 11 keys },
11: { 11 keys },
12: { 11 keys },
13: { 11 keys },
14: { 11 keys },
15: { 11 keys },
16: { 11 keys }
],
"features": [
0: { 11 keys },
1: { 11 keys },
2: { 11 keys },
3: { 11 keys },
4: { 11 keys },
5: { 11 keys },
6: { 11 keys },
7: { 11 keys }
]
}
}

POST /dnd5e/modify-item-charges

Modify the charges for a specific item owned by an actor

Increases or decreases the charges/uses of an item in an actor's inventory. Useful for consumable items like potions, scrolls, or charged magic items.

Required scope: dnd5e

Parameters

NameTypeRequiredSourceDescription
actorUuidstringbody, queryUUID of the actor
amountnumberbody, queryThe amount to modify charges by (positive or negative)
clientIdstringqueryClient ID for the Foundry world
itemUuidstringbody, queryThe UUID of the specific item (optional if itemName provided)
itemNamestringbody, queryThe name of the item if UUID not provided (optional if itemUuid provided)
userIdstringquery, bodyFoundry user ID or username to scope permissions (omit for GM-level access)

Returns

object - Result of the charge modification operation

Try It Out

Code Examples

const baseUrl = 'http://localhost:3010';
const path = '/dnd5e/modify-item-charges';
const params = {
clientId: 'fvtt_099ad17ea199e7e3'
};
const queryString = new URLSearchParams(params).toString();
const url = `${baseUrl}${path}?${queryString}`;

const response = await fetch(url, {
method: 'POST',
headers: {
'x-api-key': 'your-api-key-here',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"actorUuid": "Actor.S6Nh5SfYPcyyUhRg",
"itemName": "Waterskin",
"amount": -1
})
});
const data = await response.json();
console.log(data);

Response

Status: 200

{
"type": "modify-item-charges-result",
"requestId": "modify-item-charges_1778896443319",
"data": {
"itemUuid": "Actor.S6Nh5SfYPcyyUhRg.Item.5skKSSB4ShHbKoc8",
"oldCharges": 4,
"newCharges": 3
}
}

POST /dnd5e/short-rest

Perform a short rest for an actor

Triggers the D&D 5e short rest workflow including hit dice recovery, class feature resets, and HP recovery.

Required scope: dnd5e

Parameters

NameTypeRequiredSourceDescription
clientIdstringqueryClient ID for the Foundry world
actorUuidstringbody, queryUUID of the actor (optional if selected is true)
selectedbooleanquery, bodyWhether to get the selected entity
autoHDbooleanbody, queryAutomatically spend hit dice during short rest
autoHDThresholdnumberbody, queryHP threshold below which to auto-spend hit dice (0-1 as fraction of max HP)
userIdstringquery, bodyFoundry user ID or username to scope permissions (omit for GM-level access)

Returns

object - Result of the short rest operation

Try It Out

Code Examples

const baseUrl = 'http://localhost:3010';
const path = '/dnd5e/short-rest';
const params = {
clientId: 'fvtt_099ad17ea199e7e3'
};
const queryString = new URLSearchParams(params).toString();
const url = `${baseUrl}${path}?${queryString}`;

const response = await fetch(url, {
method: 'POST',
headers: {
'x-api-key': 'your-api-key-here',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"actorUuid": "Actor.S6Nh5SfYPcyyUhRg"
})
});
const data = await response.json();
console.log(data);

Response

Status: 200

{
"type": "short-rest-result",
"requestId": "short-rest_1778896443822",
"data": {
"actorUuid": "Actor.S6Nh5SfYPcyyUhRg",
"result": {
"type": "short",
"deltas": { 2 keys },
"updateData": { 3 keys },
"updateItems": [],
"newDay": false,
"rolls": [],
"clone": { 13 keys },
"dhd": 0,
"dhp": 0,
"longRest": false
}
}
}

POST /dnd5e/long-rest

Perform a long rest for an actor

Triggers the D&D 5e long rest workflow including full HP recovery, spell slot restoration, hit dice recovery, and feature resets.

Required scope: dnd5e

Parameters

NameTypeRequiredSourceDescription
clientIdstringqueryClient ID for the Foundry world
actorUuidstringbody, queryUUID of the actor (optional if selected is true)
selectedbooleanquery, bodyWhether to get the selected entity
newDaybooleanbody, queryWhether the long rest marks a new day (default: true)
userIdstringquery, bodyFoundry user ID or username to scope permissions (omit for GM-level access)

Returns

object - Result of the long rest operation

Try It Out

Code Examples

const baseUrl = 'http://localhost:3010';
const path = '/dnd5e/long-rest';
const params = {
clientId: 'fvtt_099ad17ea199e7e3'
};
const queryString = new URLSearchParams(params).toString();
const url = `${baseUrl}${path}?${queryString}`;

const response = await fetch(url, {
method: 'POST',
headers: {
'x-api-key': 'your-api-key-here',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"actorUuid": "Actor.S6Nh5SfYPcyyUhRg",
"newDay": true
})
});
const data = await response.json();
console.log(data);

Response

Status: 200

{
"type": "long-rest-result",
"requestId": "long-rest_1778896443865",
"data": {
"actorUuid": "Actor.S6Nh5SfYPcyyUhRg",
"result": {
"type": "long",
"deltas": { 2 keys },
"updateData": { 3 keys },
"updateItems": [],
"newDay": true,
"rolls": [],
"clone": { 13 keys },
"dhp": 9,
"dhd": 0,
"longRest": true
}
}
}

POST /dnd5e/skill-check

Roll a skill check for an actor

Rolls a D&D 5e skill check with all applicable modifiers including proficiency, expertise, Jack of All Trades, and conditional bonuses.

Required scope: dnd5e

Parameters

NameTypeRequiredSourceDescription
actorUuidstringbody, queryUUID of the actor
skillstringbody, querySkill abbreviation (e.g., "acr", "ath", "ste", "prc")
clientIdstringqueryClient ID for the Foundry world
userIdstringquery, bodyFoundry user ID or username to scope permissions (omit for GM-level access)
advantagebooleanbody, queryRoll with advantage
disadvantagebooleanbody, queryRoll with disadvantage
bonusstringbody, queryExtra bonus formula to add (e.g., "1d4", "+2")
createChatMessagebooleanbody, queryWhether to post the roll to chat (default: true)

Returns

object - Result of the skill check roll

Try It Out

Code Examples

const baseUrl = 'http://localhost:3010';
const path = '/dnd5e/skill-check';
const params = {
clientId: 'fvtt_099ad17ea199e7e3'
};
const queryString = new URLSearchParams(params).toString();
const url = `${baseUrl}${path}?${queryString}`;

const response = await fetch(url, {
method: 'POST',
headers: {
'x-api-key': 'your-api-key-here',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"actorUuid": "Actor.S6Nh5SfYPcyyUhRg",
"skill": "prc"
})
});
const data = await response.json();
console.log(data);

Response

Status: 200

{
"type": "skill-check-result",
"requestId": "skill-check_1778896443517",
"data": {
"actorUuid": "Actor.S6Nh5SfYPcyyUhRg",
"skill": "prc",
"total": 10,
"formula": "1d20 + 2",
"result": "8 + 2"
}
}

POST /dnd5e/ability-save

Roll an ability saving throw for an actor

Rolls a D&D 5e ability saving throw with all applicable modifiers.

Required scope: dnd5e

Parameters

NameTypeRequiredSourceDescription
actorUuidstringbody, queryUUID of the actor
abilitystringbody, queryAbility abbreviation (e.g., "str", "dex", "con", "int", "wis", "cha")
clientIdstringqueryClient ID for the Foundry world
userIdstringquery, bodyFoundry user ID or username to scope permissions (omit for GM-level access)
advantagebooleanbody, queryRoll with advantage
disadvantagebooleanbody, queryRoll with disadvantage
bonusstringbody, queryExtra bonus formula to add (e.g., "1d4", "+2")
createChatMessagebooleanbody, queryWhether to post the roll to chat (default: true)

Returns

object - Result of the saving throw roll

Try It Out

Code Examples

const baseUrl = 'http://localhost:3010';
const path = '/dnd5e/ability-save';
const params = {
clientId: 'fvtt_099ad17ea199e7e3'
};
const queryString = new URLSearchParams(params).toString();
const url = `${baseUrl}${path}?${queryString}`;

const response = await fetch(url, {
method: 'POST',
headers: {
'x-api-key': 'your-api-key-here',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"actorUuid": "Actor.S6Nh5SfYPcyyUhRg",
"ability": "dex"
})
});
const data = await response.json();
console.log(data);

Response

Status: 200

{
"type": "ability-save-result",
"requestId": "ability-save_1778896443542",
"data": {
"actorUuid": "Actor.S6Nh5SfYPcyyUhRg",
"ability": "dex",
"total": 17,
"formula": "1d20 + 3 + 2 + 0",
"result": "12 + 3 + 2 + 0"
}
}

POST /dnd5e/ability-check

Roll an ability check for an actor

Rolls a D&D 5e ability check (raw ability test, not a skill check) with all applicable modifiers.

Required scope: dnd5e

Parameters

NameTypeRequiredSourceDescription
actorUuidstringbody, queryUUID of the actor
abilitystringbody, queryAbility abbreviation (e.g., "str", "dex", "con", "int", "wis", "cha")
clientIdstringqueryClient ID for the Foundry world
userIdstringquery, bodyFoundry user ID or username to scope permissions (omit for GM-level access)
advantagebooleanbody, queryRoll with advantage
disadvantagebooleanbody, queryRoll with disadvantage
bonusstringbody, queryExtra bonus formula to add (e.g., "1d4", "+2")
createChatMessagebooleanbody, queryWhether to post the roll to chat (default: true)

Returns

object - Result of the ability check roll

Try It Out

Code Examples

const baseUrl = 'http://localhost:3010';
const path = '/dnd5e/ability-check';
const params = {
clientId: 'fvtt_099ad17ea199e7e3'
};
const queryString = new URLSearchParams(params).toString();
const url = `${baseUrl}${path}?${queryString}`;

const response = await fetch(url, {
method: 'POST',
headers: {
'x-api-key': 'your-api-key-here',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"actorUuid": "Actor.S6Nh5SfYPcyyUhRg",
"ability": "str"
})
});
const data = await response.json();
console.log(data);

Response

Status: 200

{
"type": "ability-check-result",
"requestId": "ability-check_1778896443556",
"data": {
"actorUuid": "Actor.S6Nh5SfYPcyyUhRg",
"ability": "str",
"total": 16,
"formula": "1d20 - 1",
"result": "17 - 1"
}
}

POST /dnd5e/death-save

Roll a death saving throw for an actor

Rolls a D&D 5e death saving throw, handling DC 10 CON save, three successes/failures tracking, nat 20 healing, and nat 1 double failure.

Required scope: dnd5e

Parameters

NameTypeRequiredSourceDescription
actorUuidstringbody, queryUUID of the actor
clientIdstringqueryClient ID for the Foundry world
advantagebooleanbody, queryRoll with advantage
createChatMessagebooleanbody, queryWhether to post the roll to chat (default: true)
userIdstringquery, bodyFoundry user ID or username to scope permissions (omit for GM-level access)

Returns

object - Result of the death saving throw

Try It Out

Code Examples

const baseUrl = 'http://localhost:3010';
const path = '/dnd5e/death-save';
const params = {
clientId: 'fvtt_099ad17ea199e7e3'
};
const queryString = new URLSearchParams(params).toString();
const url = `${baseUrl}${path}?${queryString}`;

const response = await fetch(url, {
method: 'POST',
headers: {
'x-api-key': 'your-api-key-here',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"actorUuid": "Actor.S6Nh5SfYPcyyUhRg"
})
});
const data = await response.json();
console.log(data);

Response

Status: 200

{
"type": "death-save-result",
"requestId": "death-save_1778896443675",
"data": {
"actorUuid": "Actor.S6Nh5SfYPcyyUhRg",
"total": 17,
"formula": "1d20",
"result": "17",
"deathSaves": {
"success": 1,
"failure": 0
}
}
}

POST /dnd5e/modify-experience

Modify the experience points for a specific actor

Adds or removes experience points from an actor.

Required scope: dnd5e

Parameters

NameTypeRequiredSourceDescription
amountnumberbody, queryThe amount of experience to add (can be negative)
clientIdstringqueryClient ID for the Foundry world
actorUuidstringbody, queryUUID of the actor (optional if selected is true)
selectedbooleanquery, bodyWhether to get the selected entity
userIdstringquery, bodyFoundry user ID or username to scope permissions (omit for GM-level access)

Returns

object - Result of the experience modification operation

Try It Out

Code Examples

const baseUrl = 'http://localhost:3010';
const path = '/dnd5e/modify-experience';
const params = {
clientId: 'fvtt_099ad17ea199e7e3'
};
const queryString = new URLSearchParams(params).toString();
const url = `${baseUrl}${path}?${queryString}`;

const response = await fetch(url, {
method: 'POST',
headers: {
'x-api-key': 'your-api-key-here',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"actorUuid": "Actor.S6Nh5SfYPcyyUhRg",
"amount": 100
})
});
const data = await response.json();
console.log(data);

Response

Status: 200

{
"type": "modify-experience-result",
"requestId": "modify-experience_1778896443177",
"data": {
"actorUuid": "Actor.S6Nh5SfYPcyyUhRg",
"oldXp": 0,
"newXp": 100
}
}

GET /dnd5e/concentration

Check if an actor is concentrating on a spell

Returns whether the actor currently has a concentration effect active, and if so, what spell they are concentrating on.

Required scope: dnd5e

Parameters

NameTypeRequiredSourceDescription
clientIdstringqueryClient ID for the Foundry world
actorUuidstringbody, queryUUID of the actor (optional if selected is true)
actorNamestringbody, queryName of the actor (optional if actorUuid provided)
userIdstringquery, bodyFoundry user ID or username to scope permissions (omit for GM-level access)

Returns

object - Concentration status with effect details and spell name

Try It Out

Code Examples

const baseUrl = 'http://localhost:3010';
const path = '/dnd5e/concentration';
const params = {
clientId: 'fvtt_099ad17ea199e7e3',
actorUuid: 'Actor.S6Nh5SfYPcyyUhRg'
};
const queryString = new URLSearchParams(params).toString();
const url = `${baseUrl}${path}?${queryString}`;

const response = await fetch(url, {
method: 'GET',
headers: {
'x-api-key': 'your-api-key-here'
}
});
const data = await response.json();
console.log(data);

Response

Status: 200

{
"type": "get-concentration-result",
"requestId": "get-concentration_1778896444041",
"data": {
"actorUuid": "Actor.S6Nh5SfYPcyyUhRg",
"isConcentrating": false,
"effect": null,
"spell": null
}
}

POST /dnd5e/break-concentration

Break an actor's concentration

Removes the concentration effect from the actor, ending any spell that requires concentration.

Required scope: dnd5e

Parameters

NameTypeRequiredSourceDescription
clientIdstringqueryClient ID for the Foundry world
actorUuidstringbody, queryUUID of the actor (optional if selected is true)
actorNamestringbody, queryName of the actor (optional if actorUuid provided)
userIdstringquery, bodyFoundry user ID or username to scope permissions (omit for GM-level access)

Returns

object - Confirmation that concentration was broken

Try It Out

Code Examples

const baseUrl = 'http://localhost:3010';
const path = '/dnd5e/break-concentration';
const params = {
clientId: 'fvtt_099ad17ea199e7e3'
};
const queryString = new URLSearchParams(params).toString();
const url = `${baseUrl}${path}?${queryString}`;

const response = await fetch(url, {
method: 'POST',
headers: {
'x-api-key': 'your-api-key-here',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"actorUuid": "Actor.S6Nh5SfYPcyyUhRg"
})
});
const data = await response.json();
console.log(data);

Response

Status: 200

{
"type": "break-concentration-result",
"requestId": "break-concentration_1778896444128",
"data": {
"actorUuid": "Actor.S6Nh5SfYPcyyUhRg",
"broken": true,
"removedEffectId": "1foKckEDS4z9zlXn"
}
}

POST /dnd5e/concentration-save

Roll a concentration saving throw

Rolls a Constitution saving throw to maintain concentration after taking damage. The DC is calculated as max(10, floor(damage/2)). Returns the roll result and whether concentration was maintained or broken.

Required scope: dnd5e

Parameters

NameTypeRequiredSourceDescription
damagenumberbody, queryAmount of damage taken (used to calculate DC = max(10, floor(damage/2)))
clientIdstringqueryClient ID for the Foundry world
actorUuidstringbody, queryUUID of the actor (optional if selected is true)
actorNamestringbody, queryName of the actor (optional if actorUuid provided)
userIdstringquery, bodyFoundry user ID or username to scope permissions (omit for GM-level access)
advantagebooleanbody, queryRoll with advantage
disadvantagebooleanbody, queryRoll with disadvantage
bonusstringbody, queryExtra bonus formula to add (e.g., "1d4", "+2")
createChatMessagebooleanbody, queryWhether to post the roll to chat (default: true)

Returns

object - Roll result and concentration maintained status

Try It Out

Code Examples

const baseUrl = 'http://localhost:3010';
const path = '/dnd5e/concentration-save';
const params = {
clientId: 'fvtt_099ad17ea199e7e3'
};
const queryString = new URLSearchParams(params).toString();
const url = `${baseUrl}${path}?${queryString}`;

const response = await fetch(url, {
method: 'POST',
headers: {
'x-api-key': 'your-api-key-here',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"actorUuid": "Actor.S6Nh5SfYPcyyUhRg",
"damage": 15
})
});
const data = await response.json();
console.log(data);

Response

Status: 200

{
"type": "concentration-save-result",
"requestId": "concentration-save_1778896444119",
"data": {
"actorUuid": "Actor.S6Nh5SfYPcyyUhRg",
"dc": 10,
"total": 20,
"formula": "1d20 + 1",
"result": "19 + 1",
"maintained": true
}
}

POST /dnd5e/equip-item

Equip or unequip an item

Changes the equipped status of an item in an actor's inventory.

Required scope: dnd5e

Parameters

NameTypeRequiredSourceDescription
equippedbooleanbody, queryWhether the item should be equipped (true) or unequipped (false)
clientIdstringqueryClient ID for the Foundry world
actorUuidstringbody, queryUUID of the actor (optional if selected is true)
actorNamestringbody, queryName of the actor (optional if actorUuid provided)
itemUuidstringbody, queryUUID of the item (optional if itemName provided)
itemNamestringbody, queryName of the item (optional if itemUuid provided)
userIdstringquery, bodyFoundry user ID or username to scope permissions (omit for GM-level access)

Returns

object - Updated equipment status

Try It Out

Code Examples

const baseUrl = 'http://localhost:3010';
const path = '/dnd5e/equip-item';
const params = {
clientId: 'fvtt_099ad17ea199e7e3'
};
const queryString = new URLSearchParams(params).toString();
const url = `${baseUrl}${path}?${queryString}`;

const response = await fetch(url, {
method: 'POST',
headers: {
'x-api-key': 'your-api-key-here',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"actorUuid": "Actor.S6Nh5SfYPcyyUhRg",
"itemName": "Dart",
"equipped": true
})
});
const data = await response.json();
console.log(data);

Response

Status: 200

{
"type": "equip-item-result",
"requestId": "equip-item_1778896444200",
"data": {
"actorUuid": "Actor.S6Nh5SfYPcyyUhRg",
"itemUuid": "Actor.S6Nh5SfYPcyyUhRg.Item.WeKJI3gPUAU52WAX",
"itemName": "Dart",
"equipped": true
}
}

POST /dnd5e/attune-item

Attune or unattune an item

Changes the attunement status of a magic item in an actor's inventory.

Required scope: dnd5e

Parameters

NameTypeRequiredSourceDescription
attunedbooleanbody, queryWhether the item should be attuned (true) or unattuned (false)
clientIdstringqueryClient ID for the Foundry world
actorUuidstringbody, queryUUID of the actor (optional if selected is true)
actorNamestringbody, queryName of the actor (optional if actorUuid provided)
itemUuidstringbody, queryUUID of the item (optional if itemName provided)
itemNamestringbody, queryName of the item (optional if itemUuid provided)
userIdstringquery, bodyFoundry user ID or username to scope permissions (omit for GM-level access)

Returns

object - Updated attunement status

Try It Out

Code Examples

const baseUrl = 'http://localhost:3010';
const path = '/dnd5e/attune-item';
const params = {
clientId: 'fvtt_099ad17ea199e7e3'
};
const queryString = new URLSearchParams(params).toString();
const url = `${baseUrl}${path}?${queryString}`;

const response = await fetch(url, {
method: 'POST',
headers: {
'x-api-key': 'your-api-key-here',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"actorUuid": "Actor.S6Nh5SfYPcyyUhRg",
"itemName": "Dart",
"attuned": true
})
});
const data = await response.json();
console.log(data);

Response

Status: 200

{
"type": "attune-item-result",
"requestId": "attune-item_1778896444204",
"data": {
"actorUuid": "Actor.S6Nh5SfYPcyyUhRg",
"itemUuid": "Actor.S6Nh5SfYPcyyUhRg.Item.WeKJI3gPUAU52WAX",
"itemName": "Dart",
"attuned": true
}
}

POST /dnd5e/transfer-currency

Transfer currency between actors

Moves currency from one actor to another. Validates that the source actor has sufficient funds before transferring.

Required scope: dnd5e

Parameters

NameTypeRequiredSourceDescription
currencyobjectbody, queryCurrency amounts to transfer, e.g. pp, gp, ep, sp, cp denomination keys with numeric values
clientIdstringqueryClient ID for the Foundry world
sourceActorUuidstringbody, queryUUID of the source actor (optional if sourceActorName provided)
sourceActorNamestringbody, queryName of the source actor
targetActorUuidstringbody, queryUUID of the target actor (optional if targetActorName provided)
targetActorNamestringbody, queryName of the target actor
userIdstringquery, bodyFoundry user ID or username to scope permissions (omit for GM-level access)

Returns

object - Transfer result with updated balances

Try It Out

Code Examples

const baseUrl = 'http://localhost:3010';
const path = '/dnd5e/transfer-currency';
const params = {
clientId: 'fvtt_099ad17ea199e7e3'
};
const queryString = new URLSearchParams(params).toString();
const url = `${baseUrl}${path}?${queryString}`;

const response = await fetch(url, {
method: 'POST',
headers: {
'x-api-key': 'your-api-key-here',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"sourceActorUuid": "Actor.S6Nh5SfYPcyyUhRg",
"targetActorUuid": "Actor.7QAOIsAAOiZ97ocq",
"currency": {
"gp": 1
}
})
});
const data = await response.json();
console.log(data);

Response

Status: 200

{
"type": "transfer-currency-result",
"requestId": "transfer-currency_1778896444268",
"data": {
"sourceActorUuid": "Actor.S6Nh5SfYPcyyUhRg",
"targetActorUuid": "Actor.7QAOIsAAOiZ97ocq",
"transferred": {
"gp": 1
},
"sourceBalance": {
"pp": 0,
"gp": 14,
"ep": 0,
"sp": 0,
"cp": 0
},
"targetBalance": {
"pp": 0,
"gp": 16,
"ep": 0,
"sp": 0,
"cp": 0
}
}
}

POST /dnd5e/modify-currency

Modify currency balance for a single actor (delta-based, not a transfer between actors)

Adds or removes currency from an actor's wallet. Use a negative amount to remove currency.

Required scope: dnd5e

Parameters

NameTypeRequiredSourceDescription
actorUuidstringbody, queryUUID of the actor
currencystringbody, queryCurrency denomination to modify (pp, gp, ep, sp, cp)
amountnumberbody, queryAmount to add (positive) or remove (negative)
clientIdstringqueryClient ID for the Foundry world
userIdstringquery, bodyFoundry user ID or username to scope permissions (omit for GM-level access)

Returns

object - Result of the currency modification

Try It Out


POST /dnd5e/prepare-spell

Prepare or unprepare a spell for an actor

Toggles a spell's prepared state. Only applicable to spellcaster classes that prepare spells.

Required scope: dnd5e

Parameters

NameTypeRequiredSourceDescription
actorUuidstringbody, queryUUID of the actor
spellNamestringbody, queryName of the spell to prepare or unprepare
preparedbooleanbody, queryTrue to prepare the spell, false to unprepare it
clientIdstringqueryClient ID for the Foundry world
userIdstringquery, bodyFoundry user ID or username to scope permissions (omit for GM-level access)

Returns

object - Result of the prepare spell operation

Try It Out


POST /dnd5e/use-ability

Use an ability

Activates a specific ability for an actor, optionally targeting another entity

Required scope: dnd5e

Parameters

NameTypeRequiredSourceDescription
actorUuidstringbody, queryUUID of the actor
clientIdstringqueryClient ID for the Foundry world
abilityUuidstringbody, queryThe UUID of the specific ability (optional if abilityName provided)
abilityNamestringbody, queryThe name of the ability if UUID not provided (optional if abilityUuid provided)
targetUuidstringbody, queryThe UUID of the target for the ability (optional)
targetNamestringbody, queryThe name of the target if UUID not provided (optional)
userIdstringquery, bodyFoundry user ID or username to scope permissions (omit for GM-level access)

Returns

object - Result of the use ability operation

Try It Out

Code Examples

const baseUrl = 'http://localhost:3010';
const path = '/dnd5e/use-ability';
const params = {
clientId: 'fvtt_099ad17ea199e7e3'
};
const queryString = new URLSearchParams(params).toString();
const url = `${baseUrl}${path}?${queryString}`;

const response = await fetch(url, {
method: 'POST',
headers: {
'x-api-key': 'your-api-key-here',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"actorUuid": "Actor.S6Nh5SfYPcyyUhRg",
"abilityName": "Hammer"
})
});
const data = await response.json();
console.log(data);

Response

Status: 200

{
"type": "use-ability-result",
"requestId": "use-ability_1778896443507",
"data": {
"uuid": "Actor.S6Nh5SfYPcyyUhRg",
"ability": "Hammer",
"result": "wIXLzIuZ7USvAU2c"
}
}

POST /dnd5e/use-feature

Use a feature

Activates a specific feature for an actor, optionally targeting another entity

Required scope: dnd5e

Parameters

NameTypeRequiredSourceDescription
actorUuidstringbody, queryUUID of the actor
clientIdstringqueryClient ID for the Foundry world
abilityUuidstringbody, queryThe UUID of the specific ability (optional if abilityName provided)
abilityNamestringbody, queryThe name of the ability if UUID not provided (optional if abilityUuid provided)
targetUuidstringbody, queryThe UUID of the target for the ability (optional)
targetNamestringbody, queryThe name of the target if UUID not provided (optional)
userIdstringquery, bodyFoundry user ID or username to scope permissions (omit for GM-level access)

Returns

object - Result of the use feature operation

Try It Out

Code Examples

const baseUrl = 'http://localhost:3010';
const path = '/dnd5e/use-feature';
const params = {
clientId: 'fvtt_099ad17ea199e7e3'
};
const queryString = new URLSearchParams(params).toString();
const url = `${baseUrl}${path}?${queryString}`;

const response = await fetch(url, {
method: 'POST',
headers: {
'x-api-key': 'your-api-key-here',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"actorUuid": "Actor.S6Nh5SfYPcyyUhRg",
"abilityName": "Priest"
})
});
const data = await response.json();
console.log(data);

Response

Status: 200

{
"type": "use-feature-result",
"requestId": "use-feature_1778896443486",
"data": {
"uuid": "Actor.S6Nh5SfYPcyyUhRg",
"ability": "Priest",
"result": "PdyljPTV5vOYSNCc"
}
}

POST /dnd5e/use-spell

Use a spell

Casts a specific spell for an actor, optionally targeting another entity

Required scope: dnd5e

Parameters

NameTypeRequiredSourceDescription
actorUuidstringbody, queryUUID of the actor
clientIdstringqueryClient ID for the Foundry world
abilityUuidstringbody, queryThe UUID of the specific ability (optional if abilityName provided)
abilityNamestringbody, queryThe name of the ability if UUID not provided (optional if abilityUuid provided)
targetUuidstringbody, queryThe UUID of the target for the ability (optional)
targetNamestringbody, queryThe name of the target if UUID not provided (optional)
userIdstringquery, bodyFoundry user ID or username to scope permissions (omit for GM-level access)

Returns

object - Result of the use spell operation

Try It Out

Code Examples

const baseUrl = 'http://localhost:3010';
const path = '/dnd5e/use-spell';
const params = {
clientId: 'fvtt_099ad17ea199e7e3'
};
const queryString = new URLSearchParams(params).toString();
const url = `${baseUrl}${path}?${queryString}`;

const response = await fetch(url, {
method: 'POST',
headers: {
'x-api-key': 'your-api-key-here',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"actorUuid": "Actor.S6Nh5SfYPcyyUhRg",
"abilityName": "test-polymorph"
})
});
const data = await response.json();
console.log(data);

Response

Status: 200

{
"type": "use-spell-result",
"requestId": "use-spell_1778896443496",
"data": {
"uuid": "Actor.S6Nh5SfYPcyyUhRg",
"ability": "test-polymorph",
"result": null
}
}

POST /dnd5e/use-item

Use an item

Uses a specific item for an actor, optionally targeting another entity

Required scope: dnd5e

Parameters

NameTypeRequiredSourceDescription
actorUuidstringbody, queryUUID of the actor
clientIdstringqueryClient ID for the Foundry world
abilityUuidstringbody, queryThe UUID of the specific ability (optional if abilityName provided)
abilityNamestringbody, queryThe name of the ability if UUID not provided (optional if abilityUuid provided)
targetUuidstringbody, queryThe UUID of the target for the ability (optional)
targetNamestringbody, queryThe name of the target if UUID not provided (optional)
userIdstringquery, bodyFoundry user ID or username to scope permissions (omit for GM-level access)

Returns

object - Result of the use item operation

Try It Out

Code Examples

const baseUrl = 'http://localhost:3010';
const path = '/dnd5e/use-item';
const params = {
clientId: 'fvtt_099ad17ea199e7e3'
};
const queryString = new URLSearchParams(params).toString();
const url = `${baseUrl}${path}?${queryString}`;

const response = await fetch(url, {
method: 'POST',
headers: {
'x-api-key': 'your-api-key-here',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"actorUuid": "Actor.S6Nh5SfYPcyyUhRg",
"abilityName": "Hammer"
})
});
const data = await response.json();
console.log(data);

Response

Status: 200

{
"type": "use-item-result",
"requestId": "use-item_1778896443466",
"data": {
"uuid": "Actor.S6Nh5SfYPcyyUhRg",
"ability": "Hammer",
"result": "YhCd8mEeW2Hp60Xc"
}
}