API for interacting with virtual pets via a single WebSocket connection. Authentication is required for the first message, then actions can be performed directly.
{
"type": "AUTH",
"data": {
"params": {
"authHash": {
"id": 123456789,
"first_name": "name",
"username": "username",
"auth_date": 123456789,
"hash": "hash"
},
"authType": "telegram"
}
}
}
{
"type": "AUTH",
"data": {
"params": {
"authHash": {
"hash": "privy_auth_token"
},
"authType": "privy"
}
}
}
{
"type": "REGISTER",
"data": {
"params": {
"registerHash": {
"name": "Pet Name",
"hash": "privy_auth_token"
},
"authType": "privy"
}
}
}
{
"type": "RUB",
"data": {}
}
{
"type": "ACCESSORY_USE",
"data": {
"params": {
"accessoryId": "CROWN"
}
}
}
Development server
Channel for client messages to server
Send a message to the server (authentication or action)
Available only on servers:
Accepts the following message:
Client message
Message from client to server (auth or action)
Type of message to send to the server, can be an action or an authentication/registration message
Telegram authentication message example
{
"type": "AUTH",
"data": {
"params": {
"authHash": {
"id": 123456789,
"first_name": "name",
"username": "username",
"auth_date": 123456789,
"hash": "hash"
},
"authType": "telegram"
}
}
}
Privy authentication message example
{
"type": "AUTH",
"data": {
"params": {
"authHash": {
"hash": "privy_auth_token"
},
"authType": "privy"
}
}
}
Privy registration message example
{
"type": "REGISTER",
"data": {
"params": {
"registerHash": {
"name": "Pet Name",
"hash": "privy_auth_token"
},
"authType": "privy"
}
}
}
Simple action with no parameters
{
"type": "RUB",
"data": {}
}
Action with accessory parameters
{
"type": "ACCESSORY_USE",
"data": {
"params": {
"accessoryId": "CROWN"
}
}
}
AI search action example
{
"type": "AI_SEARCH",
"data": {
"params": {
"prompt": "Tell me about cats",
"type": "crypto"
}
}
}
Image generation example
{
"type": "GEN_IMAGE",
"data": {
"params": {
"prompt": "A cute cartoon pet playing with a ball"
}
}
}
Check into a hotel tier
{
"type": "HOTEL_CHECK_IN",
"data": {
"params": {
"tier": 2
}
}
}
Purchase a hotel stay
{
"type": "HOTEL_BUY",
"data": {
"params": {
"tier": 1,
"duration": "7d"
}
}
}
Pet eats a consumable
{
"type": "CONSUMABLES_USE",
"data": {
"params": {
"foodId": "BURGER"
}
}
}
Buy consumables
{
"type": "CONSUMABLES_BUY",
"data": {
"params": {
"foodId": "BURGER",
"amount": 3
}
}
}
Channel for server messages to client
Publish various server-to-client messages (auth results, updates, errors, data)
Available only on servers:
Accepts one of the following messages:
Authentication result
Response to authentication request
Successful authentication response
{
"type": "auth_result",
"success": true,
"user": {
"id": "user-uuid-123",
"name": "Pet Name",
"username": "username",
"telegramId": "123456789",
"pets": [
{
"id": "pet-uuid-123",
"name": "Pet Name",
"PetStats": {
"hunger": 75,
"health": 90,
"energy": 80,
"happiness": 85,
"hygiene": 70
},
"currentHotelTier": 0,
"balance": "1000000000000000000"
}
]
}
}
Failed authentication response
{
"type": "auth_result",
"success": false,
"error": "Invalid authentication credentials"
}
Pet state update after performing an action
{
"type": "pet_update",
"pet": {
"id": "pet-uuid-123",
"name": "Pet Name",
"PetStats": {
"hunger": 70,
"health": 92,
"energy": 75,
"happiness": 95,
"hygiene": 70
},
"currentHotelTier": 0,
"balance": "1000000000000000000"
}
}
Error when an invalid action is performed
{
"type": "error",
"error": "Invalid action type specified"
}
Error when required parameters are missing
{
"type": "error",
"error": "Required parameter 'accessoryId' is missing"
}
Response containing a list of available accessories
{
"type": "data",
"data": {
"accessories": [
{
"id": "CROWN",
"name": "Royal Crown",
"price": 500,
"category": "headwear"
},
{
"id": "GLASSES",
"name": "Cool Sunglasses",
"price": 200,
"category": "eyewear"
}
]
}
}
Response containing user's inventory items
{
"type": "data",
"data": {
"inventory": {
"food": [
{
"id": "APPLE",
"name": "Apple",
"quantity": 5
},
{
"id": "COOKIE",
"name": "Cookie",
"quantity": 3
}
],
"accessories": [
{
"id": "CROWN",
"name": "Royal Crown",
"equipped": false
}
]
}
}
}
Response containing pet personality information
{
"type": "data",
"data": {
"personality": {
"traits": [
"playful",
"friendly",
"curious"
],
"description": "Your pet is playful and enjoys exploring new things."
}
}
}
Response containing withdrawal information
{
"type": "data",
"data": {
"withdrawals": [
{
"id": "withdrawal-123",
"amount": "500000000000000000",
"status": "PENDING",
"createdAt": "2025-04-01T12:00:00Z"
}
]
}
}
Response containing achievements information
{
"type": "data",
"data": {
"achievements": [
{
"id": "FIRST_FEED",
"name": "First Meal",
"description": "Feed your pet for the first time",
"completed": true,
"claimed": false
},
{
"id": "PLAY_10_TIMES",
"name": "Playful Friend",
"description": "Play with your pet 10 times",
"completed": false,
"progress": 3,
"target": 10
}
]
}
}
Response containing referral information
{
"type": "data",
"data": {
"referral": {
"code": "USER123",
"usedCount": 5,
"rewards": 500
}
}
}
Response containing leaderboard information
{
"type": "data",
"data": {
"leaderboard": [
{
"rank": 1,
"petId": "pet-uuid-123",
"petName": "Champion",
"score": 10000
},
{
"rank": 2,
"petId": "pet-uuid-456",
"petName": "Runner-up",
"score": 9500
}
]
}
}
Client message
Message from client to server (auth or action)
Type of message to send to the server, can be an action or an authentication/registration message
Authentication result
Response to authentication request
Type of message to send to the server, can be an action or an authentication/registration message
Identifier for each consumable item
Identifier for accessory blueprints
Identifier for each achievement blueprint
Type of chat for AI search
Tier levels in the hotel (0 = none, 1–3 available)
Duration option for hotel purchase
Type of token for deposit/withdrawal
Identifier for each staking option
Status of a guild join request
Access type for a guild
Role of a member in a guild
Type of upgrade available for a guild.
Note: Currently, "defense" and "attack" upgrades are not functional and have no effect.
Type of login method
Information about a user with their pets
Information about a pet