Back to docs

API Reference

Base URL: https://styxprivacy.app

Authentication

Include your API key in the Authorization header:

Authorization: Bearer styx_your_api_key
POST/api/v1/messages

Send an encrypted message to a recipient address

Request Body

{
  "recipient": "RECIPIENT_PUBKEY",
  "message": "encrypted_payload_base64",
  "ttl": 86400
}

Response

{
  "id": "msg_abc123",
  "signature": "5YNmS...",
  "createdAt": "2024-01-01T00:00:00Z",
  "expiresAt": "2024-01-02T00:00:00Z"
}
POST/api/v1/keys

Create a new API key (requires wallet signature)

Request Body

{
  "wallet": "WALLET_PUBKEY",
  "signature": "base58_signature",
  "message": "Sign this message to create API key",
  "name": "My App"
}

Response

{
  "apiKey": "styx_abc123...",
  "id": "key_xyz789",
  "tier": "free",
  "limits": { "perMinute": 10, "monthly": 1000 }
}
GET/api/v1/explorer?address=PUBKEY

Get STS transaction history for an address

Response

{
  "transactions": [
    {
      "signature": "5YNmS...",
      "slot": 123456789,
      "operation": "Transfer",
      "timestamp": "2024-01-01T00:00:00Z"
    }
  ],
  "total": 42
}
GET/api/v1/usage

Get API usage statistics for your key

Response

{
  "requestsThisMonth": 150,
  "monthlyLimit": 1000,
  "tier": "free"
}