Skip to main content
PATCH
/
context
/
region
/
{game_id}
/
{world_id}
/
{region_id}
Update region details
curl --request PATCH \
  --url https://app.npcbuilder.com/api/context/region/{game_id}/{world_id}/{region_id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "lore": "A dense forest with hidden secrets.",
  "name": "Mystic Forest",
  "weather": "Rainy",
  "culture": "Druidic traditions",
  "politicalStability": "stable"
}'
{
  "message": "Region: region789 has been updated with the following context.",
  "region_id": "region789",
  "region_context": {
    "lore": "A dense forest with hidden secrets.",
    "name": "Mystic Forest",
    "weather": "Rainy",
    "culture": "Druidic traditions",
    "politicalStability": "stable"
  }
}

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"

region_id
string
required

The unique identifier for the region.

Example:

"region789"

Query Parameters

session_id
string

(Optional) The player's session ID.

Example:

"60Z5aZjIuFlyYbjbZZKe"

Body

application/json

The region data fields to update.

lore
string

Updated lore of the region.

Example:

"A dense forest with hidden secrets."

name
string

Updated name of the region.

Example:

"Mystic Forest"

weather
string

Updated weather conditions.

Example:

"Rainy"

culture
string

Updated cultural aspects.

Example:

"Druidic traditions"

politicalStability
enum<string>

Updated political stability status.

Available options:
none,
highlyStable,
stable,
moderatelyStable,
unstable,
highlyUnstable,
anarchy
Example:

"stable"

Response

Region updated successfully.

message
string

Confirmation message after updating the region.

Example:

"Region: region789 has been updated with the following context."

region_id
string

UID of the region.

Example:

"region789"

region_context
object

The context details of the created region.

Example:
{
"lore": "A dense forest with hidden secrets.",
"name": "Mystic Forest",
"weather": "Rainy",
"culture": "Druidic traditions",
"politicalStability": "stable"
}
I