Skip to content

🧠 Pawns & AI API

This section covers reading, spawning, editing, and controlling pawns, as well as managing group AI behavior (Lords).

Pawn Controller

The Pawn Controller is a Read-Only interface for retrieving detailed statistics about colonists, prisoners, animals, and enemies.

It provides a deep dive into:

  • Needs: Hunger, Rest, Recreation.
  • Bio: Age, Traits, Backstory.
  • Work: Current job, priorities, and schedules.

GET
/api/v2/colonists/detailed

Retrieves a comprehensive list of all colonists with detailed statistics, including needs (sleep, joy, beauty), work priorities, and medical status.

Cache Policy

This endpoint is cached server-side for 1800 game ticks (~30 seconds) to reduce performance impact on the game loop.

Example:

curl --request GET \
--url http://localhost:8765/api/v2/colonists/detailed

Response:

{
    "success": true,
    "data": [
        {
            "pawn": {
                "id": 101,
                "name": "Lumi",
                "gender": "Female",
                "age": 25,
                "health": 1.0,
                "mood": 0.85,
                "hunger": 0.2,
                "position": {
                    "x": 10,
                    "y": 0,
                    "z": 15
                }
            },
            "detailes": {
                "body_size": 1.0,
                "sleep": 0.9,
                "comfort": 0.8,
                "beauty": 0.5,
                "joy": 0.75,
                "energy": 0.8,
                "drugs_desire": 0.0,
                "surrounding_beauty": 1.2,
                "fresh_air": 1.0,
                "work_info": {
                    "job": "Harvesting",
                    "work_speed": 1.1
                },
                "policies_info": {
                    "food": "Lavish",
                    "clothing": "Anything"
                },
                "medical_info": {
                    "in_pain": false,
                    "bleeding_rate": 0.0
                },
                "social_info": {
                    "marital_status": "Single"
                }
            }
        }
    ],
    "timestamp": "2025-12-11T19:46:05.7088803Z"
}


GET
/api/v2/colonist/detailed

Retrieves detailed statistics for a single colonist identified by their ID. Unlike the bulk endpoint, this request fetches real-time data without caching.

Example:

curl --request GET \
--url "http://localhost:8765/api/v2/colonist/detailed?id=101"

Response:

{
    "success": true,
    "data": {
        "pawn": {
            "id": 101,
            "name": "Lumi",
            "gender": "Female",
            "age": 25,
            "health": 1.0,
            "mood": 0.85,
            "hunger": 0.2,
            "position": {
                "x": 10,
                "y": 0,
                "z": 15
            }
        },
        "detailes": {
            "body_size": 1.0,
            "sleep": 0.9,
            "comfort": 0.8,
            "beauty": 0.5,
            "joy": 0.75,
            "energy": 0.8,
            "drugs_desire": 0.0,
            "surrounding_beauty": 1.2,
            "fresh_air": 1.0,
            "work_info": {
                "job": "Harvesting",
                "work_speed": 1.1
            },
            "policies_info": {
                "food": "Lavish",
                "clothing": "Anything"
            },
            "medical_info": {
                "in_pain": false,
                "bleeding_rate": 0.0
            },
            "social_info": {
                "marital_status": "Single"
            }
        }
    },
    "timestamp": "2025-12-11T19:46:05.7088803Z"
}


GET
/api/v1/colonists

Retrieves a list of all colonists in the player's faction, including their skills, traits, health, mood, and current activities.

Example:

curl --request GET \
--url 'http://localhost:8765/api/v1/colonists'

Response:

{
    "success": true,
    "data": [
        {
            "id": 1011,
            "name": "Walters",
            "gender": "Male",
            "age": 13,
            "health": 1.0,
            "mood": 0.7448001,
            "hunger": 0.663999736,
            "position": {
                "x": 71,
                "y": 0,
                "z": 94
            }
        },
        {
            "id": 1014,
            "name": "Nordi",
            "gender": "Male",
            "age": 61,
            "health": 1.0,
            "mood": 0.559999764,
            "hunger": 0.663999736,
            "position": {
                "x": 74,
                "y": 0,
                "z": 91
            }
        },
        {
            "id": 1017,
            "name": "Casey",
            "gender": "Male",
            "age": 41,
            "health": 1.0,
            "mood": 0.55,
            "hunger": 0.667999744,
            "position": {
                "x": 68,
                "y": 0,
                "z": 95
            }
        }
    ],
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-11T20:00:34.2760128Z"
}


