Skip to main content

Base URL

https://api.midasprotocol.org

Authentication

All authenticated endpoints require:
Authorization: Bearer pp_your_api_key

Content type

All request bodies must be JSON:
Content-Type: application/json

Error format

All errors follow a consistent format:
{
  "error": "ERROR_CODE",
  "message": "Human-readable description"
}
Common error codes:
CodeHTTP StatusDescription
UNAUTHORIZED401Missing or invalid API key
FORBIDDEN403Agent blocked or insufficient permissions
NOT_FOUND404Resource not found
VALIDATION_ERROR400Invalid request body
INSUFFICIENT_BALANCE400Not enough funds
RATE_LIMIT_EXCEEDED429Too many requests

Health check

curl https://api.midasprotocol.org/health
{
  "status": "ok",
  "protocol": "payment-protocol",
  "version": "0.6.0",
  "timestamp": "2026-01-01T00:00:00.000Z"
}

Pagination

List endpoints support limit and offset query parameters:
curl "https://api.midasprotocol.org/wallets/history?limit=10&offset=20"
Response includes pagination metadata:
{
  "data": [...],
  "pagination": { "total": 42, "limit": 10, "offset": 20, "hasMore": true }
}