Social API Reference
Friends, presence tracking, chat channels, user search, and blocking.
15 endpoints
- POST
/api/social/block - DELETE
/api/social/block/{user_id} - POST
/api/social/chat/channels - GET
/api/social/chat/{channel_id}/messages - POST
/api/social/chat/{channel_id}/messages - GET
/api/social/friends - POST
/api/social/friends - GET
/api/social/friends/pending - DELETE
/api/social/friends/{id} - PUT
/api/social/friends/{id} - DELETE
/api/social/presence - GET
/api/social/presence - POST
/api/social/presence - GET
/api/social/presence/table - GET
/api/social/users/search
Block a user
Authentication
JWT Bearer Token
Request Body
| Name | Type | Required | Description |
|---|---|---|---|
user_id |
string (uuid) |
required |
Response (Success)
| Name | Type | Required | Description |
|---|---|---|---|
status |
"blocked" |
required |
Example Request
curl -X POST "https://api.buddo.xyz/api/social/block" \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"user_id": "00000000-0000-0000-0000-000000000000"
}'
Example Response
{
"status": "blocked"
}
Unblock a user
Authentication
JWT Bearer Token
Path Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
user_id |
path | string (uuid) |
required | ID of the user to unblock |
Response (Success)
| Name | Type | Required | Description |
|---|---|---|---|
status |
"unblocked" |
required |
Example Request
curl -X DELETE "https://api.buddo.xyz/api/social/block/:user_id" \
-H "Authorization: Bearer YOUR_JWT_TOKEN"
Example Response
{
"status": "unblocked"
}
Create or ensure a chat channel
Creates a chat channel of the given type, or returns the existing one if it already exists.
Authentication
JWT Bearer Token
Request Body
| Name | Type | Required | Description |
|---|---|---|---|
ref_id |
string |
optional | Optional reference ID for the channel |
type |
"lobby" | "table" |
required |
Response (Success)
| Name | Type | Required | Description |
|---|---|---|---|
id |
string (uuid) |
required | |
ref_id |
string | null |
optional | |
type |
"lobby" | "table" |
required |
Example Request
curl -X POST "https://api.buddo.xyz/api/social/chat/channels" \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"ref_id": "string",
"type": "lobby"
}'
Example Response
{
"id": "00000000-0000-0000-0000-000000000000",
"ref_id": {},
"type": "lobby"
}
Get messages from a chat channel
Returns messages in reverse chronological order. Supports cursor-based pagination via the 'before' parameter.
Authentication
JWT Bearer Token
Path Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
channel_id |
path | string (uuid) |
required | Chat channel ID |
Query Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
limit |
query | integer |
optional | Number of messages to return (default 50) |
before |
query | string (date-time) |
optional | Return messages before this timestamp (ISO 8601) |
Example Request
curl -X GET "https://api.buddo.xyz/api/social/chat/:channel_id/messages" \
-H "Authorization: Bearer YOUR_JWT_TOKEN"
Example Response
[
{
"filtered_body": "string",
"id": "00000000-0000-0000-0000-000000000000",
"sender_id": "00000000-0000-0000-0000-000000000000",
"sender_username": {},
"sent_at": "2026-01-01T00:00:00Z"
}
]
Send a message to a chat channel
Authentication
JWT Bearer Token
Path Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
channel_id |
path | string (uuid) |
required | Chat channel ID |
Request Body
| Name | Type | Required | Description |
|---|---|---|---|
body |
string |
required |
Response (Success)
| Name | Type | Required | Description |
|---|---|---|---|
filtered_body |
string |
required | |
id |
string (uuid) |
required | |
sender_id |
string (uuid) |
required | |
sender_username |
string | null |
optional | |
sent_at |
string (date-time) |
required |
Example Request
curl -X POST "https://api.buddo.xyz/api/social/chat/:channel_id/messages" \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"body": "string"
}'
Example Response
{
"filtered_body": "string",
"id": "00000000-0000-0000-0000-000000000000",
"sender_id": "00000000-0000-0000-0000-000000000000",
"sender_username": {},
"sent_at": "2026-01-01T00:00:00Z"
}
List current user's friends
Authentication
JWT Bearer Token
Example Request
curl -X GET "https://api.buddo.xyz/api/social/friends" \
-H "Authorization: Bearer YOUR_JWT_TOKEN"
Example Response
[
{
"email": "user@example.com",
"id": "00000000-0000-0000-0000-000000000000",
"username": "string"
}
]
Send a friend request
Authentication
JWT Bearer Token
Request Body
| Name | Type | Required | Description |
|---|---|---|---|
friend_id |
string (uuid) |
required |
Response (Success)
| Name | Type | Required | Description |
|---|---|---|---|
friendship_id |
string (uuid) |
required | |
status |
"pending" | "accepted" | "rejected" | "removed" |
required |
Example Request
curl -X POST "https://api.buddo.xyz/api/social/friends" \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"friend_id": "00000000-0000-0000-0000-000000000000"
}'
Example Response
{
"friendship_id": "00000000-0000-0000-0000-000000000000",
"status": "pending"
}
List pending friend requests to the current user
Authentication
JWT Bearer Token
Example Request
curl -X GET "https://api.buddo.xyz/api/social/friends/pending" \
-H "Authorization: Bearer YOUR_JWT_TOKEN"
Example Response
[
{
"friendship_id": "00000000-0000-0000-0000-000000000000",
"id": "00000000-0000-0000-0000-000000000000",
"sent_at": "2026-01-01T00:00:00Z",
"username": "string"
}
]
Remove a friendship
Authentication
JWT Bearer Token
Path Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id |
path | string (uuid) |
required | Friendship ID |
Response (Success)
| Name | Type | Required | Description |
|---|---|---|---|
status |
"removed" |
required |
Example Request
curl -X DELETE "https://api.buddo.xyz/api/social/friends/:id" \
-H "Authorization: Bearer YOUR_JWT_TOKEN"
Example Response
{
"status": "removed"
}
Accept or reject a friend request
Authentication
JWT Bearer Token
Path Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id |
path | string (uuid) |
required | Friendship ID |
Request Body
| Name | Type | Required | Description |
|---|---|---|---|
action |
"accept" | "reject" |
required |
Response (Success)
| Name | Type | Required | Description |
|---|---|---|---|
status |
"accepted" | "rejected" |
required |
Example Request
curl -X PUT "https://api.buddo.xyz/api/social/friends/:id" \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"action": "accept"
}'
Example Response
{
"status": "accepted"
}
Untrack user presence
Removes the current user's presence record.
Authentication
JWT Bearer Token
Response (Success)
| Name | Type | Required | Description |
|---|---|---|---|
status |
"ok" |
required |
Example Request
curl -X DELETE "https://api.buddo.xyz/api/social/presence" \
-H "Authorization: Bearer YOUR_JWT_TOKEN"
Example Response
{
"status": "ok"
}
Get friends' online presence
Returns presence status for the current user's friends. Optionally filter by specific user IDs.
Authentication
JWT Bearer Token
Query Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
user_ids |
query | string |
optional | Comma-separated UUIDs to filter by specific users |
Example Request
curl -X GET "https://api.buddo.xyz/api/social/presence" \
-H "Authorization: Bearer YOUR_JWT_TOKEN"
Track user presence
Reports the current user as online, optionally in a specific game or lobby.
Authentication
JWT Bearer Token
Request Body
| Name | Type | Required | Description |
|---|---|---|---|
game |
string |
optional | Current game identifier |
lobby |
string |
optional | Current lobby identifier |
Response (Success)
| Name | Type | Required | Description |
|---|---|---|---|
status |
"ok" |
required |
Example Request
curl -X POST "https://api.buddo.xyz/api/social/presence" \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"game": "string",
"lobby": "string"
}'
Example Response
{
"status": "ok"
}
Get presence for a game table
Returns presence status for all users at a specific game table.
Authentication
JWT Bearer Token
Query Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
game |
query | string |
required | Game identifier |
ref_id |
query | string |
required | Table/room reference ID |
Response (Success)
| Name | Type | Required | Description |
|---|---|---|---|
users |
array<object> |
required |
Example Request
curl -X GET "https://api.buddo.xyz/api/social/presence/table?game=VALUE&ref_id=VALUE" \
-H "Authorization: Bearer YOUR_JWT_TOKEN"
Example Response
{
"users": [
{
"last_seen": "2026-01-01T00:00:00Z",
"status": "online",
"user_id": "00000000-0000-0000-0000-000000000000"
}
]
}
Search users by username
Returns up to 20 matching users. Excludes the current user and blocked users.
Authentication
JWT Bearer Token
Query Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
q |
query | string |
required | Search query (minimum 2 characters) |
Response (Success)
| Name | Type | Required | Description |
|---|---|---|---|
users |
array<object> |
required |
Example Request
curl -X GET "https://api.buddo.xyz/api/social/users/search?q=VALUE" \
-H "Authorization: Bearer YOUR_JWT_TOKEN"
Example Response
{
"users": [
{
"id": "00000000-0000-0000-0000-000000000000",
"username": "string"
}
]
}