Social API Reference

Friends, presence tracking, chat channels, user search, and blocking.

15 endpoints

POST /api/social/block

Block a user

Authentication

JWT Bearer Token

Request Body

NameTypeRequiredDescription
user_id string (uuid) required

Response (Success)

NameTypeRequiredDescription
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"
}
DELETE /api/social/block/{user_id}

Unblock a user

Authentication

JWT Bearer Token

Path Parameters

NameInTypeRequiredDescription
user_id path string (uuid) required ID of the user to unblock

Response (Success)

NameTypeRequiredDescription
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"
}
POST /api/social/chat/channels

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

NameTypeRequiredDescription
ref_id string optional Optional reference ID for the channel
type "lobby" | "table" required

Response (Success)

NameTypeRequiredDescription
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 /api/social/chat/{channel_id}/messages

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

NameInTypeRequiredDescription
channel_id path string (uuid) required Chat channel ID

Query Parameters

NameInTypeRequiredDescription
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"
  }
]
POST /api/social/chat/{channel_id}/messages

Send a message to a chat channel

Authentication

JWT Bearer Token

Path Parameters

NameInTypeRequiredDescription
channel_id path string (uuid) required Chat channel ID

Request Body

NameTypeRequiredDescription
body string required

Response (Success)

NameTypeRequiredDescription
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"
}
GET /api/social/friends

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"
  }
]
POST /api/social/friends

Send a friend request

Authentication

JWT Bearer Token

Request Body

NameTypeRequiredDescription
friend_id string (uuid) required

Response (Success)

NameTypeRequiredDescription
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"
}
GET /api/social/friends/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"
  }
]
DELETE /api/social/friends/{id}

Remove a friendship

Authentication

JWT Bearer Token

Path Parameters

NameInTypeRequiredDescription
id path string (uuid) required Friendship ID

Response (Success)

NameTypeRequiredDescription
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"
}
PUT /api/social/friends/{id}

Accept or reject a friend request

Authentication

JWT Bearer Token

Path Parameters

NameInTypeRequiredDescription
id path string (uuid) required Friendship ID

Request Body

NameTypeRequiredDescription
action "accept" | "reject" required

Response (Success)

NameTypeRequiredDescription
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"
}
DELETE /api/social/presence

Untrack user presence

Removes the current user's presence record.

Authentication

JWT Bearer Token

Response (Success)

NameTypeRequiredDescription
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 /api/social/presence

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

NameInTypeRequiredDescription
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"
POST /api/social/presence

Track user presence

Reports the current user as online, optionally in a specific game or lobby.

Authentication

JWT Bearer Token

Request Body

NameTypeRequiredDescription
game string optional Current game identifier
lobby string optional Current lobby identifier

Response (Success)

NameTypeRequiredDescription
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 /api/social/presence/table

Get presence for a game table

Returns presence status for all users at a specific game table.

Authentication

JWT Bearer Token

Query Parameters

NameInTypeRequiredDescription
game query string required Game identifier
ref_id query string required Table/room reference ID

Response (Success)

NameTypeRequiredDescription
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"
    }
  ]
}
GET /api/social/users/search

Search users by username

Returns up to 20 matching users. Excludes the current user and blocked users.

Authentication

JWT Bearer Token

Query Parameters

NameInTypeRequiredDescription
q query string required Search query (minimum 2 characters)

Response (Success)

NameTypeRequiredDescription
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"
    }
  ]
}