Skip to content

Latest commit

 

History

History
51 lines (44 loc) · 711 Bytes

File metadata and controls

51 lines (44 loc) · 711 Bytes

Users API

GET /users/:id

Get user profile.

Response

{
  "id": "uuid",
  "name": "string",
  "wallet": "GABCD...",
  "bio": "string",
  "avatarUrl": "string",
  "stats": {
    "tasksCompleted": 12,
    "treesPlanted": 5,
    "plasticCollected": 20,
    "co2Reduced": 50
  },
  "createdAt": "2026-06-17T00:00:00Z"
}

PUT /users/:id

Update user profile.

Headers

Authorization: Bearer <token>

Body

{
  "name": "string",
  "bio": "string",
  "avatarUrl": "string"
}

GET /users/:id/impact

Get user's environmental impact summary.

Response

{
  "totalRewards": 500,
  "treesPlanted": 5,
  "plasticCollected": 20,
  "co2Reduced": 50,
  "rank": 42
}