GET
/api/v1/colonist

Retrieves a info about single colonist in the player's faction.

Example:

curl --request GET \
--url 'http://localhost:8765/api/v1/colonist?id=1020'

Response:

{
    "success": true,
    "data": {
        "id": 1040,
        "name": "Blake",
        "gender": "Male",
        "age": 31,
        "health": 1.0,
        "mood": 0.5072,
        "hunger": 0.796,
        "position": {
        "x": 63,
        "y": 0,
        "z": 88
        }
    },
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-11T20:09:41.7078214Z"
}


GET
/api/v1/colonists/detailed

Retrieves a detailed list of all colonists in the player's faction, including their skills, traits, health, mood, and current activities.

Example:

curl --request GET \
--url http://localhost:8765/api/v1/colonists/detailed

Response:

{
    "success": true,
    "data": [
        {
            "colonist": {
                "id": 1020,
                "name": "Lumi",
                "gender": "Female",
                "age": 25,
                "health": 1.0,
                "mood": 0.85,
                "hunger": 0.2,
                "position": { "x": 10, "y": 0, "z": 15 }
            },
            "body_size": 1.0,
            "sleep": 0.9,
            "comfort": 0.8,
            "beauty": 0.5,
            "joy": 0.75,
            "energy": 0.8,
            "drugs_desire": 0.0,
            "surrounding_beauty": 1.2,
            "fresh_air": 1.0,
            "colonist_work_info": {
                "job": "Harvesting",
                "work_speed": 1.1
            },
            "policies_info": {
                "food": "Lavish",
                "clothing": "Anything"
            },
            "colonist_medical_info": {
                "in_pain": false,
                "bleeding_rate": 0.0
            },
            "social_info": {
                "marital_status": "Single"
            }
        }
    ],
    "timestamp": "2025-12-11T19:46:05.7088803Z"
}


GET
/api/v1/colonist/detailed

Retrieves detailed info about a single colonist in the player's faction by ID.

Example:

curl --request GET \
--url "http://localhost:8765/api/v1/colonist/detailed?id=1020"

Response:

{
    "success": true,
    "data": {
        "colonist": {
            "id": 1020,
            "name": "Lumi",
            "gender": "Female",
            "age": 25,
            "health": 1.0,
            "mood": 0.85,
            "hunger": 0.2,
            "position": { "x": 10, "y": 0, "z": 15 }
        },
        "body_size": 1.0,
        "sleep": 0.9,
        "comfort": 0.8,
        "beauty": 0.5,
        "joy": 0.75,
        "energy": 0.8,
        "drugs_desire": 0.0,
        "surrounding_beauty": 1.2,
        "fresh_air": 1.0,
        "colonist_work_info": {
            "job": "Harvesting",
            "work_speed": 1.1
        },
        "policies_info": {
            "food": "Lavish",
            "clothing": "Anything"
        },
        "colonist_medical_info": {
            "in_pain": false,
            "bleeding_rate": 0.0
        },
        "social_info": {
            "marital_status": "Single"
        }
    },
    "timestamp": "2025-12-11T19:46:05.7088803Z"
}


GET
/api/v1/colonist/opinion-about

Retrieves the opinion of one colonist about another specified colonist. This endpoint provides insight into interpersonal relationships within the colony, returning two integer values: Opinion (the opinion of the colonist identified by id about the colonist identified by other_id) and OpinionAboutMe (the opinion of the colonist identified by other_id about the colonist identified by id).

Example:

curl --request GET \
--url 'http://localhost:8765/api/v1/colonist/opinion-about?id=1020&other_id=964'

Response:

{
    "success": true,
    "data": {
        "opinion": 75,
        "opinion_about_me": 50
    },
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-12T10:00:00.0000000Z"
}


POST
/api/v1/colonist/time-assignment

Sets or modifies the time assignment (schedule) for one or more colonists. Time assignments in RimWorld define the daily schedule for each colonist, determining when they sleep, work, have recreation, or anything else.

Example:

curl --request POST \
--url http://localhost:8765/api/v1/colonist/time-assignment \
--header 'content-type: application/json' \
--data '{
    "pawn_id": 99,
    "hour": 14,
    "assignment": "Joy"
}'

Request:

{
    "pawn_id": 99,
    "hour": 14,
    "assignment": "Joy"
}

Response:

{
    "success": true,
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-10T19:53:16.733319Z"
}


