Users
Users are the core identity entity in Local Universe. Every user has a profile, relationships, settings, and can be a member of multiple systems.
The user model
Properties
- Name
id- Type
- string
- Description
Unique identifier for the user.
- Name
email- Type
- string
- Description
The user's email address.
- Name
username- Type
- string
- Description
The unique username.
- Name
wallet- Type
- string
- Description
The user's public wallet address.
- Name
display_name- Type
- string?
- Description
Optional display name.
- Name
avatar- Type
- string?
- Description
Avatar image URL.
- Name
bio- Type
- string?
- Description
User bio text.
- Name
created_at- Type
- timestamp
- Description
When the account was created.
- Name
updated_at- Type
- timestamp?
- Description
When the account was last updated.
- Name
banned_until- Type
- timestamp?
- Description
When the user's ban expires, if banned.
- Name
verified- Type
- boolean
- Description
Whether the user's email is verified.
- Name
public_flags- Type
- integer
- Description
Public user flags bitfield. See user flags below.
- Name
oid- Type
- string
- Description
The user's object identifier.
User flags
| Value | Name |
|---|---|
| 1 | STAFF |
| 2 | PARTNER |
| 8 | BUG_HUNTER_LEVEL_1 |
| 512 | PREMIUM_EARLY_SUPPORTER |
| 16384 | BUG_HUNTER_LEVEL_2 |
| 131072 | ACTIVE_DEVELOPER |
| 262144 | CERTIFIED_MODERATOR |
The user balance model
Represents a user's currency balance.
- Name
user_id- Type
- string
- Description
The user's ID.
- Name
currency- Type
- string
- Description
The currency type (e.g.
bytes).
- Name
balance- Type
- number
- Description
The current balance.
- Name
updated_at- Type
- string
- Description
When the balance was last updated.
Currency types
| Value | Name |
|---|---|
| bytes | BYTES |
The relationship model
Relationships represent connections between users — friends, friend requests, and blocks.
- Name
type- Type
- integer
- Description
The relationship type.
- Name
since- Type
- string
- Description
When the relationship was created.
- Name
user- Type
- User
- Description
The other user in the relationship.
Relationship types
| Value | Name |
|---|---|
| 0 | NONE |
| 1 | FRIEND |
| 2 | OUTGOING_FRIEND_REQUEST |
| 3 | INCOMING_FRIEND_REQUEST |
| 4 | OUTGOING_BLOCK |
| 5 | INCOMING_BLOCK |
Search users
Search for users. Requires appropriate permissions.
Request
curl https://api.localuniverse.io/v1/users \
-H "Authorization: Bearer {token}"
Get current user's DM channels
Returns all DM and group DM channels for the authenticated user.
Request
curl https://api.localuniverse.io/v1/users/@me/channels \
-H "Authorization: Bearer {token}"
Create a DM channel
Open a DM channel with another user, or create a group DM.
Required attributes
- Name
recipient_id- Type
- string
- Description
The user ID to open a DM with.
Request
curl -X POST https://api.localuniverse.io/v1/users/@me/channels \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-d '{"recipient_id": "1344387816333399999"}'
Get a user's DM channels
Returns DM channels for a specific user. Used internally by the Wormhole gateway (service auth).
Request
curl https://api.localuniverse.io/v1/users/1344387816333352652/channels \
-H "Authorization: Service {api_key}:{api_secret}"
Get a user's read states
Returns the read state for all channels the user has read. Each read state tracks the last read message and mention count.
Request
curl https://api.localuniverse.io/v1/users/@me/read-states \
-H "Authorization: Bearer {token}"
Get a user
Retrieve a user by their ID. Use @me to get the authenticated user.
Request
curl https://api.localuniverse.io/v1/users/1344387816333352652 \
-H "Authorization: Bearer {token}"
Response
{
"id": "1344387816333352652",
"email": "tino@localuniverse.gg",
"username": "tino",
"wallet": "KtWwxWwQDwoQASN1SrGCWHcqBMfpspRXeccCFauqAPX",
"display_name": "Tino",
"avatar": "https://cdn.localuniverse.io/avatars/1344387816333352652/avatar.png",
"bio": "Building the multiplayer internet",
"created_at": "2025-02-26T19:17:12.848375Z",
"updated_at": "2025-02-26T19:17:12.848375Z",
"banned_until": null,
"verified": true,
"public_flags": 0,
"oid": "obj_abc123"
}
Update a user
Optional attributes
- Name
username- Type
- string
- Description
New username.
- Name
display_name- Type
- string
- Description
New display name.
- Name
avatar- Type
- string
- Description
New avatar URL.
- Name
bio- Type
- string
- Description
New bio text.
Request
curl -X PATCH https://api.localuniverse.io/v1/users/@me \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-d '{"display_name": "New Name", "bio": "Updated bio"}'
Get user settings
Returns the authenticated user's settings.
Request
curl https://api.localuniverse.io/v1/users/@me/settings \
-H "Authorization: Bearer {token}"
Update user settings
Update the authenticated user's settings. Send only the fields you want to change.
Request
curl -X PATCH https://api.localuniverse.io/v1/users/@me/settings \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-d '{"theme": "dark"}'
List relationships
Returns all relationships (friends, pending requests, blocks) for the authenticated user.
Request
curl https://api.localuniverse.io/v1/users/@me/relationships \
-H "Authorization: Bearer {token}"
Update relationships
Bulk update relationships for the authenticated user.
Request
curl -X PUT https://api.localuniverse.io/v1/users/@me/relationships \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-d '{"username": "friend_user"}'
Create a relationship
Send a friend request or create a relationship.
Request
curl -X POST https://api.localuniverse.io/v1/users/@me/relationships \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-d '{"username": "new_friend"}'
Delete all relationships
Remove all relationships for the authenticated user.
Request
curl -X DELETE https://api.localuniverse.io/v1/users/@me/relationships \
-H "Authorization: Bearer {token}"
Update a relationship
Accept a friend request or update a specific relationship by target user ID.
Request
curl -X PUT https://api.localuniverse.io/v1/users/@me/relationships/1344387816333399999 \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-d '{"type": 1}'
Delete a relationship
Remove a specific relationship (unfriend, unblock, cancel request).
Request
curl -X DELETE https://api.localuniverse.io/v1/users/@me/relationships/1344387816333399999 \
-H "Authorization: Bearer {token}"
Add to user inventory
Add an item instance to a user's inventory. Requires inventory.write permission.
Required attributes
- Name
item_id- Type
- string
- Description
The ID of the item to add.
Request
curl -X POST https://api.localuniverse.io/v1/users/1344387816333352652/inventory \
-H "Authorization: Service {api_key}:{api_secret}" \
-H "Content-Type: application/json" \
-d '{"item_id": "1344387816333355555"}'
Get user balance
Returns the authenticated user's currency balance.
Request
curl https://api.localuniverse.io/v1/users/@me/balance \
-H "Authorization: Bearer {token}"
Response
{
"user_id": "1344387816333352652",
"currency": "bytes",
"balance": 1250,
"updated_at": "2025-06-15T12:30:00.000Z"
}
Get user's systems
Returns all systems the authenticated user is a member of.
Request
curl https://api.localuniverse.io/v1/users/@me/systems \
-H "Authorization: Bearer {token}"
