Overview Auth OAuth Endpoints Limits Errors

API Endpoints

Available resources and methods

Available endpoints for interacting with DeBands data.

Data Scope

All endpoints return data belonging to the authenticated user only. You cannot query other users' profiles, events, or connections through these endpoints.

User

GET /api/public/me

Get the authenticated user's basic profile information.

Required scope: profile:read

GET /api/public/profile

Get the authenticated user's full profile with stats.

Required scope: profile:read

PUT /api/public/profile

Update the authenticated user's profile.

Required scope: profile:write

Events

GET /api/public/events

List events the user has access to.

Required scope: events:read

GET /api/public/events/{id}

Get details for a specific event.

Required scope: events:read

Connections

GET /api/public/connections

List the user's connections.

Required scope: connections:read

Achievements

GET /api/public/achievements

List the user's earned achievements (badges).

Required scope: achievements:read

GET /api/public/achievements?action=all

List all available achievements with earned status.

Required scope: achievements:read

GET /api/public/achievements?action=stats

Get achievement statistics by category and rarity.

Required scope: achievements:read

GET /api/public/achievements?action=detail&id={id}

Get details for a specific achievement including rarity percentage.

Required scope: achievements:read

GET /api/public/achievements?action=pinned

Get the user's pinned/featured achievements.

Required scope: achievements:read

Example: GET Profile Response

{
    "id": 123,
    "username": "johndoe",
    "display_name": "John Doe",
    "bio": "Music enthusiast and event organizer",
    "profile_picture": "https://...",
    "created_at": "2024-01-15 10:30:00",
    "achievements_count": 5,
    "connections_count": 42
}

Example: Update Profile

Update the authenticated user's profile fields. All fields are optional - only include fields you want to update.

Request

curl -X PUT "https://dev.debands.xyz/api/public/profile" \
  -H "Authorization: Bearer your_access_token" \
  -H "Content-Type: application/json" \
  -d '{
    "first_name": "John",
    "last_name": "Doe",
    "bio": "Updated bio - Music lover and event organizer",
    "profile_picture": "https://example.com/new-photo.jpg"
  }'

Response

{
    "message": "Profile updated successfully",
    "profile": {
        "id": 123,
        "username": "johndoe",
        "first_name": "John",
        "last_name": "Doe",
        "display_name": "John Doe",
        "bio": "Updated bio - Music lover and event organizer",
        "profile_picture": "https://example.com/new-photo.jpg"
    }
}

Available Fields

Field Type Description
first_name string User's first name (max 100 chars)
last_name string User's last name (max 100 chars)
bio string User's bio/description (max 500 chars)
profile_picture string URL to profile image (must be valid URL)