GET
/api/v1/colonists/positions

Retrieves the real-time coordinates of all colonists across all maps.

Performance Note: This endpoint is heavily cached (100ms TTL) and optimized for high-frequency polling. It returns a lightweight DTO containing only essential location data, making it ideal for updating minimaps or live trackers.

Example:

curl --request GET \
--url http://localhost:8765/api/v1/colonists/positions

Response:

{
    "success": true,
    "data": [
        {
            "id": 5612,
            "map_id": 0,
            "x": 125,
            "z": 110
        },
        {
            "id": 5613,
            "map_id": 0,
            "x": 128,
            "z": 112
        },
        {
            "id": 8901,
            "map_id": 1,
            "x": 45,
            "z": 200
        }
    ],
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-14T14:22:15.500Z"
}


GET
/api/v1/colonist/inventory

Retrieves a detailed list of all items, apparel, and equipment currently in a colonist's inventory. This includes items carried, worn apparel, and equipped weapons/tools.

Example:

curl --request GET \
--url 'http://localhost:8765/api/v1/colonist/inventory?id=1020'

Response:

{
    "success": true,
    "data": {
        "Items": [
            {
                "thing_id": 4895,
                "def_name": "MealSurvivalPack",
                "label": "packaged survival meal",
                "categories": ["FoodMeals"],
                "position": { "x": 13, "y": 0, "z": 62 },
                "stack_count": 5,
                "market_value": 24.0,
                "is_forbidden": false,
                "quality": -1,
                "hit_points": 50,
                "max_hit_points": 50
            }
        ],
        "Apparels": [
            {
                "thing_id": 1234,
                "def_name": "Apparel_Pants",
                "label": "pants",
                "categories": ["Apparel"],
                "position": { "x": 0, "y": 0, "z": 0 },
                "stack_count": 1,
                "market_value": 50.0,
                "is_forbidden": false,
                "quality": 3,
                "hit_points": 75,
                "max_hit_points": 100
            }
        ],
        "Equipment": [
            {
                "thing_id": 5678,
                "def_name": "Weapon_AssaultRifle",
                "label": "assault rifle",
                "categories": ["Weapons"],
                "position": { "x": 0, "y": 0, "z": 0 },
                "stack_count": 1,
                "market_value": 700.0,
                "is_forbidden": false,
                "quality": 4,
                "hit_points": 120,
                "max_hit_points": 150
            }
        ]
    },
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-12T10:00:00.0000000Z"
}


GET
/api/v1/colonist/body/image

Retrieves base64-encoded images and color information for a colonist's body and head. This endpoint is useful for rendering or analyzing colonist appearance.

Example:

curl --request GET \
--url 'http://localhost:8765/api/v1/colonist/body/image?id=1020'

Response:

{
    "success": true,
    "data": {
        "body_image": "base64_encoded_body_image_string",
        "body_color": "RGBA(1.000, 1.000, 1.000, 1.000)",
        "head_image": "base64_encoded_head_image_string",
        "head_color": "RGBA(1.000, 1.000, 1.000, 1.000)"
    },
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-12T10:00:00.0000000Z"
}


POST
/api/v1/colonist/work-priority

Sets or adjusts the work-type priorities for one or more colonists. Work priorities determine which tasks a colonist will perform during their work hours, with each work type (e.g., Firefighting, Construction, Growing, Crafting) assigned a priority level from 1 (highest) to 4 (lowest) or disabled (0).

Example:

curl --request POST \
--url http://localhost:8765/api/v1/colonist/work-priority \
--header 'content-type: application/json' \
--data '{
    "id": 99,
    "work": "Cooking",
    "priority": 1
}'

Request:

{
    "id": 99,
    "work": "Cooking",
    "priority": 1
}

Response:

{
    "success": true,
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-10T19:53:16.733319Z"
}


POST
/api/v1/colonists/work-priority

Sets or adjusts work-type priorities for multiple colonists in a single request.

Example:

curl --request POST \
--url http://localhost:8765/api/v1/colonists/work-priority \
--header 'content-type: application/json' \
--data '[
    { "id": 37586, "work": "Patient", "priority": 5 },
    { "id": 67969, "work": "Hauling", "priority": 1 }
]'

Request:

[
    { "id": 37586, "work": "Patient", "priority": 5 },
    { "id": 67969, "work": "Hauling", "priority": 1 }
]

Response:

