Skip to main content
POST
/
spawn
create entity with optional components
curl --request POST \
  --url http://localhost:3917/spawn \
  --header 'Content-Type: application/json' \
  --data '
{
  "agent_id": 1,
  "ai_patrol": [
    [
      123
    ]
  ],
  "building_type": "<string>",
  "collider": {
    "hx": 123,
    "hy": 123,
    "hz": 123,
    "shape": "Aabb"
  },
  "color": "<string>",
  "combat": true,
  "combat_cooldown": 123,
  "combat_damage": 123,
  "combat_range": 123,
  "combat_speed": 123,
  "combat_style": "<string>",
  "gold": 123,
  "gold_bounty": 123,
  "health": 123,
  "lane": "<string>",
  "mesh": "<string>",
  "physics_body": "<string>",
  "player": true,
  "position": [
    123
  ],
  "role": "<string>",
  "scale": [
    123
  ],
  "spawn_point": 1,
  "team": 1,
  "velocity": {
    "linear": [
      123
    ],
    "angular": [
      123
    ]
  },
  "xp_bounty": 1
}
'
{
  "entity_generation": 0,
  "entity_id": 1
}

Body

application/json
agent_id
integer<int32> | null
Required range: x >= 0
ai_patrol
number<float>[][] | null

AI patrol waypoints as colon-separated "x,y,z:x,y,z"

building_type
string | null

Building type (e.g. "tier1_tower", "melee_barracks", "ancient"). When set, attaches BuildingStats, BackdoorProtection, and TowerAggro.

collider
object
color
string | null
combat
boolean | null
combat_cooldown
number<float> | null
combat_damage
number<float> | null
combat_range
number<float> | null
combat_speed
number<float> | null
combat_style
string | null

"melee" (default) or "stationary" (towers)

gold
integer<int32> | null

Starting gold

gold_bounty
integer<int32> | null

Gold bounty awarded to killer

health
number<float> | null
lane
string | null

Lane assignment for buildings: "top", "mid", or "bot".

mesh
string | null
physics_body
string | null
player
boolean | null

Mark this entity as the player-controlled hero

position
number<float>[] | null
role
string | null

Entity role: hero, minion, tower, structure

scale
number<float>[] | null
spawn_point
integer<int32> | null

Spawn point for team (marks this entity as a respawn location)

Required range: x >= 0
team
integer<int32> | null
Required range: x >= 0
velocity
object
xp_bounty
integer<int32> | null

XP bounty awarded to killer

Required range: x >= 0

Response

201 - application/json

Entity spawned.

entity_generation
integer<int32>
required
Required range: x >= 0
entity_id
integer<int32>
required
Required range: x >= 0