API Reference

Base URL: https://api.soldi.dev

Authentication

  • JWT: Dashboard endpoints. Authorization: Bearer <jwt>
  • API Key: Middleware endpoints. X-API-Key: sk_live_...

Endpoints

MethodPathDescription
POST/api/auth/magic-linkSend magic link email
POST/api/auth/verifyVerify magic link token, return JWT
GET/api/auth/meGet current publisher
GET/api/publishers/meGet publisher profile
PUT/api/publishers/meUpdate publisher profile
PUT/api/publishers/me/walletUpdate wallet address
POST/api/publishers/me/api-keyRegenerate API key
GET/api/publishers/me/configGet publisher config (middleware)
GET/api/pricing/rulesList pricing rules
POST/api/pricing/rulesCreate pricing rule
PUT/api/pricing/rules/:idUpdate pricing rule
DELETE/api/pricing/rules/:idDelete pricing rule
GET/api/pricing/resolveResolve price for path
POST/api/payments/initiateRecord agent visit
POST/api/payments/verifyVerify payment + record transaction
GET/api/payments/historyTransaction history (paginated)
GET/api/analytics/overviewToday's key metrics
GET/api/analytics/revenueDaily revenue time series
GET/api/analytics/top-pagesTop earning pages
GET/api/analytics/agentsAgent type breakdown

Error Format

{
  "error": "Human-readable error message",
  "code": "MACHINE_READABLE_CODE"
}

Rate Limits

  • Authenticated: 100 requests/minute
  • Unauthenticated: 20 requests/minute
  • Response headers: X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset