Skip to main content
POST
/
v1
/
instance
Register a new instance
curl --request POST \
  --url https://api.pixocracy.io/v1/instance \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}'
{
  "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": []
}
Billable Resource
An Instance is a unique identifier for your game, think of it as a save file. It allows you to have multiple instances for the same application, or multiple save files for the same game. Instances use a UUID to identify the instance with your game, you must generate a new UUID for each new instance and ensure that the UUID is saved in your game’s save file.

Authorizations

Authorization
string
header
required

Your Application's JWT token

Body

application/json

The instance data to register

uuid
string<uuid>
required

The UUID of the instance.

Response

The created instance

id
string<uuid>
required

Unique identifier

createdAt
string<date-time>
required

Date of creation

updatedAt
string<date-time>
required

Date of last update

application
object
required

The application that the instance belongs to.

uuid
string<uuid>
required

The UUID of the instance.

taxRate
number
required

The tax rate of the instance.

collectedTaxes
number
required

The amount of taxes collected by the instance.

deletedAt
string<date-time> | null

Date of deletion

npcs
object[]

The NPCs of the instance.

agentNpcs
object[]

The agent NPCs of the instance.