Skip to main content

Entity

GET /get

Get entity details

This endpoint retrieves the details of a specific entity.

Parameters

NameTypeRequiredSourceDescription
clientIdstringqueryClient ID for the Foundry world
uuidstringqueryUUID of the entity to retrieve (optional if selected=true)
selectedbooleanquery, bodyWhether to get the selected entity
actorbooleanqueryReturn the actor of specified entity
userIdstringquery, bodyFoundry user ID or username to scope permissions (omit for GM-level access)

Returns

object - Entity details object containing requested information

Try It Out


POST /create

Create a new entity

This endpoint creates a new entity in the Foundry world.

Parameters

NameTypeRequiredSourceDescription
entityTypestringbodyDocument type of entity to create (Scene, Actor, Item, JournalEntry, RollTable, Cards, Macro, Playlist, ext.)
dataobjectbodyData for the new entity
clientIdstringqueryClient ID for the Foundry world
folderstringbodyOptional folder UUID to place the new entity in
keepIdbooleanbody, queryIf true, preserve the _id from the provided data instead of generating a new one
overridebooleanbody, queryIf true and keepId is set, replace any existing entity with the same ID
userIdstringquery, bodyFoundry user ID or username to scope permissions (omit for GM-level access)

Returns

object - Result of the entity creation operation

Try It Out


PUT /update

Update an entity

This endpoint updates an existing entity in the Foundry world.

Parameters

NameTypeRequiredSourceDescription
dataobjectbodyObject containing the fields to update
clientIdstringqueryClient ID for the Foundry world
uuidstringqueryUUID of the entity to retrieve (optional if selected=true)
selectedbooleanquery, bodyWhether to get the selected entity
actorbooleanqueryWhether to update the actor of specified entity
userIdstringquery, bodyFoundry user ID or username to scope permissions (omit for GM-level access)

Returns

object - Result of the entity update operation

Try It Out


DELETE /delete

Delete an entity

This endpoint deletes an entity from the Foundry world.

Parameters

NameTypeRequiredSourceDescription
clientIdstringqueryClient ID for the Foundry world
uuidstringqueryUUID of the entity to retrieve (optional if selected=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 entity deletion operation

Try It Out


POST /give

Give an item to another entity

Transfers an item from one entity to another.

Parameters

NameTypeRequiredSourceDescription
clientIdstringqueryClient ID for the Foundry world
fromUuidstringbodyUUID of the entity giving the item
toUuidstringbodyUUID of the entity receiving the item
selectedbooleanquery, bodyWhether to get the selected entity
itemUuidstringbodyUUID of the item to give
itemNamestringbodyName of the item to give (alternative to itemUuid)
quantitynumberbodyQuantity of items to give
userIdstringquery, bodyFoundry user ID or username to scope permissions (omit for GM-level access)

Returns

object - Result of the give operation

Try It Out


POST /remove

Remove an item from an entity

Removes an item from an entity's inventory.

Parameters

NameTypeRequiredSourceDescription
clientIdstringqueryClient ID for the Foundry world
actorUuidstringbodyUUID of the actor to remove the item from
selectedbooleanquery, bodyWhether to get the selected entity
itemUuidstringbodyUUID of the item to remove
itemNamestringbodyName of the item to remove (alternative to itemUuid)
quantitynumberbodyQuantity of items to remove
userIdstringquery, bodyFoundry user ID or username to scope permissions (omit for GM-level access)

Returns

object - Result of the remove operation

Try It Out


POST /decrease

Decrease an attribute

Decreases a numeric attribute of an entity by the specified amount.

Parameters

NameTypeRequiredSourceDescription
attributestringbodyThe attribute to decrease (e.g., hp.value)
amountnumberbodyThe amount to decrease by
clientIdstringqueryClient ID for the Foundry world
uuidstringqueryUUID of the entity to retrieve (optional if selected=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 decrease operation

Try It Out


POST /increase

Increase an attribute

Increases a numeric attribute of an entity by the specified amount.

Parameters

NameTypeRequiredSourceDescription
attributestringbodyThe attribute to increase (e.g., hp.value)
amountnumberbodyThe amount to increase by
clientIdstringqueryClient ID for the Foundry world
uuidstringqueryUUID of the entity to retrieve (optional if selected=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 increase operation

Try It Out


POST /kill

Kill an entity

Sets the entity's HP to 0.

Parameters

NameTypeRequiredSourceDescription
clientIdstringqueryClient ID for the Foundry world
uuidstringqueryUUID of the entity to retrieve (optional if selected=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 kill operation

Try It Out