Skip to main content
POST
/
v1
/
npc
Register a spawn event for an NPC
curl --request POST \
  --url https://api.pixocracy.io/v1/npc \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "instanceIdentifier": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "name": "<string>",
  "type": "natural"
}'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z",
  "deletedAt": "2023-11-07T05:31:56Z",
  "npc": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z",
    "deletedAt": "2023-11-07T05:31:56Z",
    "name": "<string>",
    "uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "instance": {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "createdAt": "2023-11-07T05:31:56Z",
      "updatedAt": "2023-11-07T05:31:56Z",
      "deletedAt": "2023-11-07T05:31:56Z",
      "application": {
        "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "createdAt": "2023-11-07T05:31:56Z",
        "updatedAt": "2023-11-07T05:31:56Z",
        "deletedAt": "2023-11-07T05:31:56Z",
        "name": "<string>",
        "description": "<string>",
        "instances": [
          {}
        ],
        "twitchUsername": "<string>",
        "featuredInstance": {}
      },
      "uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "taxRate": 123,
      "collectedTaxes": 123,
      "npcs": [],
      "agentNpcs": []
    }
  },
  "type": "natural"
}
Billable Resource
Register a new NPC spawn event in your instance. NPCs are non-agent characters in your game that can be used for various purposes such as background characters, quest givers, or merchants. You can specify the spawn type (natural, breeding, or manual) and provide a unique UUID and name for the NPC. The NPC will be tracked in your instance and can be referenced in future interactions.

Authorizations

Authorization
string
header
required

Your Application's JWT token

Body

application/json

The spawn event data

instanceIdentifier
string<uuid>
required

The ID or UUID of the instance.

uuid
string<uuid>
required

The UUID of the NPC or AgentNPC that was spawned.

name
string
required

The name of the NPC that was spawned.

type
enum<string>
required

The type of spawn event.

Available options:
natural,
breeding,
manual

Response

The created spawn event

id
string<uuid>
required

Unique identifier

createdAt
string<date-time>
required

Date of creation

updatedAt
string<date-time>
required

Date of last update

type
enum<string>
required

The type of spawn event.

Available options:
natural,
breeding,
manual
deletedAt
string<date-time> | null

Date of deletion

npc
object

The NPC that was spawned.