Skip to main content
PATCH
/
context
/
location
/
{game_id}
/
{world_id}
/
{location_id}
Update location details
curl --request PATCH \
  --url https://app.npcbuilder.com/api/context/location/{game_id}/{world_id}/{location_id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "lore": "A bustling market town.",
  "name": "Rivertown",
  "role": "Trade hub"
}'
{
  "message": "Location: location789 has been updated with the following context.",
  "location_id": "location789",
  "location_context": {
    "lore": "A bustling market town.",
    "name": "Rivertown",
    "role": "Trade hub"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

game_id
string
required

The unique identifier for the game.

Example:

"game123"

world_id
string
required

The unique identifier for the world.

Example:

"world456"

location_id
string
required

The unique identifier for the location.

Example:

"location789"

Query Parameters

session_id
string

(Optional) The player's session ID.

Example:

"60Z5aZjIuFlyYbjbZZKe"

Body

application/json

The location data fields to update.

lore
string

Updated background lore of the location.

Example:

"A bustling market town."

name
string

Updated name of the location.

Example:

"Rivertown"

role
string

Updated role of the location.

Example:

"Trade hub"

Response

Location updated successfully.

message
string

Confirmation message after updating the location.

Example:

"Location: location789 has been updated with the following context."

location_id
string

UID of the location.

Example:

"location789"

location_context
object

The context details of the created location.

Example:
{
"lore": "A bustling market town.",
"name": "Rivertown",
"role": "Trade hub"
}
I