Skip to main content
POST
/
context
/
location
/
{game_id}
/
{world_id}
/
{region_id}
Create a new location
curl --request POST \
  --url https://app.npcbuilder.com/api/context/location/{game_id}/{world_id}/{region_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 created 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"

region_id
string
required

The unique identifier for the region where the location will be in.

Example:

"location789"

Query Parameters

session_id
string

(Optional) The player's session ID.

Example:

"60Z5aZjIuFlyYbjbZZKe"

Body

application/json

The location data required to create a new location.

lore
string

Background lore or description of the location.

Example:

"A bustling market town."

name
string

The name of the location.

Example:

"Rivertown"

role
string

The role or function of the location (e.g., trade hub, residential area).

Example:

"Trade hub"

Response

Location created successfully.

message
string

Confirmation message after creating the location.

Example:

"Location: location789 has been created 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