{
    "success": true,
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-10T19:53:16.733319Z"
}


POST
/api/v1/jobs/make/equip

Creates a job for a colonist to equip a specific item from available inventory or the surrounding area. This endpoint queues an immediate "equip" task, instructing the colonist to pick up and wear/wield the designated apparel or weapon.

Example:

curl --request POST \
--url 'http://localhost:8765/api/v1/jobs/make/equip?map_id=0&pawn_id=1011&item_id=4849' \
--header 'content-type: application/json'

Response:

{
    "success": true,
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-10T19:53:16.733319Z"
}


GET
/api/v1/pawn/portrait/image

Retrieves a base64-encoded portrait image of a specific pawn. This endpoint allows specifying the desired width, height, and viewing direction for the portrait.

Example:

curl --request GET \
--url 'http://localhost:8765/api/v1/pawn/portrait/image?pawn_id=1020&width=128&height=128&direction=South'

Response:

{
    "success": true,
    "data": {
        "result": "success",
        "image_base64": "base64_encoded_portrait_image_string"
    },
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-12T10:00:00.0000000Z"
}


GET
/api/v1/trait-def

Retrieves detailed information about a specific trait definition. Traits define a pawn's inherent characteristics and can influence their skills, mood, and interactions.

Example:

curl --request GET \
--url 'http://localhost:8765/api/v1/trait-def?name=Ascetic'

Response:

{
    "success": true,
    "data": {
        "def_name": "Ascetic",
        "label": "ascetic",
        "description": "",
        "degree_datas": [
            {
                "label": "ascetic",
                "description": "{PAWN_nameDef} has forsaken physical comforts and enjoyments in favor of a simple, pure lifestyle. {PAWN_pronoun} will become unhappy if {PAWN_pronoun} has a bedroom that's too impressive. {PAWN_pronoun} also dislikes fancy food and prefers to eat raw. {PAWN_pronoun} never judges others by their appearance.",
                "degree": 0,
                "skill_gains": {},
                "stat_offsets": [],
                "stat_factors": [
                    {
                        "stat_def_name": "CertaintyLossFactor",
                        "value": 0.5
                    }
                ]
            }
        ],
        "conflicting_traits": [
            "Greedy",
            "Jealous",
            "Gourmand"
        ],
        "disabled_work_types": [],
        "disabled_work_tags": "None"
    },
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-12T10:00:00.0000000Z"
}


GET
/api/v1/time-assignments

Retrieves a list of all available time assignments that can be set for colonists. These assignments define daily schedules like 'Sleep', 'Work', 'Joy', etc.

Example:

curl --request GET \
--url 'http://localhost:8765/api/v1/time-assignments'

Response:

{
    "success": true,
    "data": [
        { "name": "Anything" },
        { "name": "Work" },
        { "name": "Joy" },
        { "name": "Sleep" },
        { "name": "Meditate" }
    ],
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-12T10:00:00.0000000Z"
}


GET
/api/v1/outfits

Retrieves a list of all defined outfits in the game, including their labels and associated item filters. Outfits dictate which apparel colonists will wear based on criteria like type, quality, and hit points.

Example:

curl --request GET \
--url 'http://localhost:8765/api/v1/outfits'

Response:

{
    "success": true,
    "data": [
        {
            "Id": 1,
            "Label": "Worker",
            "Filter": {
                "allowed_thing_def_names": [
                    "Apparel_CowboyHat",
                    "Apparel_BowlerHat",
                    "Apparel_TribalHeaddress",
                    "Apparel_Tuque",
                ],
                "disallowed_special_filter_def_names": ["AllowBurned"],
                "allowed_hit_points_min": 0.5,
                "allowed_hit_points_max": 1.0,
                "allowed_quality_min": "poor",
                "allowed_quality_max": "masterwork",
                "allowed_hit_points_configurable": true,
                "allowed_qualities_configurable": true
            }
        },
        {
            "id": 2,
            "label": "soldier",
            "filter": {
                "allowed_thing_def_names": [],
                "disallowed_special_filter_def_names": ["AllowSmeltable"],
                "allowed_hit_points_min": 0.8,
                "allowed_hit_points_max": 1.0,
                "allowed_quality_min": "good",
                "allowed_quality_max": "legendary",
                "allowed_hit_points_configurable": true,
                "allowed_qualities_configurable": true
            }
        }
    ],
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-12T10:00:00.0000000Z"
}


GET
/api/v1/work-list

