# Buddo Platform API # Version: S468 | 91 paths | 107 operations # OpenAPI spec version: 4.0.0 (OpenAPI 3.1.0); generated 2026-11-18 from priv/static/openapi.json by `mix buddo.regen_discovery` # Base URL: https://api.buddo.xyz # Auth: JWT (business account) or OAuth 2.0 PKCE (user-facing apps) # OpenAPI Spec: https://api.buddo.xyz/.well-known/openapi.json > https://api.buddo.xyz/.well-known/openapi.json: OpenAPI 3.1.0 spec (machine-readable, 107 operations across 91 paths) > https://api.buddo.xyz/.well-known/oauth-protected-resource: RFC 9728 OAuth resource metadata > https://api.buddo.xyz/llms.txt: this file ## Routing and Auth Services Routing: `api.buddo.xyz` is the user/platform API using OAuth 2.0 PKCE; `deploy.buddocloud.com` is a separate static-site front-door using business-scoped `fd_` keys. Static-site hosting is a distinct product from the container-deploy API. ## Auth Types [jwt] = Authorization: Bearer — from POST /api/auth/login [oauth] = Authorization: Bearer — from POST /api/oauth/token (PKCE) [public] = no Authorization header required Scope notation: [oauth:scope_name] e.g. [oauth:points:read] Multiple scopes: [oauth:points:read+points:spend] JWT grants access to: /api/auth/*, /api/operator/*, /api/oauth/*, /api/social/*, /api/user/*, /api/btc-progress/*, /api/deploy/sandbox-status OAuth grants access to: /api/external/*, /api/deploy/* (except sandbox-status) ## Authentication Quick Reference ### Step 1 — Business Self-Registration [public] POST /api/operators/register {email*, password*, business_name*, contact_name*} -> 200 POST /api/operators/resend-verification {email*} -> 200 | 409 already verified GET /api/operators/verify/{token} (email link) -> {client_id*, client_secret*} CLIENT SECRET SHOWN ONCE ### Step 2 — User Auth / JWT [public] POST /api/auth/register {email*, password*, username*, referral_code} -> 201 {user} POST /api/auth/login {email*, password*, totp_code} -> 200 {token, user} | 401+{totp_required:true} GET /api/auth/me [jwt] -> 200 {user} POST /api/auth/forgot-password {email*} -> 200 POST /api/auth/reset-password {token*, password*} -> 200 POST /api/auth/send-verification [jwt] no body -> 200 | 409 POST /api/auth/verify-email {token*} -> 200 POST /api/auth/self-verify-email [oauth] no body (instant verify, no OTP) -> 200 | 401 POST /api/session/refresh [public] refresh session token -> 200 ### Step 3 — TOTP / 2FA [jwt] POST /api/auth/totp/setup no body -> {secret*, uri*} (display QR of uri to user) POST /api/auth/totp/enable {code*:string} -> {message, recovery_codes:[string]} POST /api/auth/totp/verify {code*:string} (accepts TOTP or recovery code) -> 200 | 400 ### Step 4 — OAuth App Setup [jwt] POST /api/oauth/apps {app_name*, redirect_uris*:[string], scopes:[], app_description, website_url, logo_url} -> 201 {client_id, client_secret} SECRET SHOWN ONCE GET /api/oauth/apps/{client_id} [public] -> OAuthAppPublic GET /api/oauth/my-apps [jwt] -> [OAuthApp] PUT /api/oauth/my-apps/{id} [jwt] {app_name, app_description, redirect_uris, website_url} POST /api/oauth/my-apps/{id}/scope-request [jwt] -> {id, requested_scopes, status, inserted_at} ### Step 5 — PKCE Authorization Flow GET /api/oauth/authorize [jwt] ?client_id=*&response_type=code&code_challenge=*&code_challenge_method=S256 &redirect_uri&state&scope -> 200 {code*, redirect_uri*, expires_in*, state} POST /api/oauth/token [public] auth_code: {grant_type=authorization_code, code*, redirect_uri*, client_id*, code_verifier*} refresh: {grant_type=refresh_token, refresh_token*, client_id*} -> 200 {access_token*, token_type*, expires_in*, refresh_token*, session_token} POST /api/oauth/token/verify [public] {token*:string} -> TokenIntrospection GET /api/user/connected-apps [jwt] -> [ConnectedApp{app_id,app_name,scopes,connected_at,last_used,logo_url}] DELETE /api/user/connected-apps/{app_id} [jwt] revoke app authorization ## Endpoints by Domain --- ### DISCOVERY [public] GET /health -> {status} GET /llms.txt -> this file GET /.well-known/openapi.json -> OpenAPI 3.1.0 spec GET /.well-known/oauth-protected-resource -> RFC 9728 resource metadata GET /api/public/operators -> [PublicBusiness{id,app_name,app_description,website_url,logo_url,inserted_at}] --- ### BUSINESS ACCOUNT [oauth or jwt] GET /api/operator/app [oauth] -> {app:{id,client_id,is_approved,listed,redirect_uris,scopes,total_users,deploy_tier}} PUT /api/operator/app [oauth] {app_name, app_description, redirect_uris:[string], website_url} -> {app} GET /api/operator/analytics [oauth] -> {dau:object, earnings:object} (30-day window) GET /api/operator/billing/history [oauth] ?page=1&page_size=20 PAGINATED:page-based --- ### USER OPERATIONS [oauth] GET /api/external/user [oauth:profile:read] -> {id, username, ...} GET /api/external/points [oauth:points:read] -> {points:integer} POST /api/external/points/spend [oauth:points:spend] {amount*:integer, idempotency_key*:uuid, description:string} -> {success, amount_spent, points} IDEMPOTENT: idempotency_key in body (UUID v4), prevents double-debit on retry POST /api/external/points/transfer [oauth:points:transfer] {amount*:integer, to_user_id*:uuid, idempotency_key*:uuid, description:string} -> {success, amount_transferred, points} IDEMPOTENT: idempotency_key in body (UUID v4) GET /api/external/app/balance [oauth:app:balance:read] -> {points:integer} (business app earned balance) GET /api/external/session/status [oauth:profile:read] -> {session_active, session_id, last_heartbeat, points_earned} POST /api/external/session/end [oauth:profile:read] end user session --- ### ADS — BUSINESS SERVING [oauth:profile:read] GET /api/external/ads/serve [oauth:profile:read] ?surface_type*=banner|video|interstitial|native|rewarded &game_type&play_tier&locale&user_cohort -> {campaign:{...}, impression_token:string} GET /api/external/ads/serve/v2 [oauth:profile:read] ?surface_id&surface_type&game_type&play_tier&geo -> Campaign (placement-aware targeting) POST /api/external/ads/event [oauth:profile:read] {campaign_id*:uuid, event_type*:impression|click, impression_token*:string, surface_type:string} -> 201 AdEvent RATE_LIMIT: 100/hour/IP impression_token from serve response REQUIRED; 422 impression_token_replay on duplicate token (NOT 409) NOTE: campaign escrow pays both user+business (a transfer, not new issuance); business does NOT transfer own points --- ### ADS MARKETPLACE v2 [jwt] Campaign CRUD: GET /api/v1/ads/campaigns [jwt] ?status&surface_type&page&page_size PAGINATED:page-based POST /api/v1/ads/campaigns [jwt] {name*, budget*:integer, surface_type*, segment_ids:[]} -> 201 GET /api/v1/ads/campaigns/{id} [jwt] one campaign + targeting; token-only read (no scope); 404 not found, 403 other app's campaign PUT /api/v1/ads/campaigns/{id} [jwt] update fields DELETE /api/v1/ads/campaigns/{id} [jwt] 409 if spend already recorded POST /api/v1/ads/campaigns/{id}/pause [jwt] POST /api/v1/ads/campaigns/{id}/resume [jwt] Targeting: GET /api/v1/ads/campaigns/{id}/targeting [jwt] -> targeting config POST /api/v1/ads/campaigns/{id}/targeting [jwt] replaces all existing targeting Analytics: GET /api/v1/ads/analytics/overview [jwt] -> all campaigns summary GET /api/v1/ads/analytics/campaign/{id} [jwt] ?from&to -> per-campaign stats GET /api/v1/ads/analytics/placement/{id} [jwt] ?from&to -> per-placement stats Pricing & Purchase: GET /api/v1/ads/pricing/rates [jwt] -> [{surface_type,base_rate,effective_rate,floor_price,ceiling_price}] GET /api/v1/ads/pricing/rates/{placement_id} [jwt] -> rate for specific placement POST /api/v1/ads/pricing/bulk-quote [jwt] {items*:[{surface_type,quantity}]} -> quoted prices POST /api/v1/ads/purchases/bulk [jwt] atomic purchase; debits business app_account Segments: GET /api/v1/ads/segments [jwt] -> [AudienceSegment{id,name,game_type,play_tier,geography}] External Campaigns (legacy — prefer v1/ads): GET /api/external/campaigns [jwt] ?status&surface_type&page&page_size PAGINATED:page-based POST /api/external/campaigns [jwt] create campaign GET /api/external/campaigns/{id} [jwt] PUT /api/external/campaigns/{id} [jwt] DELETE /api/external/campaigns/{id} [jwt] cancel --- ### DEPLOY / HOSTING [oauth:deploy:manage] NOTE: deploy:manage is OAuth-only (not JWT). Auto-approved via /api/operators/register. GET /api/deploy/tiers [oauth:deploy:manage] -> [{id,slug,name,cpu_limit_millicores,memory_limit_mb, monthly_cost_points,monthly_cost_sats,monthly_stipend_points, payment_method,custom_domain_allowed}] GET /api/deploy/sandbox-status [jwt] check sandbox/trial eligibility GET /api/deploy/apps [oauth:deploy:manage] -> {deployments:[Deployment]} POST /api/deploy/apps [oauth:deploy:manage] {name*:string, image*:string, tier*:string, port:integer, env_vars:object, custom_domain:string} -> 201 {deployment:Deployment} name: 1-32 chars, ^[a-z0-9][a-z0-9-]*[a-z0-9]$ image must use: harbor.buddo.xyz:4443/ | docker.io/library/ | ghcr.io/ GET /api/deploy/apps/{id} [oauth:deploy:manage] -> Deployment detail GET /api/deploy/apps/{id}/status [oauth:deploy:manage] -> {id,status,subdomain,health_status,last_health_check} status: pending->deploying->running|failed (poll every 5s) GET /api/deploy/apps/{id}/logs [oauth:deploy:manage] -> [{id,action,status,initiated_by,inserted_at,details}] POST /api/deploy/apps/{id}/restart [oauth:deploy:manage] POST /api/deploy/apps/{id}/stop [oauth:deploy:manage] preserves subdomain DELETE /api/deploy/apps/{id} [oauth:deploy:manage] IRREVERSIBLE — releases subdomain Deployment object: {id,app_id,container_image,container_name,subdomain,status, cpu_limit_millicores,memory_limit_mb,deploy_tier_id,deployed_at, health_status,host_server,billing_status,stopped_at} --- ### SOCIAL — FRIENDS [jwt] GET /api/social/users/search [jwt] ?q=username -> [UserSearchResult{id,username}] GET /api/social/friends [jwt] -> [Friend{id,username,email}] POST /api/social/friends [jwt] {user_id*:uuid} -> 201 {friendship_id,status} | 409 duplicate GET /api/social/friends/pending [jwt] -> [PendingFriendRequest] PUT /api/social/friends/{id} [jwt] {action*:accept|reject} DELETE /api/social/friends/{id} [jwt] remove friendship POST /api/social/block [jwt] {user_id*:string} -> 200 | 409 already blocked DELETE /api/social/block/{user_id} [jwt] unblock ### SOCIAL — PRESENCE [jwt] (heartbeat-polling, no WebSocket) POST /api/social/presence [jwt] {lobby:string, game:string} start tracking DELETE /api/social/presence [jwt] stop tracking POST /api/social/presence/heartbeat [jwt] {status:online|away|offline} call every 30s GET /api/social/presence/friends [jwt] -> online friends GET /api/social/presence [jwt] ?user_ids=uuid,uuid batch presence check GET /api/social/presence/table [jwt] ?game=*&ref_id=* table-level presence -> [TablePresenceEntry] ### SOCIAL — CHAT [jwt] POST /api/social/chat/channels [jwt] {participant_ids*:[uuid,uuid]} -> {id,...} (idempotent: returns existing) GET /api/social/chat/{channel_id}/messages [jwt] ?limit=50&before={msg_id} PAGINATED:cursor(before=msg_id) -> [ChatMessage{id,sender_id,sender_username,filtered_body,sent_at}] POST /api/social/chat/{channel_id}/messages [jwt] {body*:string} -> 201 ChatMessage ### SOCIAL — AVATAR & COSMETICS [jwt unless noted] GET /api/social/avatar [jwt] own avatar (lazy-created) -> Avatar{id,user_id,display_name,appearance,equipped_cosmetics:[]} PUT /api/social/avatar [jwt] {display_name:string, appearance:object} GET /api/social/avatar/{user_id} [jwt] public avatar view PUT /api/social/avatar/equip [jwt] {cosmetic_item_id*:uuid, action:equip|unequip} GET /api/social/cosmetics [public] ?category&rarity -> [CosmeticItem{id,name,category,rarity,price_points,asset_url,available}] GET /api/social/cosmetics/inventory [jwt] -> [UserCosmetic] POST /api/social/cosmetics/{id}/purchase [jwt] no body -> 201 | 402 insufficient | 409 already owned | 410 removed --- ### EDUCATION — BTC PROGRESS [jwt] GET /api/btc-progress/available-modules -> [{module_number,...}] all modules POST /api/btc-progress/learning-path {path*:string} -> 200 | 409 already set GET /api/btc-progress/module/{module_number}/status -> ModuleStatus{module_number,status,completed,total,repeat_eligible_at} status: not_started|in_progress|completed POST /api/btc-progress/module/{module_number}/reset -> 200 | 400 not eligible | 409 not yet completed POST /api/btc-progress/{step_id}/complete -> 200 | 403 prerequisites unmet | 404 step not found --- ## OAuth Scopes Reference | Scope | Access | Approval | |------------------|--------------------------------------------|--------------| | profile:read | user profile, session, serve ads | Auto | | points:read | user point balance | Auto | | points:spend | debit user, credit business app | Auto | | points:transfer | user-to-user point transfer | Auto | | app:balance:read | business app earned balance | Auto | | campaign:read | granular (optional): read campaigns, analytics, pricing | Auto | | deploy:manage | container deployments (OAuth only, not JWT)| Auto | | campaigns:manage | CANONICAL campaign scope: create/update/pause/cancel campaigns (v1 + external); satisfies every campaign:* granular scope | Auto | | campaign:write | granular (optional): create/update/delete campaigns, targeting | Auto | | campaign:manage | granular (optional, singular): pause/resume/cancel campaigns | Auto | | ads:purchase | NOT A VALID SCOPE (rejected as invalid_scopes); bulk purchase needs campaign:write or campaigns:manage | N/A | | points:award | REMOVED — HTTP 410 Gone — DO NOT USE | N/A | Campaign scopes: campaigns:manage is canonical. The granular scopes campaign:read, campaign:write and campaign:manage (singular) are optional narrower alternatives; every campaign route accepts either campaigns:manage or the specific granular scope. Aliasing is one-way: campaigns:manage satisfies any granular requirement, a granular-only token never satisfies campaigns:manage, and no granular scope implies another. Scope request flow: 1. POST /api/oauth/apps with desired scopes at registration 2. To add scopes later: POST /api/oauth/my-apps/{id}/scope-request Approval: automatic. Every valid scope (including all campaign scopes) is auto-approved at registration and on scope request, with no admin review step; the scope-request response returns status "approved" and the app's allowed_scopes updates immediately. ## Error Format Standard: {"error": {"code": "snake_case_code", "message": "Human readable", "details": {}}} Simple: {"error": "string", "message": "string"} | Code | HTTP | Meaning | |------------------------------|------|----------------------------------------------| | invalid_credentials | 401 | wrong email/password | | totp_required | 401 | TOTP needed; body has totp_required:true | | insufficient_balance | 422 | not enough points for operation | | idempotency_key_is_required | 400 | missing idempotency_key in spend/transfer | | app_not_approved | 403 | business app pending approval | | scope_insufficient | 403 | OAuth token lacks required scope | | invalid_token | 400 | bad OAuth token | | token_expired | 400 | expired OAuth token | | validation_failed | 422 | request body validation failure | | already_exists | 409 | duplicate resource | | not_found | 404 | resource missing | | rate_limit_exceeded | 429 | rate limit hit | HTTP status codes: 200, 201, 400, 401, 402, 403, 404, 409, 410, 422, 429 Rate limits: - POST /api/external/ads/event: 100/hour/IP - General: exponential backoff from 1s on 429 ## Conventions PAGINATION: - Cursor: ?limit=N&before={id} (GET /api/social/chat/{channel_id}/messages) - Page-based: ?page=N&page_size=N (billing/history, v1/ads/campaigns, external/campaigns) IDEMPOTENCY: - Field in request body: idempotency_key (UUID v4) - Required on: POST /api/external/points/spend, POST /api/external/points/transfer - No Idempotency-Key header convention POLLING: - Deploy status: GET /api/deploy/apps/{id}/status every 5s until status=running|failed - Presence: POST /api/social/presence/heartbeat every 30s SECURITY: - client_secret: returned once on business email verify; save immediately - OAuth PKCE: code_challenge_method=S256 required - TOTP: once enabled, login returns 401 with totp_required:true REMOVED FEATURES: - points:award scope: HTTP 410 Gone — treasury funds all payouts - No WebSocket endpoints (presence is heartbeat-polled) - No webhook endpoints ## Complete Endpoint Index Generated from the live OpenAPI spec v4.0.0 (91 paths, 107 operations) at every image build; this index and the header above cannot drift from the spec. Auth labels: [jwt] = Bearer JWT from /api/auth/login; [oauth] or [oauth:scope+scope] = OAuth 2.0 PKCE access token (required scopes after the colon); [internal] = platform-internal, not for businesses; [public] = no Authorization header. ### ADS (3) POST /api/external/ads/event [oauth:profile:read] Record an ad impression or click event GET /api/external/ads/serve [oauth:profile:read] Serve an ad campaign for a given surface type GET /api/external/ads/serve/v2 [oauth:profile:read] Serve an ad with placement-aware targeting (v2) ### ADS-MARKETPLACE (17) GET /api/v1/ads/analytics/campaign/{id} [jwt] Campaign analytics GET /api/v1/ads/analytics/overview [jwt] Analytics overview GET /api/v1/ads/analytics/placement/{id} [jwt] Placement analytics GET /api/v1/ads/campaigns [jwt] List ad campaigns POST /api/v1/ads/campaigns [jwt] Create a campaign GET /api/v1/ads/campaigns/{id} [jwt] Get a campaign PUT /api/v1/ads/campaigns/{id} [jwt] Update a campaign DELETE /api/v1/ads/campaigns/{id} [jwt] Delete a campaign POST /api/v1/ads/campaigns/{id}/pause [jwt] Pause a campaign POST /api/v1/ads/campaigns/{id}/resume [jwt] Resume a campaign GET /api/v1/ads/campaigns/{id}/targeting [jwt] Get campaign targeting POST /api/v1/ads/campaigns/{id}/targeting [jwt] Set campaign targeting POST /api/v1/ads/pricing/bulk-quote [jwt] Get bulk pricing quote GET /api/v1/ads/pricing/rates [jwt] List pricing rates GET /api/v1/ads/pricing/rates/{placement_id} [jwt] Get rate for surface type POST /api/v1/ads/purchases/bulk [jwt] Execute bulk purchase GET /api/v1/ads/segments [jwt] List audience segments ### APP (1) GET /api/external/app/balance [oauth:app:balance:read] Get the business app's earned-point balance ### AUTH (11) POST /api/auth/forgot-password [public] Request a password reset link POST /api/auth/login [public] Authenticate and receive a JWT token GET /api/auth/me [jwt] Get the authenticated user's full profile POST /api/auth/register [public] Register a new user account POST /api/auth/reset-password [public] Reset password using a reset token POST /api/auth/self-verify-email [oauth:profile:read] Self-verify email for authenticated user (no OTP required) POST /api/auth/send-verification [jwt] Resend the email verification link POST /api/auth/totp/enable [jwt] Enable TOTP by confirming a valid code POST /api/auth/totp/setup [jwt] Generate a TOTP secret and provisioning URI POST /api/auth/totp/verify [jwt] Verify a TOTP or recovery code POST /api/auth/verify-email [public] Verify a user's email address with a token ### BUSINESS (4) GET /api/operator/analytics [oauth:app:balance:read] Get business analytics GET /api/operator/app [oauth:app:balance:read] Get business's app details PUT /api/operator/app [oauth:app:balance:read] Update business's app GET /api/operator/billing/history [oauth:app:balance:read] Get paginated billing history for the business app account ### BUSINESS-REGISTRATION (3) POST /api/operators/register [public] Register a new business account (business self-service) POST /api/operators/resend-verification [public] Resend email verification link GET /api/operators/verify/{token} [public] Verify business email and receive OAuth credentials ### DEPLOY (10) GET /api/deploy/apps [oauth:deploy:manage] List business's deployments POST /api/deploy/apps [oauth:deploy:manage] Create a new deployment GET /api/deploy/apps/{id} [oauth:deploy:manage] Get a single deployment DELETE /api/deploy/apps/{id} [oauth:deploy:manage] Destroy a deployment GET /api/deploy/apps/{id}/logs [oauth:deploy:manage] Get deployment action logs POST /api/deploy/apps/{id}/restart [oauth:deploy:manage] Restart a deployment GET /api/deploy/apps/{id}/status [oauth:deploy:manage] Lightweight deployment status check POST /api/deploy/apps/{id}/stop [oauth:deploy:manage] Stop a running deployment GET /api/deploy/sandbox-status [jwt] Check sandbox deployment eligibility GET /api/deploy/tiers [oauth:deploy:manage] List available deployment tiers ### DISCOVERY (3) GET /.well-known/oauth-protected-resource [public] OAuth 2.0 Protected Resource discovery (RFC 9728) GET /.well-known/openapi.json [public] This OpenAPI specification document GET /llms.txt [public] LLM agent discovery file - describes the API for AI agents ### EDUCATION (5) GET /api/btc-progress/available-modules [jwt] List available modules POST /api/btc-progress/learning-path [jwt] Set learning path POST /api/btc-progress/module/{module_number}/reset [jwt] Reset a completed module GET /api/btc-progress/module/{module_number}/status [jwt] Get module progress POST /api/btc-progress/{step_id}/complete [jwt] Complete a learning step ### EXTERNAL-CAMPAIGNS (7) GET /api/external/campaigns [jwt] List business campaigns POST /api/external/campaigns [jwt] Create a business campaign GET /api/external/campaigns/{id} [jwt] Get a campaign PUT /api/external/campaigns/{id} [jwt] Update a campaign DELETE /api/external/campaigns/{id} [jwt] Cancel a campaign POST /api/external/campaigns/{id}/pause [oauth:campaigns:manage] Pause an active campaign POST /api/external/campaigns/{id}/resume [oauth:campaigns:manage] Resume a paused campaign ### INFRASTRUCTURE (1) GET /health [public] Health check ### OAUTH (8) POST /api/oauth/apps [jwt] Register a new OAuth app GET /api/oauth/apps/{client_id} [public] Get public app metadata by client_id GET /api/oauth/authorize [jwt] Request an authorization code GET /api/oauth/my-apps [jwt] List OAuth apps owned by the authenticated user PUT /api/oauth/my-apps/{id} [jwt] Update an OAuth app owned by the authenticated user POST /api/oauth/my-apps/{id}/scope-request [jwt] Request additional scopes for an owned app POST /api/oauth/token [public] Exchange an authorization code or refresh token for access tokens POST /api/oauth/token/verify [public] Introspect an access token ### POINTS (3) GET /api/external/points [oauth:points:read] Get user point balance POST /api/external/points/spend [oauth:points:spend] Spend user points, crediting the business account POST /api/external/points/transfer [oauth:points:transfer] Transfer points from the authenticated user to another user ### PUBLIC (1) GET /api/public/operators [public] List approved public businesses ### SESSIONS (3) POST /api/external/session/end [oauth:profile:read] End the user's active session with this app GET /api/external/session/status [oauth:profile:read] Check whether the user has an active session with this app POST /api/session/refresh [public] Refresh a session token ### SOCIAL (24) GET /api/social/avatar [jwt] Get the current user's avatar PUT /api/social/avatar [jwt] Update avatar appearance or display name PUT /api/social/avatar/equip [jwt] Equip or unequip a cosmetic item GET /api/social/avatar/{user_id} [jwt] Get a user's public avatar POST /api/social/block [jwt] Block a user DELETE /api/social/block/{user_id} [jwt] Unblock a user POST /api/social/chat/channels [jwt] Create or ensure a chat channel GET /api/social/chat/{channel_id}/messages [jwt] Get messages from a chat channel POST /api/social/chat/{channel_id}/messages [jwt] Send a message to a chat channel GET /api/social/cosmetics [public] Browse the cosmetic catalogue GET /api/social/cosmetics/inventory [jwt] Get the current user's cosmetic inventory POST /api/social/cosmetics/{id}/purchase [jwt] Purchase a cosmetic item GET /api/social/friends [jwt] List current user's friends POST /api/social/friends [jwt] Send a friend request GET /api/social/friends/pending [jwt] List pending friend requests to the current user PUT /api/social/friends/{id} [jwt] Accept or reject a friend request DELETE /api/social/friends/{id} [jwt] Remove a friendship GET /api/social/presence [jwt] Get friends' online presence POST /api/social/presence [jwt] Track user presence DELETE /api/social/presence [jwt] Untrack user presence GET /api/social/presence/friends [jwt] Get online friends (heartbeat presence) POST /api/social/presence/heartbeat [jwt] Send presence heartbeat GET /api/social/presence/table [jwt] Get presence for a game table GET /api/social/users/search [jwt] Search users by username ### USER (3) GET /api/external/user [oauth:profile:read] Get authenticated user profile GET /api/user/connected-apps [jwt] List user's connected OAuth apps DELETE /api/user/connected-apps/{app_id} [jwt] Revoke an OAuth app authorization