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
| Name | Type | Required | Source | Description |
|---|---|---|---|---|
| actorUuid | string | ✓ | body, query | UUID of the actor |
| details | array | ✓ | body, query | Array of detail types to retrieve (e.g., ["resources", "items", "spells", "features"]) |
| clientId | string | query | Client ID for the Foundry world | |
| userId | string | query, body | Foundry 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
- JavaScript
- cURL
- Python
- TypeScript
- Emojicode
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);
curl -X GET 'http://localhost:3010/dnd5e/get-actor-details?clientId=fvtt_099ad17ea199e7e3&actorUuid=Actor.S6Nh5SfYPcyyUhRg&details=%5B%22resources%22%2C%22items%22%2C%22features%22%2C%22spells%22%5D' \
-H "x-api-key: your-api-key-here"
import requests
base_url = 'http://localhost:3010'
path = '/dnd5e/get-actor-details'
params = {
'clientId': 'fvtt_099ad17ea199e7e3',
'actorUuid': 'Actor.S6Nh5SfYPcyyUhRg',
'details': '["resources","items","features","spells"]'
}
url = f'{base_url}{path}'
response = requests.get(
url,
params=params,
headers={
'x-api-key': 'your-api-key-here'
}
)
data = response.json()
print(data)
import axios from 'axios';
(async () => {
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 axios({
method: 'get',
headers: {
'x-api-key': 'your-api-key-here'
},
url
});
const data = response.data;
console.log(data);
})();
📦 sockets 🏠
💭 Emojicode HTTP Client
💭 Compile: emojicodec example.🍇 -o example
💭 Run: ./example
🏁 🍇
💭 Connection settings
🔤localhost🔤 ➡️ host
3010 ➡️ port
🔤/dnd5e/get-actor-details🔤 ➡️ path
💭 Query parameters
🔤clientId=fvtt_099ad17ea199e7e3🔤 ➡️ clientId
🔤actorUuid=Actor.S6Nh5SfYPcyyUhRg🔤 ➡️ actorUuid
🔤details=["resources","items","features","spells"]🔤 ➡️ details
🔤?🧲clientId🧲&🧲actorUuid🧲&🧲details🧲🔤 ➡️ queryString
💭 Build HTTP request
🔤GET /dnd5e/get-actor-details🧲queryString🧲 HTTP/1.1❌r❌nHost: localhost:3010❌r❌nx-api-key: your-api-key-here❌r❌n❌r❌n🔤 ➡️ request
💭 Connect and send
🍺 🆕📞 host port❗ ➡️ socket
🍺 💬 socket 📇 request❗❗
💭 Read and print response
🍺 👂 socket 4096❗ ➡️ data
😀 🍺 🔡 data❗❗
💭 Close socket
🚪 socket❗
🍉
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
| Name | Type | Required | Source | Description |
|---|---|---|---|---|
| actorUuid | string | ✓ | body, query | UUID of the actor |
| amount | number | ✓ | body, query | The amount to modify charges by (positive or negative) |
| clientId | string | query | Client ID for the Foundry world | |
| itemUuid | string | body, query | The UUID of the specific item (optional if itemName provided) | |
| itemName | string | body, query | The name of the item if UUID not provided (optional if itemUuid provided) | |
| userId | string | query, body | Foundry 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
- JavaScript
- cURL
- Python
- TypeScript
- Emojicode
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);
curl -X POST 'http://localhost:3010/dnd5e/modify-item-charges?clientId=fvtt_099ad17ea199e7e3' \
-H "x-api-key: your-api-key-here" \
-H "Content-Type: application/json" \
-d '{"actorUuid":"Actor.S6Nh5SfYPcyyUhRg","itemName":"Waterskin","amount":-1}'
import requests
base_url = 'http://localhost:3010'
path = '/dnd5e/modify-item-charges'
params = {
'clientId': 'fvtt_099ad17ea199e7e3'
}
url = f'{base_url}{path}'
response = requests.post(
url,
params=params,
headers={
'x-api-key': 'your-api-key-here',
'Content-Type': 'application/json'
},
json={
"actorUuid": "Actor.S6Nh5SfYPcyyUhRg",
"itemName": "Waterskin",
"amount": -1
}
)
data = response.json()
print(data)
import axios from 'axios';
(async () => {
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 axios({
method: 'post',
headers: {
'x-api-key': 'your-api-key-here',
'Content-Type': 'application/json'
},
url,
data: {
"actorUuid": "Actor.S6Nh5SfYPcyyUhRg",
"itemName": "Waterskin",
"amount": -1
}
});
const data = response.data;
console.log(data);
})();
📦 sockets 🏠
💭 Emojicode HTTP Client
💭 Compile: emojicodec example.🍇 -o example
💭 Run: ./example
🏁 🍇
💭 Connection settings
🔤localhost🔤 ➡️ host
3010 ➡️ port
🔤/dnd5e/modify-item-charges🔤 ➡️ path
💭 Query parameters
🔤clientId=fvtt_099ad17ea199e7e3🔤 ➡️ clientId
🔤?🧲clientId🧲🔤 ➡️ queryString
💭 Request body
🔤{"actorUuid":"Actor.S6Nh5SfYPcyyUhRg","itemName":"Waterskin","amount":-1}🔤 ➡️ body
💭 Build HTTP request
🔤POST /dnd5e/modify-item-charges🧲queryString🧲 HTTP/1.1❌r❌nHost: localhost:3010❌r❌nx-api-key: your-api-key-here❌r❌nContent-Type: application/json❌r❌nContent-Length: 73❌r❌n❌r❌n🧲body🧲🔤 ➡️ request
💭 Connect and send
🍺 🆕📞 host port❗ ➡️ socket
🍺 💬 socket 📇 request❗❗
💭 Read and print response
🍺 👂 socket 4096❗ ➡️ data
😀 🍺 🔡 data❗❗
💭 Close socket
🚪 socket❗
🍉
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
| Name | Type | Required | Source | Description |
|---|---|---|---|---|
| clientId | string | query | Client ID for the Foundry world | |
| actorUuid | string | body, query | UUID of the actor (optional if selected is true) | |
| selected | boolean | query, body | Whether to get the selected entity | |
| autoHD | boolean | body, query | Automatically spend hit dice during short rest | |
| autoHDThreshold | number | body, query | HP threshold below which to auto-spend hit dice (0-1 as fraction of max HP) | |
| userId | string | query, body | Foundry 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
- JavaScript
- cURL
- Python
- TypeScript
- Emojicode
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);
curl -X POST 'http://localhost:3010/dnd5e/short-rest?clientId=fvtt_099ad17ea199e7e3' \
-H "x-api-key: your-api-key-here" \
-H "Content-Type: application/json" \
-d '{"actorUuid":"Actor.S6Nh5SfYPcyyUhRg"}'
import requests
base_url = 'http://localhost:3010'
path = '/dnd5e/short-rest'
params = {
'clientId': 'fvtt_099ad17ea199e7e3'
}
url = f'{base_url}{path}'
response = requests.post(
url,
params=params,
headers={
'x-api-key': 'your-api-key-here',
'Content-Type': 'application/json'
},
json={
"actorUuid": "Actor.S6Nh5SfYPcyyUhRg"
}
)
data = response.json()
print(data)
import axios from 'axios';
(async () => {
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 axios({
method: 'post',
headers: {
'x-api-key': 'your-api-key-here',
'Content-Type': 'application/json'
},
url,
data: {
"actorUuid": "Actor.S6Nh5SfYPcyyUhRg"
}
});
const data = response.data;
console.log(data);
})();
📦 sockets 🏠
💭 Emojicode HTTP Client
💭 Compile: emojicodec example.🍇 -o example
💭 Run: ./example
🏁 🍇
💭 Connection settings
🔤localhost🔤 ➡️ host
3010 ➡️ port
🔤/dnd5e/short-rest🔤 ➡️ path
💭 Query parameters
🔤clientId=fvtt_099ad17ea199e7e3🔤 ➡️ clientId
🔤?🧲clientId🧲🔤 ➡️ queryString
💭 Request body
🔤{"actorUuid":"Actor.S6Nh5SfYPcyyUhRg"}🔤 ➡️ body
💭 Build HTTP request
🔤POST /dnd5e/short-rest🧲queryString🧲 HTTP/1.1❌r❌nHost: localhost:3010❌r❌nx-api-key: your-api-key-here❌r❌nContent-Type: application/json❌r❌nContent-Length: 38❌r❌n❌r❌n🧲body🧲🔤 ➡️ request
💭 Connect and send
🍺 🆕📞 host port❗ ➡️ socket
🍺 💬 socket 📇 request❗❗
💭 Read and print response
🍺 👂 socket 4096❗ ➡️ data
😀 🍺 🔡 data❗❗
💭 Close socket
🚪 socket❗
🍉
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
| Name | Type | Required | Source | Description |
|---|---|---|---|---|
| clientId | string | query | Client ID for the Foundry world | |
| actorUuid | string | body, query | UUID of the actor (optional if selected is true) | |
| selected | boolean | query, body | Whether to get the selected entity | |
| newDay | boolean | body, query | Whether the long rest marks a new day (default: true) | |
| userId | string | query, body | Foundry 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
- JavaScript
- cURL
- Python
- TypeScript
- Emojicode
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);
curl -X POST 'http://localhost:3010/dnd5e/long-rest?clientId=fvtt_099ad17ea199e7e3' \
-H "x-api-key: your-api-key-here" \
-H "Content-Type: application/json" \
-d '{"actorUuid":"Actor.S6Nh5SfYPcyyUhRg","newDay":true}'
import requests
base_url = 'http://localhost:3010'
path = '/dnd5e/long-rest'
params = {
'clientId': 'fvtt_099ad17ea199e7e3'
}
url = f'{base_url}{path}'
response = requests.post(
url,
params=params,
headers={
'x-api-key': 'your-api-key-here',
'Content-Type': 'application/json'
},
json={
"actorUuid": "Actor.S6Nh5SfYPcyyUhRg",
"newDay": True
}
)
data = response.json()
print(data)
import axios from 'axios';
(async () => {
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 axios({
method: 'post',
headers: {
'x-api-key': 'your-api-key-here',
'Content-Type': 'application/json'
},
url,
data: {
"actorUuid": "Actor.S6Nh5SfYPcyyUhRg",
"newDay": true
}
});
const data = response.data;
console.log(data);
})();
📦 sockets 🏠
💭 Emojicode HTTP Client
💭 Compile: emojicodec example.🍇 -o example
💭 Run: ./example
🏁 🍇
💭 Connection settings
🔤localhost🔤 ➡️ host
3010 ➡️ port
🔤/dnd5e/long-rest🔤 ➡️ path
💭 Query parameters
🔤clientId=fvtt_099ad17ea199e7e3🔤 ➡️ clientId
🔤?🧲clientId🧲🔤 ➡️ queryString
💭 Request body
🔤{"actorUuid":"Actor.S6Nh5SfYPcyyUhRg","newDay":true}🔤 ➡️ body
💭 Build HTTP request
🔤POST /dnd5e/long-rest🧲queryString🧲 HTTP/1.1❌r❌nHost: localhost:3010❌r❌nx-api-key: your-api-key-here❌r❌nContent-Type: application/json❌r❌nContent-Length: 52❌r❌n❌r❌n🧲body🧲🔤 ➡️ request
💭 Connect and send
🍺 🆕📞 host port❗ ➡️ socket
🍺 💬 socket 📇 request❗❗
💭 Read and print response
🍺 👂 socket 4096❗ ➡️ data
😀 🍺 🔡 data❗❗
💭 Close socket
🚪 socket❗
🍉
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
| Name | Type | Required | Source | Description |
|---|---|---|---|---|
| actorUuid | string | ✓ | body, query | UUID of the actor |
| skill | string | ✓ | body, query | Skill abbreviation (e.g., "acr", "ath", "ste", "prc") |
| clientId | string | query | Client ID for the Foundry world | |
| userId | string | query, body | Foundry user ID or username to scope permissions (omit for GM-level access) | |
| advantage | boolean | body, query | Roll with advantage | |
| disadvantage | boolean | body, query | Roll with disadvantage | |
| bonus | string | body, query | Extra bonus formula to add (e.g., "1d4", "+2") | |
| createChatMessage | boolean | body, query | Whether to post the roll to chat (default: true) |
Returns
object - Result of the skill check roll
Try It Out
Code Examples
- JavaScript
- cURL
- Python
- TypeScript
- Emojicode
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);
curl -X POST 'http://localhost:3010/dnd5e/skill-check?clientId=fvtt_099ad17ea199e7e3' \
-H "x-api-key: your-api-key-here" \
-H "Content-Type: application/json" \
-d '{"actorUuid":"Actor.S6Nh5SfYPcyyUhRg","skill":"prc"}'
import requests
base_url = 'http://localhost:3010'
path = '/dnd5e/skill-check'
params = {
'clientId': 'fvtt_099ad17ea199e7e3'
}
url = f'{base_url}{path}'
response = requests.post(
url,
params=params,
headers={
'x-api-key': 'your-api-key-here',
'Content-Type': 'application/json'
},
json={
"actorUuid": "Actor.S6Nh5SfYPcyyUhRg",
"skill": "prc"
}
)
data = response.json()
print(data)
import axios from 'axios';
(async () => {
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 axios({
method: 'post',
headers: {
'x-api-key': 'your-api-key-here',
'Content-Type': 'application/json'
},
url,
data: {
"actorUuid": "Actor.S6Nh5SfYPcyyUhRg",
"skill": "prc"
}
});
const data = response.data;
console.log(data);
})();
📦 sockets 🏠
💭 Emojicode HTTP Client
💭 Compile: emojicodec example.🍇 -o example
💭 Run: ./example
🏁 🍇
💭 Connection settings
🔤localhost🔤 ➡️ host
3010 ➡️ port
🔤/dnd5e/skill-check🔤 ➡️ path
💭 Query parameters
🔤clientId=fvtt_099ad17ea199e7e3🔤 ➡️ clientId
🔤?🧲clientId🧲🔤 ➡️ queryString
💭 Request body
🔤{"actorUuid":"Actor.S6Nh5SfYPcyyUhRg","skill":"prc"}🔤 ➡️ body
💭 Build HTTP request
🔤POST /dnd5e/skill-check🧲queryString🧲 HTTP/1.1❌r❌nHost: localhost:3010❌r❌nx-api-key: your-api-key-here❌r❌nContent-Type: application/json❌r❌nContent-Length: 52❌r❌n❌r❌n🧲body🧲🔤 ➡️ request
💭 Connect and send
🍺 🆕📞 host port❗ ➡️ socket
🍺 💬 socket 📇 request❗❗
💭 Read and print response
🍺 👂 socket 4096❗ ➡️ data
😀 🍺 🔡 data❗❗
💭 Close socket
🚪 socket❗
🍉
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
| Name | Type | Required | Source | Description |
|---|---|---|---|---|
| actorUuid | string | ✓ | body, query | UUID of the actor |
| ability | string | ✓ | body, query | Ability abbreviation (e.g., "str", "dex", "con", "int", "wis", "cha") |
| clientId | string | query | Client ID for the Foundry world | |
| userId | string | query, body | Foundry user ID or username to scope permissions (omit for GM-level access) | |
| advantage | boolean | body, query | Roll with advantage | |
| disadvantage | boolean | body, query | Roll with disadvantage | |
| bonus | string | body, query | Extra bonus formula to add (e.g., "1d4", "+2") | |
| createChatMessage | boolean | body, query | Whether to post the roll to chat (default: true) |
Returns
object - Result of the saving throw roll
Try It Out
Code Examples
- JavaScript
- cURL
- Python
- TypeScript
- Emojicode
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);
curl -X POST 'http://localhost:3010/dnd5e/ability-save?clientId=fvtt_099ad17ea199e7e3' \
-H "x-api-key: your-api-key-here" \
-H "Content-Type: application/json" \
-d '{"actorUuid":"Actor.S6Nh5SfYPcyyUhRg","ability":"dex"}'
import requests
base_url = 'http://localhost:3010'
path = '/dnd5e/ability-save'
params = {
'clientId': 'fvtt_099ad17ea199e7e3'
}
url = f'{base_url}{path}'
response = requests.post(
url,
params=params,
headers={
'x-api-key': 'your-api-key-here',
'Content-Type': 'application/json'
},
json={
"actorUuid": "Actor.S6Nh5SfYPcyyUhRg",
"ability": "dex"
}
)
data = response.json()
print(data)
import axios from 'axios';
(async () => {
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 axios({
method: 'post',
headers: {
'x-api-key': 'your-api-key-here',
'Content-Type': 'application/json'
},
url,
data: {
"actorUuid": "Actor.S6Nh5SfYPcyyUhRg",
"ability": "dex"
}
});
const data = response.data;
console.log(data);
})();
📦 sockets 🏠
💭 Emojicode HTTP Client
💭 Compile: emojicodec example.🍇 -o example
💭 Run: ./example
🏁 🍇
💭 Connection settings
🔤localhost🔤 ➡️ host
3010 ➡️ port
🔤/dnd5e/ability-save🔤 ➡️ path
💭 Query parameters
🔤clientId=fvtt_099ad17ea199e7e3🔤 ➡️ clientId
🔤?🧲clientId🧲🔤 ➡️ queryString
💭 Request body
🔤{"actorUuid":"Actor.S6Nh5SfYPcyyUhRg","ability":"dex"}🔤 ➡️ body
💭 Build HTTP request
🔤POST /dnd5e/ability-save🧲queryString🧲 HTTP/1.1❌r❌nHost: localhost:3010❌r❌nx-api-key: your-api-key-here❌r❌nContent-Type: application/json❌r❌nContent-Length: 54❌r❌n❌r❌n🧲body🧲🔤 ➡️ request
💭 Connect and send
🍺 🆕📞 host port❗ ➡️ socket
🍺 💬 socket 📇 request❗❗
💭 Read and print response
🍺 👂 socket 4096❗ ➡️ data
😀 🍺 🔡 data❗❗
💭 Close socket
🚪 socket❗
🍉
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
| Name | Type | Required | Source | Description |
|---|---|---|---|---|
| actorUuid | string | ✓ | body, query | UUID of the actor |
| ability | string | ✓ | body, query | Ability abbreviation (e.g., "str", "dex", "con", "int", "wis", "cha") |
| clientId | string | query | Client ID for the Foundry world | |
| userId | string | query, body | Foundry user ID or username to scope permissions (omit for GM-level access) | |
| advantage | boolean | body, query | Roll with advantage | |
| disadvantage | boolean | body, query | Roll with disadvantage | |
| bonus | string | body, query | Extra bonus formula to add (e.g., "1d4", "+2") | |
| createChatMessage | boolean | body, query | Whether to post the roll to chat (default: true) |
Returns
object - Result of the ability check roll
Try It Out
Code Examples
- JavaScript
- cURL
- Python
- TypeScript
- Emojicode
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);
curl -X POST 'http://localhost:3010/dnd5e/ability-check?clientId=fvtt_099ad17ea199e7e3' \
-H "x-api-key: your-api-key-here" \
-H "Content-Type: application/json" \
-d '{"actorUuid":"Actor.S6Nh5SfYPcyyUhRg","ability":"str"}'
import requests
base_url = 'http://localhost:3010'
path = '/dnd5e/ability-check'
params = {
'clientId': 'fvtt_099ad17ea199e7e3'
}
url = f'{base_url}{path}'
response = requests.post(
url,
params=params,
headers={
'x-api-key': 'your-api-key-here',
'Content-Type': 'application/json'
},
json={
"actorUuid": "Actor.S6Nh5SfYPcyyUhRg",
"ability": "str"
}
)
data = response.json()
print(data)
import axios from 'axios';
(async () => {
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 axios({
method: 'post',
headers: {
'x-api-key': 'your-api-key-here',
'Content-Type': 'application/json'
},
url,
data: {
"actorUuid": "Actor.S6Nh5SfYPcyyUhRg",
"ability": "str"
}
});
const data = response.data;
console.log(data);
})();
📦 sockets 🏠
💭 Emojicode HTTP Client
💭 Compile: emojicodec example.🍇 -o example
💭 Run: ./example
🏁 🍇
💭 Connection settings
🔤localhost🔤 ➡️ host
3010 ➡️ port
🔤/dnd5e/ability-check🔤 ➡️ path
💭 Query parameters
🔤clientId=fvtt_099ad17ea199e7e3🔤 ➡️ clientId
🔤?🧲clientId🧲🔤 ➡️ queryString
💭 Request body
🔤{"actorUuid":"Actor.S6Nh5SfYPcyyUhRg","ability":"str"}🔤 ➡️ body
💭 Build HTTP request
🔤POST /dnd5e/ability-check🧲queryString🧲 HTTP/1.1❌r❌nHost: localhost:3010❌r❌nx-api-key: your-api-key-here❌r❌nContent-Type: application/json❌r❌nContent-Length: 54❌r❌n❌r❌n🧲body🧲🔤 ➡️ request
💭 Connect and send
🍺 🆕📞 host port❗ ➡️ socket
🍺 💬 socket 📇 request❗❗
💭 Read and print response
🍺 👂 socket 4096❗ ➡️ data
😀 🍺 🔡 data❗❗
💭 Close socket
🚪 socket❗
🍉
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
| Name | Type | Required | Source | Description |
|---|---|---|---|---|
| actorUuid | string | ✓ | body, query | UUID of the actor |
| clientId | string | query | Client ID for the Foundry world | |
| advantage | boolean | body, query | Roll with advantage | |
| createChatMessage | boolean | body, query | Whether to post the roll to chat (default: true) | |
| userId | string | query, body | Foundry 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
- JavaScript
- cURL
- Python
- TypeScript
- Emojicode
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);
curl -X POST 'http://localhost:3010/dnd5e/death-save?clientId=fvtt_099ad17ea199e7e3' \
-H "x-api-key: your-api-key-here" \
-H "Content-Type: application/json" \
-d '{"actorUuid":"Actor.S6Nh5SfYPcyyUhRg"}'
import requests
base_url = 'http://localhost:3010'
path = '/dnd5e/death-save'
params = {
'clientId': 'fvtt_099ad17ea199e7e3'
}
url = f'{base_url}{path}'
response = requests.post(
url,
params=params,
headers={
'x-api-key': 'your-api-key-here',
'Content-Type': 'application/json'
},
json={
"actorUuid": "Actor.S6Nh5SfYPcyyUhRg"
}
)
data = response.json()
print(data)
import axios from 'axios';
(async () => {
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 axios({
method: 'post',
headers: {
'x-api-key': 'your-api-key-here',
'Content-Type': 'application/json'
},
url,
data: {
"actorUuid": "Actor.S6Nh5SfYPcyyUhRg"
}
});
const data = response.data;
console.log(data);
})();
📦 sockets 🏠
💭 Emojicode HTTP Client
💭 Compile: emojicodec example.🍇 -o example
💭 Run: ./example
🏁 🍇
💭 Connection settings
🔤localhost🔤 ➡️ host
3010 ➡️ port
🔤/dnd5e/death-save🔤 ➡️ path
💭 Query parameters
🔤clientId=fvtt_099ad17ea199e7e3🔤 ➡️ clientId
🔤?🧲clientId🧲🔤 ➡️ queryString
💭 Request body
🔤{"actorUuid":"Actor.S6Nh5SfYPcyyUhRg"}🔤 ➡️ body
💭 Build HTTP request
🔤POST /dnd5e/death-save🧲queryString🧲 HTTP/1.1❌r❌nHost: localhost:3010❌r❌nx-api-key: your-api-key-here❌r❌nContent-Type: application/json❌r❌nContent-Length: 38❌r❌n❌r❌n🧲body🧲🔤 ➡️ request
💭 Connect and send
🍺 🆕📞 host port❗ ➡️ socket
🍺 💬 socket 📇 request❗❗
💭 Read and print response
🍺 👂 socket 4096❗ ➡️ data
😀 🍺 🔡 data❗❗
💭 Close socket
🚪 socket❗
🍉
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
| Name | Type | Required | Source | Description |
|---|---|---|---|---|
| amount | number | ✓ | body, query | The amount of experience to add (can be negative) |
| clientId | string | query | Client ID for the Foundry world | |
| actorUuid | string | body, query | UUID of the actor (optional if selected is true) | |
| selected | boolean | query, body | Whether to get the selected entity | |
| userId | string | query, body | Foundry 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
- JavaScript
- cURL
- Python
- TypeScript
- Emojicode
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);
curl -X POST 'http://localhost:3010/dnd5e/modify-experience?clientId=fvtt_099ad17ea199e7e3' \
-H "x-api-key: your-api-key-here" \
-H "Content-Type: application/json" \
-d '{"actorUuid":"Actor.S6Nh5SfYPcyyUhRg","amount":100}'
import requests
base_url = 'http://localhost:3010'
path = '/dnd5e/modify-experience'
params = {
'clientId': 'fvtt_099ad17ea199e7e3'
}
url = f'{base_url}{path}'
response = requests.post(
url,
params=params,
headers={
'x-api-key': 'your-api-key-here',
'Content-Type': 'application/json'
},
json={
"actorUuid": "Actor.S6Nh5SfYPcyyUhRg",
"amount": 100
}
)
data = response.json()
print(data)
import axios from 'axios';
(async () => {
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 axios({
method: 'post',
headers: {
'x-api-key': 'your-api-key-here',
'Content-Type': 'application/json'
},
url,
data: {
"actorUuid": "Actor.S6Nh5SfYPcyyUhRg",
"amount": 100
}
});
const data = response.data;
console.log(data);
})();
📦 sockets 🏠
💭 Emojicode HTTP Client
💭 Compile: emojicodec example.🍇 -o example
💭 Run: ./example
🏁 🍇
💭 Connection settings
🔤localhost🔤 ➡️ host
3010 ➡️ port
🔤/dnd5e/modify-experience🔤 ➡️ path
💭 Query parameters
🔤clientId=fvtt_099ad17ea199e7e3🔤 ➡️ clientId
🔤?🧲clientId🧲🔤 ➡️ queryString
💭 Request body
🔤{"actorUuid":"Actor.S6Nh5SfYPcyyUhRg","amount":100}🔤 ➡️ body
💭 Build HTTP request
🔤POST /dnd5e/modify-experience🧲queryString🧲 HTTP/1.1❌r❌nHost: localhost:3010❌r❌nx-api-key: your-api-key-here❌r❌nContent-Type: application/json❌r❌nContent-Length: 51❌r❌n❌r❌n🧲body🧲🔤 ➡️ request
💭 Connect and send
🍺 🆕📞 host port❗ ➡️ socket
🍺 💬 socket 📇 request❗❗
💭 Read and print response
🍺 👂 socket 4096❗ ➡️ data
😀 🍺 🔡 data❗❗
💭 Close socket
🚪 socket❗
🍉
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
| Name | Type | Required | Source | Description |
|---|---|---|---|---|
| clientId | string | query | Client ID for the Foundry world | |
| actorUuid | string | body, query | UUID of the actor (optional if selected is true) | |
| actorName | string | body, query | Name of the actor (optional if actorUuid provided) | |
| userId | string | query, body | Foundry 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
- JavaScript
- cURL
- Python
- TypeScript
- Emojicode
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);
curl -X GET 'http://localhost:3010/dnd5e/concentration?clientId=fvtt_099ad17ea199e7e3&actorUuid=Actor.S6Nh5SfYPcyyUhRg' \
-H "x-api-key: your-api-key-here"
import requests
base_url = 'http://localhost:3010'
path = '/dnd5e/concentration'
params = {
'clientId': 'fvtt_099ad17ea199e7e3',
'actorUuid': 'Actor.S6Nh5SfYPcyyUhRg'
}
url = f'{base_url}{path}'
response = requests.get(
url,
params=params,
headers={
'x-api-key': 'your-api-key-here'
}
)
data = response.json()
print(data)
import axios from 'axios';
(async () => {
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 axios({
method: 'get',
headers: {
'x-api-key': 'your-api-key-here'
},
url
});
const data = response.data;
console.log(data);
})();
📦 sockets 🏠
💭 Emojicode HTTP Client
💭 Compile: emojicodec example.🍇 -o example
💭 Run: ./example
🏁 🍇
💭 Connection settings
🔤localhost🔤 ➡️ host
3010 ➡️ port
🔤/dnd5e/concentration🔤 ➡️ path
💭 Query parameters
🔤clientId=fvtt_099ad17ea199e7e3🔤 ➡️ clientId
🔤actorUuid=Actor.S6Nh5SfYPcyyUhRg🔤 ➡️ actorUuid
🔤?🧲clientId🧲&🧲actorUuid🧲🔤 ➡️ queryString
💭 Build HTTP request
🔤GET /dnd5e/concentration🧲queryString🧲 HTTP/1.1❌r❌nHost: localhost:3010❌r❌nx-api-key: your-api-key-here❌r❌n❌r❌n🔤 ➡️ request
💭 Connect and send
🍺 🆕📞 host port❗ ➡️ socket
🍺 💬 socket 📇 request❗❗
💭 Read and print response
🍺 👂 socket 4096❗ ➡️ data
😀 🍺 🔡 data❗❗
💭 Close socket
🚪 socket❗
🍉
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
| Name | Type | Required | Source | Description |
|---|---|---|---|---|
| clientId | string | query | Client ID for the Foundry world | |
| actorUuid | string | body, query | UUID of the actor (optional if selected is true) | |
| actorName | string | body, query | Name of the actor (optional if actorUuid provided) | |
| userId | string | query, body | Foundry user ID or username to scope permissions (omit for GM-level access) |
Returns
object - Confirmation that concentration was broken
Try It Out
Code Examples
- JavaScript
- cURL
- Python
- TypeScript
- Emojicode
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);
curl -X POST 'http://localhost:3010/dnd5e/break-concentration?clientId=fvtt_099ad17ea199e7e3' \
-H "x-api-key: your-api-key-here" \
-H "Content-Type: application/json" \
-d '{"actorUuid":"Actor.S6Nh5SfYPcyyUhRg"}'
import requests
base_url = 'http://localhost:3010'
path = '/dnd5e/break-concentration'
params = {
'clientId': 'fvtt_099ad17ea199e7e3'
}
url = f'{base_url}{path}'
response = requests.post(
url,
params=params,
headers={
'x-api-key': 'your-api-key-here'
},
json={
"actorUuid": "Actor.S6Nh5SfYPcyyUhRg"
}
)
data = response.json()
print(data)
import axios from 'axios';
(async () => {
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 axios({
method: 'post',
headers: {
'x-api-key': 'your-api-key-here',
'Content-Type': 'application/json'
},
url,
data: {
"actorUuid": "Actor.S6Nh5SfYPcyyUhRg"
}
});
const data = response.data;
console.log(data);
})();
📦 sockets 🏠
💭 Emojicode HTTP Client
💭 Compile: emojicodec example.🍇 -o example
💭 Run: ./example
🏁 🍇
💭 Connection settings
🔤localhost🔤 ➡️ host
3010 ➡️ port
🔤/dnd5e/break-concentration🔤 ➡️ path
💭 Query parameters
🔤clientId=fvtt_099ad17ea199e7e3🔤 ➡️ clientId
🔤?🧲clientId🧲🔤 ➡️ queryString
💭 Request body
🔤{"actorUuid":"Actor.S6Nh5SfYPcyyUhRg"}🔤 ➡️ body
💭 Build HTTP request
🔤POST /dnd5e/break-concentration🧲queryString🧲 HTTP/1.1❌r❌nHost: localhost:3010❌r❌nx-api-key: your-api-key-here❌r❌nContent-Type: application/json❌r❌nContent-Length: 38❌r❌n❌r❌n🧲body🧲🔤 ➡️ request
💭 Connect and send
🍺 🆕📞 host port❗ ➡️ socket
🍺 💬 socket 📇 request❗❗
💭 Read and print response
🍺 👂 socket 4096❗ ➡️ data
😀 🍺 🔡 data❗❗
💭 Close socket
🚪 socket❗
🍉
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
| Name | Type | Required | Source | Description |
|---|---|---|---|---|
| damage | number | ✓ | body, query | Amount of damage taken (used to calculate DC = max(10, floor(damage/2))) |
| clientId | string | query | Client ID for the Foundry world | |
| actorUuid | string | body, query | UUID of the actor (optional if selected is true) | |
| actorName | string | body, query | Name of the actor (optional if actorUuid provided) | |
| userId | string | query, body | Foundry user ID or username to scope permissions (omit for GM-level access) | |
| advantage | boolean | body, query | Roll with advantage | |
| disadvantage | boolean | body, query | Roll with disadvantage | |
| bonus | string | body, query | Extra bonus formula to add (e.g., "1d4", "+2") | |
| createChatMessage | boolean | body, query | Whether to post the roll to chat (default: true) |
Returns
object - Roll result and concentration maintained status
Try It Out
Code Examples
- JavaScript
- cURL
- Python
- TypeScript
- Emojicode
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);
curl -X POST 'http://localhost:3010/dnd5e/concentration-save?clientId=fvtt_099ad17ea199e7e3' \
-H "x-api-key: your-api-key-here" \
-H "Content-Type: application/json" \
-d '{"actorUuid":"Actor.S6Nh5SfYPcyyUhRg","damage":15}'
import requests
base_url = 'http://localhost:3010'
path = '/dnd5e/concentration-save'
params = {
'clientId': 'fvtt_099ad17ea199e7e3'
}
url = f'{base_url}{path}'
response = requests.post(
url,
params=params,
headers={
'x-api-key': 'your-api-key-here'
},
json={
"actorUuid": "Actor.S6Nh5SfYPcyyUhRg",
"damage": 15
}
)
data = response.json()
print(data)
import axios from 'axios';
(async () => {
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 axios({
method: 'post',
headers: {
'x-api-key': 'your-api-key-here',
'Content-Type': 'application/json'
},
url,
data: {
"actorUuid": "Actor.S6Nh5SfYPcyyUhRg",
"damage": 15
}
});
const data = response.data;
console.log(data);
})();
📦 sockets 🏠
💭 Emojicode HTTP Client
💭 Compile: emojicodec example.🍇 -o example
💭 Run: ./example
🏁 🍇
💭 Connection settings
🔤localhost🔤 ➡️ host
3010 ➡️ port
🔤/dnd5e/concentration-save🔤 ➡️ path
💭 Query parameters
🔤clientId=fvtt_099ad17ea199e7e3🔤 ➡️ clientId
🔤?🧲clientId🧲🔤 ➡️ queryString
💭 Request body
🔤{"actorUuid":"Actor.S6Nh5SfYPcyyUhRg","damage":15}🔤 ➡️ body
💭 Build HTTP request
🔤POST /dnd5e/concentration-save🧲queryString🧲 HTTP/1.1❌r❌nHost: localhost:3010❌r❌nx-api-key: your-api-key-here❌r❌nContent-Type: application/json❌r❌nContent-Length: 50❌r❌n❌r❌n🧲body🧲🔤 ➡️ request
💭 Connect and send
🍺 🆕📞 host port❗ ➡️ socket
🍺 💬 socket 📇 request❗❗
💭 Read and print response
🍺 👂 socket 4096❗ ➡️ data
😀 🍺 🔡 data❗❗
💭 Close socket
🚪 socket❗
🍉
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
| Name | Type | Required | Source | Description |
|---|---|---|---|---|
| equipped | boolean | ✓ | body, query | Whether the item should be equipped (true) or unequipped (false) |
| clientId | string | query | Client ID for the Foundry world | |
| actorUuid | string | body, query | UUID of the actor (optional if selected is true) | |
| actorName | string | body, query | Name of the actor (optional if actorUuid provided) | |
| itemUuid | string | body, query | UUID of the item (optional if itemName provided) | |
| itemName | string | body, query | Name of the item (optional if itemUuid provided) | |
| userId | string | query, body | Foundry user ID or username to scope permissions (omit for GM-level access) |
Returns
object - Updated equipment status
Try It Out
Code Examples
- JavaScript
- cURL
- Python
- TypeScript
- Emojicode
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);
curl -X POST 'http://localhost:3010/dnd5e/equip-item?clientId=fvtt_099ad17ea199e7e3' \
-H "x-api-key: your-api-key-here" \
-H "Content-Type: application/json" \
-d '{"actorUuid":"Actor.S6Nh5SfYPcyyUhRg","itemName":"Dart","equipped":true}'
import requests
base_url = 'http://localhost:3010'
path = '/dnd5e/equip-item'
params = {
'clientId': 'fvtt_099ad17ea199e7e3'
}
url = f'{base_url}{path}'
response = requests.post(
url,
params=params,
headers={
'x-api-key': 'your-api-key-here'
},
json={
"actorUuid": "Actor.S6Nh5SfYPcyyUhRg",
"itemName": "Dart",
"equipped": True
}
)
data = response.json()
print(data)
import axios from 'axios';
(async () => {
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 axios({
method: 'post',
headers: {
'x-api-key': 'your-api-key-here',
'Content-Type': 'application/json'
},
url,
data: {
"actorUuid": "Actor.S6Nh5SfYPcyyUhRg",
"itemName": "Dart",
"equipped": true
}
});
const data = response.data;
console.log(data);
})();
📦 sockets 🏠
💭 Emojicode HTTP Client
💭 Compile: emojicodec example.🍇 -o example
💭 Run: ./example
🏁 🍇
💭 Connection settings
🔤localhost🔤 ➡️ host
3010 ➡️ port
🔤/dnd5e/equip-item🔤 ➡️ path
💭 Query parameters
🔤clientId=fvtt_099ad17ea199e7e3🔤 ➡️ clientId
🔤?🧲clientId🧲🔤 ➡️ queryString
💭 Request body
🔤{"actorUuid":"Actor.S6Nh5SfYPcyyUhRg","itemName":"Dart","equipped":true}🔤 ➡️ body
💭 Build HTTP request
🔤POST /dnd5e/equip-item🧲queryString🧲 HTTP/1.1❌r❌nHost: localhost:3010❌r❌nx-api-key: your-api-key-here❌r❌nContent-Type: application/json❌r❌nContent-Length: 72❌r❌n❌r❌n🧲body🧲🔤 ➡️ request
💭 Connect and send
🍺 🆕📞 host port❗ ➡️ socket
🍺 💬 socket 📇 request❗❗
💭 Read and print response
🍺 👂 socket 4096❗ ➡️ data
😀 🍺 🔡 data❗❗
💭 Close socket
🚪 socket❗
🍉
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
| Name | Type | Required | Source | Description |
|---|---|---|---|---|
| attuned | boolean | ✓ | body, query | Whether the item should be attuned (true) or unattuned (false) |
| clientId | string | query | Client ID for the Foundry world | |
| actorUuid | string | body, query | UUID of the actor (optional if selected is true) | |
| actorName | string | body, query | Name of the actor (optional if actorUuid provided) | |
| itemUuid | string | body, query | UUID of the item (optional if itemName provided) | |
| itemName | string | body, query | Name of the item (optional if itemUuid provided) | |
| userId | string | query, body | Foundry user ID or username to scope permissions (omit for GM-level access) |
Returns
object - Updated attunement status
Try It Out
Code Examples
- JavaScript
- cURL
- Python
- TypeScript
- Emojicode
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);
curl -X POST 'http://localhost:3010/dnd5e/attune-item?clientId=fvtt_099ad17ea199e7e3' \
-H "x-api-key: your-api-key-here" \
-H "Content-Type: application/json" \
-d '{"actorUuid":"Actor.S6Nh5SfYPcyyUhRg","itemName":"Dart","attuned":true}'
import requests
base_url = 'http://localhost:3010'
path = '/dnd5e/attune-item'
params = {
'clientId': 'fvtt_099ad17ea199e7e3'
}
url = f'{base_url}{path}'
response = requests.post(
url,
params=params,
headers={
'x-api-key': 'your-api-key-here'
},
json={
"actorUuid": "Actor.S6Nh5SfYPcyyUhRg",
"itemName": "Dart",
"attuned": True
}
)
data = response.json()
print(data)
import axios from 'axios';
(async () => {
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 axios({
method: 'post',
headers: {
'x-api-key': 'your-api-key-here',
'Content-Type': 'application/json'
},
url,
data: {
"actorUuid": "Actor.S6Nh5SfYPcyyUhRg",
"itemName": "Dart",
"attuned": true
}
});
const data = response.data;
console.log(data);
})();
📦 sockets 🏠
💭 Emojicode HTTP Client
💭 Compile: emojicodec example.🍇 -o example
💭 Run: ./example
🏁 🍇
💭 Connection settings
🔤localhost🔤 ➡️ host
3010 ➡️ port
🔤/dnd5e/attune-item🔤 ➡️ path
💭 Query parameters
🔤clientId=fvtt_099ad17ea199e7e3🔤 ➡️ clientId
🔤?🧲clientId🧲🔤 ➡️ queryString
💭 Request body
🔤{"actorUuid":"Actor.S6Nh5SfYPcyyUhRg","itemName":"Dart","attuned":true}🔤 ➡️ body
💭 Build HTTP request
🔤POST /dnd5e/attune-item🧲queryString🧲 HTTP/1.1❌r❌nHost: localhost:3010❌r❌nx-api-key: your-api-key-here❌r❌nContent-Type: application/json❌r❌nContent-Length: 71❌r❌n❌r❌n🧲body🧲🔤 ➡️ request
💭 Connect and send
🍺 🆕📞 host port❗ ➡️ socket
🍺 💬 socket 📇 request❗❗
💭 Read and print response
🍺 👂 socket 4096❗ ➡️ data
😀 🍺 🔡 data❗❗
💭 Close socket
🚪 socket❗
🍉
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
| Name | Type | Required | Source | Description |
|---|---|---|---|---|
| currency | object | ✓ | body, query | Currency amounts to transfer, e.g. pp, gp, ep, sp, cp denomination keys with numeric values |
| clientId | string | query | Client ID for the Foundry world | |
| sourceActorUuid | string | body, query | UUID of the source actor (optional if sourceActorName provided) | |
| sourceActorName | string | body, query | Name of the source actor | |
| targetActorUuid | string | body, query | UUID of the target actor (optional if targetActorName provided) | |
| targetActorName | string | body, query | Name of the target actor | |
| userId | string | query, body | Foundry user ID or username to scope permissions (omit for GM-level access) |
Returns
object - Transfer result with updated balances
Try It Out
Code Examples
- JavaScript
- cURL
- Python
- TypeScript
- Emojicode
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);
curl -X POST 'http://localhost:3010/dnd5e/transfer-currency?clientId=fvtt_099ad17ea199e7e3' \
-H "x-api-key: your-api-key-here" \
-H "Content-Type: application/json" \
-d '{"sourceActorUuid":"Actor.S6Nh5SfYPcyyUhRg","targetActorUuid":"Actor.7QAOIsAAOiZ97ocq","currency":{"gp":1}}'
import requests
base_url = 'http://localhost:3010'
path = '/dnd5e/transfer-currency'
params = {
'clientId': 'fvtt_099ad17ea199e7e3'
}
url = f'{base_url}{path}'
response = requests.post(
url,
params=params,
headers={
'x-api-key': 'your-api-key-here'
},
json={
"sourceActorUuid": "Actor.S6Nh5SfYPcyyUhRg",
"targetActorUuid": "Actor.7QAOIsAAOiZ97ocq",
"currency": {
"gp": 1
}
}
)
data = response.json()
print(data)
import axios from 'axios';
(async () => {
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 axios({
method: 'post',
headers: {
'x-api-key': 'your-api-key-here',
'Content-Type': 'application/json'
},
url,
data: {
"sourceActorUuid": "Actor.S6Nh5SfYPcyyUhRg",
"targetActorUuid": "Actor.7QAOIsAAOiZ97ocq",
"currency": {
"gp": 1
}
}
});
const data = response.data;
console.log(data);
})();
📦 sockets 🏠
💭 Emojicode HTTP Client
💭 Compile: emojicodec example.🍇 -o example
💭 Run: ./example
🏁 🍇
💭 Connection settings
🔤localhost🔤 ➡️ host
3010 ➡️ port
🔤/dnd5e/transfer-currency🔤 ➡️ path
💭 Query parameters
🔤clientId=fvtt_099ad17ea199e7e3🔤 ➡️ clientId
🔤?🧲clientId🧲🔤 ➡️ queryString
💭 Request body
🔤{"sourceActorUuid":"Actor.S6Nh5SfYPcyyUhRg","targetActorUuid":"Actor.7QAOIsAAOiZ97ocq","currency":{"gp":1}}🔤 ➡️ body
💭 Build HTTP request
🔤POST /dnd5e/transfer-currency🧲queryString🧲 HTTP/1.1❌r❌nHost: localhost:3010❌r❌nx-api-key: your-api-key-here❌r❌nContent-Type: application/json❌r❌nContent-Length: 107❌r❌n❌r❌n🧲body🧲🔤 ➡️ request
💭 Connect and send
🍺 🆕📞 host port❗ ➡️ socket
🍺 💬 socket 📇 request❗❗
💭 Read and print response
🍺 👂 socket 4096❗ ➡️ data
😀 🍺 🔡 data❗❗
💭 Close socket
🚪 socket❗
🍉
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
| Name | Type | Required | Source | Description |
|---|---|---|---|---|
| actorUuid | string | ✓ | body, query | UUID of the actor |
| currency | string | ✓ | body, query | Currency denomination to modify (pp, gp, ep, sp, cp) |
| amount | number | ✓ | body, query | Amount to add (positive) or remove (negative) |
| clientId | string | query | Client ID for the Foundry world | |
| userId | string | query, body | Foundry 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
| Name | Type | Required | Source | Description |
|---|---|---|---|---|
| actorUuid | string | ✓ | body, query | UUID of the actor |
| spellName | string | ✓ | body, query | Name of the spell to prepare or unprepare |
| prepared | boolean | ✓ | body, query | True to prepare the spell, false to unprepare it |
| clientId | string | query | Client ID for the Foundry world | |
| userId | string | query, body | Foundry 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
| Name | Type | Required | Source | Description |
|---|---|---|---|---|
| actorUuid | string | ✓ | body, query | UUID of the actor |
| clientId | string | query | Client ID for the Foundry world | |
| abilityUuid | string | body, query | The UUID of the specific ability (optional if abilityName provided) | |
| abilityName | string | body, query | The name of the ability if UUID not provided (optional if abilityUuid provided) | |
| targetUuid | string | body, query | The UUID of the target for the ability (optional) | |
| targetName | string | body, query | The name of the target if UUID not provided (optional) | |
| userId | string | query, body | Foundry 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
- JavaScript
- cURL
- Python
- TypeScript
- Emojicode
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);
curl -X POST 'http://localhost:3010/dnd5e/use-ability?clientId=fvtt_099ad17ea199e7e3' \
-H "x-api-key: your-api-key-here" \
-H "Content-Type: application/json" \
-d '{"actorUuid":"Actor.S6Nh5SfYPcyyUhRg","abilityName":"Hammer"}'
import requests
base_url = 'http://localhost:3010'
path = '/dnd5e/use-ability'
params = {
'clientId': 'fvtt_099ad17ea199e7e3'
}
url = f'{base_url}{path}'
response = requests.post(
url,
params=params,
headers={
'x-api-key': 'your-api-key-here',
'Content-Type': 'application/json'
},
json={
"actorUuid": "Actor.S6Nh5SfYPcyyUhRg",
"abilityName": "Hammer"
}
)
data = response.json()
print(data)
import axios from 'axios';
(async () => {
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 axios({
method: 'post',
headers: {
'x-api-key': 'your-api-key-here',
'Content-Type': 'application/json'
},
url,
data: {
"actorUuid": "Actor.S6Nh5SfYPcyyUhRg",
"abilityName": "Hammer"
}
});
const data = response.data;
console.log(data);
})();
📦 sockets 🏠
💭 Emojicode HTTP Client
💭 Compile: emojicodec example.🍇 -o example
💭 Run: ./example
🏁 🍇
💭 Connection settings
🔤localhost🔤 ➡️ host
3010 ➡️ port
🔤/dnd5e/use-ability🔤 ➡️ path
💭 Query parameters
🔤clientId=fvtt_099ad17ea199e7e3🔤 ➡️ clientId
🔤?🧲clientId🧲🔤 ➡️ queryString
💭 Request body
🔤{"actorUuid":"Actor.S6Nh5SfYPcyyUhRg","abilityName":"Hammer"}🔤 ➡️ body
💭 Build HTTP request
🔤POST /dnd5e/use-ability🧲queryString🧲 HTTP/1.1❌r❌nHost: localhost:3010❌r❌nx-api-key: your-api-key-here❌r❌nContent-Type: application/json❌r❌nContent-Length: 61❌r❌n❌r❌n🧲body🧲🔤 ➡️ request
💭 Connect and send
🍺 🆕📞 host port❗ ➡️ socket
🍺 💬 socket 📇 request❗❗
💭 Read and print response
🍺 👂 socket 4096❗ ➡️ data
😀 🍺 🔡 data❗❗
💭 Close socket
🚪 socket❗
🍉
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
| Name | Type | Required | Source | Description |
|---|---|---|---|---|
| actorUuid | string | ✓ | body, query | UUID of the actor |
| clientId | string | query | Client ID for the Foundry world | |
| abilityUuid | string | body, query | The UUID of the specific ability (optional if abilityName provided) | |
| abilityName | string | body, query | The name of the ability if UUID not provided (optional if abilityUuid provided) | |
| targetUuid | string | body, query | The UUID of the target for the ability (optional) | |
| targetName | string | body, query | The name of the target if UUID not provided (optional) | |
| userId | string | query, body | Foundry 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
- JavaScript
- cURL
- Python
- TypeScript
- Emojicode
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);
curl -X POST 'http://localhost:3010/dnd5e/use-feature?clientId=fvtt_099ad17ea199e7e3' \
-H "x-api-key: your-api-key-here" \
-H "Content-Type: application/json" \
-d '{"actorUuid":"Actor.S6Nh5SfYPcyyUhRg","abilityName":"Priest"}'
import requests
base_url = 'http://localhost:3010'
path = '/dnd5e/use-feature'
params = {
'clientId': 'fvtt_099ad17ea199e7e3'
}
url = f'{base_url}{path}'
response = requests.post(
url,
params=params,
headers={
'x-api-key': 'your-api-key-here',
'Content-Type': 'application/json'
},
json={
"actorUuid": "Actor.S6Nh5SfYPcyyUhRg",
"abilityName": "Priest"
}
)
data = response.json()
print(data)
import axios from 'axios';
(async () => {
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 axios({
method: 'post',
headers: {
'x-api-key': 'your-api-key-here',
'Content-Type': 'application/json'
},
url,
data: {
"actorUuid": "Actor.S6Nh5SfYPcyyUhRg",
"abilityName": "Priest"
}
});
const data = response.data;
console.log(data);
})();
📦 sockets 🏠
💭 Emojicode HTTP Client
💭 Compile: emojicodec example.🍇 -o example
💭 Run: ./example
🏁 🍇
💭 Connection settings
🔤localhost🔤 ➡️ host
3010 ➡️ port
🔤/dnd5e/use-feature🔤 ➡️ path
💭 Query parameters
🔤clientId=fvtt_099ad17ea199e7e3🔤 ➡️ clientId
🔤?🧲clientId🧲🔤 ➡️ queryString
💭 Request body
🔤{"actorUuid":"Actor.S6Nh5SfYPcyyUhRg","abilityName":"Priest"}🔤 ➡️ body
💭 Build HTTP request
🔤POST /dnd5e/use-feature🧲queryString🧲 HTTP/1.1❌r❌nHost: localhost:3010❌r❌nx-api-key: your-api-key-here❌r❌nContent-Type: application/json❌r❌nContent-Length: 61❌r❌n❌r❌n🧲body🧲🔤 ➡️ request
💭 Connect and send
🍺 🆕📞 host port❗ ➡️ socket
🍺 💬 socket 📇 request❗❗
💭 Read and print response
🍺 👂 socket 4096❗ ➡️ data
😀 🍺 🔡 data❗❗
💭 Close socket
🚪 socket❗
🍉
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
| Name | Type | Required | Source | Description |
|---|---|---|---|---|
| actorUuid | string | ✓ | body, query | UUID of the actor |
| clientId | string | query | Client ID for the Foundry world | |
| abilityUuid | string | body, query | The UUID of the specific ability (optional if abilityName provided) | |
| abilityName | string | body, query | The name of the ability if UUID not provided (optional if abilityUuid provided) | |
| targetUuid | string | body, query | The UUID of the target for the ability (optional) | |
| targetName | string | body, query | The name of the target if UUID not provided (optional) | |
| userId | string | query, body | Foundry 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
- JavaScript
- cURL
- Python
- TypeScript
- Emojicode
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);
curl -X POST 'http://localhost:3010/dnd5e/use-spell?clientId=fvtt_099ad17ea199e7e3' \
-H "x-api-key: your-api-key-here" \
-H "Content-Type: application/json" \
-d '{"actorUuid":"Actor.S6Nh5SfYPcyyUhRg","abilityName":"test-polymorph"}'
import requests
base_url = 'http://localhost:3010'
path = '/dnd5e/use-spell'
params = {
'clientId': 'fvtt_099ad17ea199e7e3'
}
url = f'{base_url}{path}'
response = requests.post(
url,
params=params,
headers={
'x-api-key': 'your-api-key-here',
'Content-Type': 'application/json'
},
json={
"actorUuid": "Actor.S6Nh5SfYPcyyUhRg",
"abilityName": "test-polymorph"
}
)
data = response.json()
print(data)
import axios from 'axios';
(async () => {
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 axios({
method: 'post',
headers: {
'x-api-key': 'your-api-key-here',
'Content-Type': 'application/json'
},
url,
data: {
"actorUuid": "Actor.S6Nh5SfYPcyyUhRg",
"abilityName": "test-polymorph"
}
});
const data = response.data;
console.log(data);
})();
📦 sockets 🏠
💭 Emojicode HTTP Client
💭 Compile: emojicodec example.🍇 -o example
💭 Run: ./example
🏁 🍇
💭 Connection settings
🔤localhost🔤 ➡️ host
3010 ➡️ port
🔤/dnd5e/use-spell🔤 ➡️ path
💭 Query parameters
🔤clientId=fvtt_099ad17ea199e7e3🔤 ➡️ clientId
🔤?🧲clientId🧲🔤 ➡️ queryString
💭 Request body
🔤{"actorUuid":"Actor.S6Nh5SfYPcyyUhRg","abilityName":"test-polymorph"}🔤 ➡️ body
💭 Build HTTP request
🔤POST /dnd5e/use-spell🧲queryString🧲 HTTP/1.1❌r❌nHost: localhost:3010❌r❌nx-api-key: your-api-key-here❌r❌nContent-Type: application/json❌r❌nContent-Length: 69❌r❌n❌r❌n🧲body🧲🔤 ➡️ request
💭 Connect and send
🍺 🆕📞 host port❗ ➡️ socket
🍺 💬 socket 📇 request❗❗
💭 Read and print response
🍺 👂 socket 4096❗ ➡️ data
😀 🍺 🔡 data❗❗
💭 Close socket
🚪 socket❗
🍉
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
| Name | Type | Required | Source | Description |
|---|---|---|---|---|
| actorUuid | string | ✓ | body, query | UUID of the actor |
| clientId | string | query | Client ID for the Foundry world | |
| abilityUuid | string | body, query | The UUID of the specific ability (optional if abilityName provided) | |
| abilityName | string | body, query | The name of the ability if UUID not provided (optional if abilityUuid provided) | |
| targetUuid | string | body, query | The UUID of the target for the ability (optional) | |
| targetName | string | body, query | The name of the target if UUID not provided (optional) | |
| userId | string | query, body | Foundry 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
- JavaScript
- cURL
- Python
- TypeScript
- Emojicode
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);
curl -X POST 'http://localhost:3010/dnd5e/use-item?clientId=fvtt_099ad17ea199e7e3' \
-H "x-api-key: your-api-key-here" \
-H "Content-Type: application/json" \
-d '{"actorUuid":"Actor.S6Nh5SfYPcyyUhRg","abilityName":"Hammer"}'
import requests
base_url = 'http://localhost:3010'
path = '/dnd5e/use-item'
params = {
'clientId': 'fvtt_099ad17ea199e7e3'
}
url = f'{base_url}{path}'
response = requests.post(
url,
params=params,
headers={
'x-api-key': 'your-api-key-here',
'Content-Type': 'application/json'
},
json={
"actorUuid": "Actor.S6Nh5SfYPcyyUhRg",
"abilityName": "Hammer"
}
)
data = response.json()
print(data)
import axios from 'axios';
(async () => {
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 axios({
method: 'post',
headers: {
'x-api-key': 'your-api-key-here',
'Content-Type': 'application/json'
},
url,
data: {
"actorUuid": "Actor.S6Nh5SfYPcyyUhRg",
"abilityName": "Hammer"
}
});
const data = response.data;
console.log(data);
})();
📦 sockets 🏠
💭 Emojicode HTTP Client
💭 Compile: emojicodec example.🍇 -o example
💭 Run: ./example
🏁 🍇
💭 Connection settings
🔤localhost🔤 ➡️ host
3010 ➡️ port
🔤/dnd5e/use-item🔤 ➡️ path
💭 Query parameters
🔤clientId=fvtt_099ad17ea199e7e3🔤 ➡️ clientId
🔤?🧲clientId🧲🔤 ➡️ queryString
💭 Request body
🔤{"actorUuid":"Actor.S6Nh5SfYPcyyUhRg","abilityName":"Hammer"}🔤 ➡️ body
💭 Build HTTP request
🔤POST /dnd5e/use-item🧲queryString🧲 HTTP/1.1❌r❌nHost: localhost:3010❌r❌nx-api-key: your-api-key-here❌r❌nContent-Type: application/json❌r❌nContent-Length: 61❌r❌n❌r❌n🧲body🧲🔤 ➡️ request
💭 Connect and send
🍺 🆕📞 host port❗ ➡️ socket
🍺 💬 socket 📇 request❗❗
💭 Read and print response
🍺 👂 socket 4096❗ ➡️ data
😀 🍺 🔡 data❗❗
💭 Close socket
🚪 socket❗
🍉
Response
Status: 200
{ "type": "use-item-result", "requestId": "use-item_1778896443466", "data": { "uuid": "Actor.S6Nh5SfYPcyyUhRg", "ability": "Hammer", "result": "YhCd8mEeW2Hp60Xc" }}