Retrieves a comprehensive list of all defined work types in the game. Work types categorize tasks that colonists can perform, such as 'Hauling', 'Cooking', 'Mining', 'PlantCutting', etc.

Example:

curl --request GET \
--url 'http://localhost:8765/api/v1/work-list'

Response:

{
    "success": true,
    "data": {
        "work": [
            "Firefighter",
            "Patient",
            "Doctor",
            "PatientBedRest",
            "BasicWorker",
            "Warden",
            "Handling",
            "Cooking",
            "Hunting",
            "Construction",
            "Growing",
            "Mining",
            "PlantCutting",
            "Smithing",
            "Tailoring",
            "Art",
            "Crafting",
            "Hauling",
            "Cleaning",
            "Research",
            "Childcare",
            "DarkStudy"
        ]
    },
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-12T10:00:00.0000000Z"
}

Pawn Info Controller

The Pawn Info Controller provides detailed information about pawns.


GET
/api/v1/pawns/details

Gets detailed information about a pawn.


GET
/api/v1/pawns/inventory

Gets the inventory of a pawn.

Pawn Social Controller

The Pawn Social Controller manages interpersonal relationships, interactions, and opinions between pawns. It allows for inspecting social logs, managing familial bonds, and forcing social interactions.


GET
/api/v1/game/defs/interactions

Retrieves a list of all valid InteractionDef names in the game (e.g., Chitchat, Insult, KindWords).

Example:

curl --request GET \
--url http://localhost:8765/api/v1/game/defs/interactions

Response:

{
    "success": true,
    "data": [
        {
            "def_name": "Chitchat",
            "label": "chitchat",
            "description": "Casual conversation."
        },
        {
            "def_name": "Insult",
            "label": "insult",
            "description": "A direct insult."
        }
    ]
}


GET
/api/v1/pawns/interactions

Gets the real-time interaction readiness of a specific pawn, including the current cooldown status.

Example:

curl --request GET \
--url 'http://localhost:8765/api/v1/pawns/interactions?pawn_id=779'

Response:

{
    "success": true,
    "data": {
        "can_interact": true,
        "last_interaction_ticks": 45000,
        "cooldown_ticks": 0,
        "cooldown_days": 0.0
    }
}


GET
/api/v1/pawns/interactions/log

Retrieves the recent interaction history for a specific pawn. Supports an optional limit parameter (defaults to 50).

Example:

curl --request GET \
--url 'http://localhost:8765/api/v1/pawns/interactions/log?pawn_id=779&limit=5'

Response:

{
    "success": true,
    "data": {
        "pawn_id": 779,
        "interactions": [
            {
                "initiator_id": 779,
                "initiator_name": "Lumi",
                "recipient_id": 780,
                "recipient_name": "Blake",
                "interaction_def_name": "Chitchat",
                "interaction_label": "chitchat",
                "text": "Lumi and Blake talked about meteorology.",
                "ticks": 152000,
                "time_ago": "2 hours ago"
            }
        ],
        "count": 1
    }
}


GET
/api/v1/pawns/relations

Retrieves all established familial and romantic relationships for this pawn (e.g., Parent, Child, Spouse, Lover).

Example:

curl --request GET \
--url 'http://localhost:8765/api/v1/pawns/relations?pawn_id=779'

Response:

{
    "success": true,
    "data": {
        "pawn_id": 779,
        "relations": [
            {
                "other_pawn_id": 780,
                "other_pawn_name": "Blake",
                "relation_def_name": "Spouse",
                "relation_label": "husband"
            }
        ]
    }
}


GET
/api/v1/pawns/opinions

Retrieves a list of this pawn's numerical opinion toward every other colonist, including a breakdown of thoughts and memories contributing to the score.

Example:

curl --request GET \
--url 'http://localhost:8765/api/v1/pawns/opinions?pawn_id=779'

Response:

{
    "success": true,
    "data": [
        {
            "target_pawn_id": 780,
            "target_pawn_name": "Blake",
            "opinion": 45,
            "breakdown": [
                {
                    "thought_def_name": "Pretty",
                    "label": "pretty",
                    "score": 20.0
                }
            ]
        }
    ]
}


POST
/api/v1/pawns/interactions/force

Forces a specific social interaction to occur immediately between two pawns.

Example:

