Skip to main content

API Reference

The usmewe API provides programmatic access to all platform features.

Base URL

https://api-production-2d08.up.railway.app/v1

Authentication

All API requests require authentication via JWT token:
curl -X GET "https://api.usmewe.com/v1/users/me" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN"

Authentication Guide

Learn how to obtain and use JWT tokens

Rate Limits

TierRequests/minRequests/day
Free601,000
Pro30010,000
EnterpriseUnlimitedUnlimited
Rate limit headers are included in all responses:
X-RateLimit-Limit: 60
X-RateLimit-Remaining: 45
X-RateLimit-Reset: 1704067200

Response Format

All responses are JSON with consistent structure:

Success Response

{
  "success": true,
  "data": {
    // Response data
  },
  "meta": {
    "timestamp": "2025-01-15T12:00:00Z",
    "requestId": "req_abc123"
  }
}

Error Response

{
  "success": false,
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Invalid amount",
    "details": {
      "field": "amount",
      "reason": "Must be greater than 0"
    }
  },
  "meta": {
    "timestamp": "2025-01-15T12:00:00Z",
    "requestId": "req_abc123"
  }
}

Error Codes

CodeHTTP StatusDescription
UNAUTHORIZED401Invalid or missing token
FORBIDDEN403Insufficient permissions
NOT_FOUND404Resource not found
VALIDATION_ERROR400Invalid request data
RATE_LIMITED429Too many requests
INTERNAL_ERROR500Server error

API Sections

Authentication

OAuth, tokens, sessions

Users

Profiles, settings, XP

Trust Score

Score queries, history

Loans

P2P loan operations

Vault

Staking, borrowing, yield

Social Vault

Guardians, timelock

Notifications

Push notifications

Webhooks

Event subscriptions

SDKs

We provide official SDKs for common platforms:

JavaScript/TypeScript

Node.js and browser support

React Hooks

Ready-to-use React hooks

OpenAPI Specification

Download our OpenAPI 3.0 spec for code generation:
curl -O https://api.usmewe.com/v1/openapi.json

Swagger UI

Interactive API documentation