Skip to main content

entity

GET /entity/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)
selectedbooleanqueryWhether to get the selected entity
actorbooleanqueryReturn the actor of specified entity

Returns

object - Entity details object containing requested information

Example Request

GET /entity/get


POST /entity/create

Create a new entity This endpoint creates a new entity in the Foundry world.

Parameters

NameTypeRequiredSourceDescription
clientIdstringqueryClient ID for the Foundry world
entityTypestringbodyDocument type of entity to create (Scene, Actor, Item, JournalEntry, RollTable, Cards, Macro, Playlist, ext.)
dataobjectbodyData for the new entity
folderstringbodyOptional folder UUID to place the new entity in

Returns

object - Result of the entity creation operation

Example Request

POST /entity/create
Content-Type: application/json

{
"entityType": "example-value",
"data": {
"key": "value"
},
"folder": "example-value"
}

PUT /entity/update

Update an existing entity This endpoint updates an existing entity in the Foundry world.

Parameters

NameTypeRequiredSourceDescription
clientIdstringqueryClient ID for the Foundry world
dataobjectbodyData to update the entity with
uuidstringqueryUUID of the entity to update (optional if selected=true)
selectedbooleanqueryWhether to update the selected entity
actorbooleanqueryUpdate the actor of selected entity when selected=true

Returns

object - Result of the entity update operation

Example Request

PUT /entity/update
Content-Type: application/json

{
"data": {
"key": "value"
}
}

DELETE /entity/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 delete (optional if selected=true)
selectedbooleanqueryWhether to delete the selected entity

Returns

object - Result of the entity deletion operation

Example Request

DELETE /entity/delete
Content-Type: application/json



POST /entity/give

Give an item to an entity This endpoint gives an item to a specified entity. Optionally, removes the item from the giver.

Parameters

NameTypeRequiredSourceDescription
clientIdstringbody, queryClient ID for the Foundry world
fromUuidstringbodyUUID of the entity giving the item
toUuidstringbodyUUID of the entity receiving the item
selectedbooleanbodyWhether to give to the selected token's actor
itemUuidstringbodyUUID of the item to give (optional if itemName provided)
itemNamestringbodyName of the item to give (search with Quick Insert if UUID not provided)
quantitynumberbodyQuantity of the item to give (negative values decrease quantity to 0)

Returns

object - Result of the item giving operation

Example Request

POST /entity/give
Content-Type: application/json

{
"clientId": "example-value",
"fromUuid": "example-value",
"toUuid": "example-value"
}

POST /remove

Remove an item from an entity This endpoint removes an item from a specified entity.

Parameters

NameTypeRequiredSourceDescription
clientIdstringbody, queryClient ID for the Foundry world
actorUuidstringbodyUUID of the actor to remove the item from (optional if selected=true)
selectedbooleanbodyWhether to remove from the selected token's actor
itemUuidstringbodyUUID of the item to remove
itemNamestringbodyName of the item to remove (search with Quick Insert if UUID not provided)
quantitynumberbodyQuantity of the item to remove

Example Request

POST /remove
Content-Type: application/json

{
"clientId": "example-value",
"actorUuid": "example-value",
"selected": true
}

POST /entity/decrease

Decrease an attribute This endpoint decreases an attribute of a specified entity.

Parameters

NameTypeRequiredSourceDescription
clientIdstringqueryClient ID for the Foundry world
attributestringbodyThe attribute data path to decrease (e.g., "system.attributes.hp.value")
amountnumberbodyThe amount to decrease the attribute by
uuidstringqueryUUID of the entity to decrease the attribute for (optional if selected=true)
selectedbooleanqueryWhether to decrease the attribute for the selected entity

Returns

object - Result of the attribute decrease operation

Example Request

POST /entity/decrease
Content-Type: application/json

{
"attribute": "example-value",
"amount": 123
}

POST /entity/increase

Increase an attribute This endpoint increases an attribute of a specified entity.

Parameters

NameTypeRequiredSourceDescription
clientIdstringqueryClient ID for the Foundry world
attributestringbodyThe attribute data path to increase (e.g., "system.attributes.hp.value")
amountnumberbodyThe amount to increase the attribute by
uuidstringqueryUUID of the entity to increase the attribute for (optional if selected=true)
selectedbooleanqueryWhether to increase the attribute for the selected entity

Returns

object - Result of the attribute increase operation

Example Request

POST /entity/increase
Content-Type: application/json

{
"attribute": "example-value",
"amount": 123
}

POST /entity/kill

Kill an entity Marks an entity as killed in the combat tracker, gives it the "dead" status, and sets its health to 0 in the Foundry world.

Parameters

NameTypeRequiredSourceDescription
clientIdstringqueryClient ID for the Foundry world
uuidstringqueryUUID of the entity to kill (optional if selected=true)
selectedbooleanqueryWhether to kill the selected entity

Returns

object - Result of the entity kill operation

Example Request

POST /entity/kill
Content-Type: application/json