curl --request POST \
--url http://localhost:8765/api/v1/pawns/interactions/force \
--header 'content-type: application/json' \
--data '{
    "initiator_id": 779,
    "recipient_id": 780,
    "interaction_def_name": "Chitchat"
}'

Request:

{
    "initiator_id": 779,
    "recipient_id": 780,
    "interaction_def_name": "Chitchat"
}

Response:

{
    "success": true,
    "errors": [],
    "warnings": [],
    "timestamp": "2026-04-14T12:00:00.000Z"
}


POST
/api/v1/pawns/relations/add

Instantly creates a permanent social bond (relation) between two pawns.

Example:

curl --request POST \
--url http://localhost:8765/api/v1/pawns/relations/add \
--header 'content-type: application/json' \
--data '{
    "pawn1_id": 779,
    "pawn2_id": 780,
    "relation_def_name": "Lover"
}'

Request:

{
    "pawn1_id": 779,
    "pawn2_id": 780,
    "relation_def_name": "Lover"
}

Response:

{
    "success": true,
    "errors": [],
    "warnings": [],
    "timestamp": "2026-04-14T12:00:00.000Z"
}


DELETE
/api/v1/pawns/relations/remove

Severs a specific social bond between two pawns.

Example:

curl --request DELETE \
--url 'http://localhost:8765/api/v1/pawns/relations/remove?pawn1_id=779&pawn2_id=780&relation_def_name=Lover'

Response:

{
    "success": true,
    "errors": [],
    "warnings": [],
    "timestamp": "2026-04-14T12:00:00.000Z"
}

Pawn Edit Controller

The Pawn Edit Controller allows for direct Mutation of entity data. Unlike the standard Pawn controller, this allows you to rewrite the fundamental properties of a character.

Experimental Feature

This API controller is experimental.

Common Uses:

  • Resurrection / Heal
  • Set Skill Level
  • Add/Remove Traits
  • Teleport

POST
/api/v1/pawn/edit/basic

Edits the basic information of a pawn, such as name, gender, and age.

curl --request POST \
--url http://localhost:8765/api/v1/pawn/edit/basic \
--header 'content-type: application/json' \
--data '{
    "pawn_id": 148,
    "nick_name": "Ace",
    "gender": "Male",
    "biological_age": 25
}'

Request:

{
    "pawn_id": 148,
    "name": "Ace",
    "first_name": "John",
    "last_name": "Doe",
    "nick_name": "Ace",
    "gender": "Male",
    "biological_age": 25,
    "chronological_age": 150
}

Response:

{
    "success": true,
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-31T14:05:16.1755723Z"
}


POST
/api/v1/pawn/edit/health

Edits the health of a pawn, allowing to heal injuries or cure diseases.

curl --request POST \
--url http://localhost:8765/api/v1/pawn/edit/health \
--header 'content-type: application/json' \
--data '{
    "pawn_id": 148,
    "heal_all_injuries": true,
    "restore_body_parts": true,
    "remove_all_diseases": true
}'

Request:

{
    "pawn_id": 148,
    "heal_all_injuries": true,
    "restore_body_parts": true,
    "remove_all_diseases": true
}

Response:

{
    "success": true,
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-31T14:05:16.1755723Z"
}


POST
/api/v1/pawn/edit/needs

Edits the needs of a pawn, such as hunger, rest, and mood. Values range from 0.0 to 1.0.

curl --request POST \
--url http://localhost:8765/api/v1/pawn/edit/needs \
--header 'content-type: application/json' \
--data '{
    "pawn_id": 148,
    "food": 1.0,
    "rest": 1.0,
    "mood": 1.0
}'

Request:

{
    "pawn_id": 148,
    "food": 1.0,
    "rest": 1.0,
    "mood": 1.0
}

Response:

{
    "success": true,
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-31T14:05:16.1755723Z"
}


POST
/api/v1/pawn/edit/skills

Edits the skills of a pawn, setting the level for specified skills.

curl --request POST \
--url http://localhost:8765/api/v1/pawn/edit/skills \
--header 'content-type: application/json' \
--data '{
    "pawn_id": 2356,
    "skills": [
        { "skill_name": "Shooting", "level": 20, "passion": 3 }
    ]
}'

Request:

{
    "pawn_id": 2356,
    "skills": [
        {
            "skill_name": "Shooting",
            "level": 20,
            "passion": 3
        },
        {
            "skill_name": "Medicine",
            "level": 15,
            "passion": 2
        },
        {
            "skill_name": "Melee",
            "level": 0,
            "passion": 1
        }
    ]
}

Response:

{
    "success": true,
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-31T12:36:12.432366Z"
}


POST
/api/v1/pawn/edit/traits

Edits the traits of a pawn, allowing to add or remove traits.

curl --request POST \
--url http://localhost:8765/api/v1/pawn/edit/traits \
--header 'content-type: application/json' \
--data '{
    "pawn_id": 148,
    "add_traits": [{ "trait_name": "Cannibal", "degree": 0 }],
    "remove_traits": ["Wimp"]
}'

Request:

{
    "pawn_id": 148,
    "add_traits": [
        {
            "trait_name": "Cannibal",
            "degree": 0
        },
        {
            "trait_name": "Industrious",
            "degree": 0
        }
    ],
    "remove_traits": [
        "Wimp",
        "Pyromaniac"
    ]
}

Response:

{
    "success": true,
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-31T14:05:16.1755723Z"
}


POST
/api/v1/pawn/edit/inventory

Edits the inventory of a pawn, allowing to add or remove items.

curl --request POST \
--url http://localhost:8765/api/v1/pawn/edit/inventory \
--header 'content-type: application/json' \
--data '{
    "pawn_id": 148,
    "clear_inventory": true,
    "add_items": [{ "def_name": "MealSimple", "count": 10 }]
}'

Request:

{
    "pawn_id": 148,
    "drop_inventory": false,
    "clear_inventory": true,
    "add_items": [
        {
            "def_name": "MealSimple",
            "count": 10
        },
        {
            "def_name": "MedicineHerbal",
            "count": 5
        }
    ]
}

Response:

{
    "success": true,
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-31T14:05:16.1755723Z"
}


POST
/api/v1/pawn/edit/apparel

Edits the apparel of a pawn. Useful for stripping prisoners or disarming enemies.

curl --request POST \
--url http://localhost:8765/api/v1/pawn/edit/apparel \
--header 'content-type: application/json' \
--data '{
    "pawn_id": 148,
    "drop_apparel": true,
    "drop_weapons": true
}'

Request:

{
    "pawn_id": 148,
    "drop_apparel": true,
    "drop_weapons": true
}

Response:

{
    "success": true,
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-31T14:05:16.1755723Z"
}


POST
/api/v1/pawn/edit/status

Edits the status of a pawn, such as drafting, killing or resurrecting.

curl --request POST \
--url http://localhost:8765/api/v1/pawn/edit/status \
--header 'content-type: application/json' \
--data '{
    "pawn_id": 148,
    "is_drafted": true
}'

Request:

{
    "pawn_id": 148,
    "is_drafted": true,
    "kill": false,
    "resurrect": false
}

Response:

{
    "success": true,
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-31T14:05:16.1755723Z"
}


POST
/api/v1/pawn/edit/position

Edits the position of a pawn, teleporting it to a new location.

curl --request POST \
--url http://localhost:8765/api/v1/pawn/edit/position \
--header 'content-type: application/json' \
--data '{
    "pawn_id": 148,
    "position": { "x": 100, "z": 100 }
}'

Request:

{
    "pawn_id": 148,
    "map_id": "0",
    "position": {
        "x": 100,
        "y": 0,
        "z": 100
    }
}

Response:

{
    "success": true,
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-31T14:05:16.1755723Z"
}


POST
/api/v1/pawn/edit/faction

Edits the faction of a pawn, for example making a prisoner a colonist.

curl --request POST \
--url http://localhost:8765/api/v1/pawn/edit/faction \
--header 'content-type: application/json' \
--data '{
    "pawn_id": 148,
    "make_colonist": true
}'

Request:

{
    "pawn_id": 148,
    "set_faction": "PlayerColony",
    "make_colonist": true,
    "make_prisoner": false,
    "release_prisoner": false
}

Response:

{
    "success": true,
    "errors": [],
    "warnings": [],
    "timestamp": "2025-12-31T14:05:16.1755723Z"
}

Pawn Job Controller

Focuses on overriding standard AI behaviors by forcing pawns to execute specific tasks.

Scope

This controller deals with immediate actions and direct job assignments. For configuring long-term work priorities, schedules, or drafting, see the PawnEditController or PawnController.

Capabilities:

  • Force a pawn to perform a specific action (Haul, Mine, Hunt).
  • Direct medical care by assigning doctors to patients.
  • Force injured or sick pawns into specific medical beds.

POST
/api/v1/pawn/job

Assign a specific job to a pawn by its JobDef name. You can optionally provide a target object (like a rock to mine or item to haul) or a target position on the map.

Discovering JobDefs

You can fetch a complete, up-to-date list of all available job definitions in your current game (including those added by mods) by making a GET request to the /api/v1/def/all endpoint and inspecting the job_defs array.

Current Job Limitations

Under the hood, RimWorld jobs can require up to three targets (targetA, targetB, targetC). Currently, this endpoint only supports single-target jobs (mapping to targetA). Jobs requiring multiple targets (e.g., hauling an item to a specific stockpile) are not yet supported. (Tip: Look at the Verse.JobMaker class in the RimWorld source code to see the various MakeJob overloads and how jobs are constructed and pooled internally).

Examples of currently supported JobDefs:

  • Goto (Movement/travel)
  • AttackMelee (Melee combat attacks)
  • ManTurret (Manning turret stations)
  • LayDown (Sleeping/resting)
  • PickupToHold (Picking up items to carry)
  • Clean (Cleaning filth)
  • PlaceNoCostFrame (Placing construction frames)
  • TendEntity (Tending to entities)
  • CastJump (Jump/cast abilities)
  • StandAndStare (Idle behavior)
  • Meditate (Meditation activities)

Example:

curl --request POST \
--url 'http://localhost:8765/api/v1/pawn/job' \
--header 'content-type: application/json' \
--data '{
    "pawn_id": 123,
    "job_def": "Mine",
    "target_thing_id": 456
}'

Request:

{
    "pawn_id": 123,
    "job_def": "Mine",
    "target_thing_id": 456,
    "target_position": {"x": 10, "y": 0, "z": 15}
}

Response:

{
    "success": true,
    "errors": [],
    "warnings": [],
    "timestamp": "2026-03-28T15:00:00.0000000Z"
}


POST
/api/v1/pawn/medical/tend

Assign a doctor to tend to a specific patient. If doctor_pawn_id is omitted, the game will automatically search for and assign the best available doctor based on the Medicine skill.

Example:

curl --request POST \
--url 'http://localhost:8765/api/v1/pawn/medical/tend' \
--header 'content-type: application/json' \
--data '{
    "patient_pawn_id": 123,
    "doctor_pawn_id": 456
}'

Request:

{
    "patient_pawn_id": 123,
    "doctor_pawn_id": 456
}

Response:

{
    "success": true,
    "errors": [],
    "warnings": [],
    "timestamp": "2026-03-28T15:05:00.0000000Z"
}


POST
/api/v1/pawn/medical/bed-rest

Force a pawn to enter bed rest. You can optionally specify a particular bed by passing its bed_building_id. If omitted, the pawn will find the best available medical bed themselves.

Example:

curl --request POST \
--url 'http://localhost:8765/api/v1/pawn/medical/bed-rest' \
--header 'content-type: application/json' \
--data '{
    "patient_pawn_id": 123,
    "bed_building_id": 789
}'

Request:

{
    "patient_pawn_id": 123,
    "bed_building_id": 789
}

Response:

{
    "success": true,
    "errors": [],
    "warnings": [],
    "timestamp": "2026-03-28T15:10:00.0000000Z"
}

Pawn Spawn Controller

The Pawn Spawn Controller is used to create and spawn new pawns in the game world.


POST
/api/v1/pawn/spawn

Spawns a new pawn.

Request:

{
    "pawn_kind": "Mercenary_Gunner",
    "faction": "OutlanderCivil",
    "position": {"x": 11, "y": 0, "z": 11},
    "biological_age": 25
}

Response:

{
    "success":true,
    "data": {
        "pawn_id":39473,
        "name":"Nitro"
    },
    "errors":[],"warnings":[],
    "timestamp":"2025-12-31T12:32:16.5760065Z"
}

Lord Controller

The Lord Controller is responsible for managing AI Lords, which are high-level AI constructs that command groups of pawns.


POST
/api/v1/lords/create

Creates a new AI Lord with a specified job.

Request:

{
    "faction": "AncientsHostile",
    "pawn_ids": [39395],
    "job_type": "AssaultThings",
    "target_ids": [39387]
}

Response:

{
    "success":true,
    "data":
    {
        "lord_id":0,
        "member_count":1
    },
    "errors":[],
    "warnings":[],
    "timestamp":"2025-12-31T11:39:54.3651293Z"
}