BProtector REST API
Protect, deprotect, and manage files via IPFS programmatically. Bring your own Pinata key, pay only on-chain fees + subscription.
🧪 Advanced Protection Suite (Enterprise API Support)
The optional advanced features — recovery phrase, Shamir secret sharing, dead man's switch, and proof of existence — keep all secrets client-side: recovery phrases, Shamir shares, and passwords never touch this API. The API does let enterprises record and query the non-secret metadata: pass feature flags, the AES-encrypted manifest, the DMS reveal date, the proof fingerprint, and Shamir M-of-N on POST /protect; and query feature/DMS info via GET /metadata/:coverFileId and GET /metadata/dms. No smart-contract changes required.
Authentication
All authenticated endpoints require a BProtector API key passed via the Authorization header. Obtain your API key from the admin panel or contact support.
Authorization: Bearer bp_your_64_character_api_key_hereSecurity: Your API key grants full access to your stored Pinata JWT and IPFS operations. Never expose it in client-side code or public repositories.
Base URL
Production: https://api.bprotector.io
Local Dev: http://localhost:3001Subscription Plans
| Plan | Monthly Uploads | Bandwidth | API Price |
|---|---|---|---|
| Free | 10/mo | 500 MB/mo | 0 SOL |
| Starter | 100/mo | 5 GB/mo | 0.05 SOL |
| Professional | 1,000/mo | 50 GB/mo | 0.2 SOL |
| Enterprise | 10,000/mo | 500 GB/mo | 1.0 SOL |
Note: On-chain Solana transaction fees (set by the contract owner) apply in addition to the API subscription price.
Error Codes
| Code | Meaning | Action |
|---|---|---|
| 401 | Invalid or missing API key | Check your Authorization header |
| 403 | Account deactivated or plan expired | Contact support or renew subscription |
| 404 | Resource not found | Verify the CID, coverFileId, or endpoint path |
| 429 | Rate limit / quota exceeded | Upgrade your plan or wait for period reset |
| 500 | Server error | Retry with exponential backoff |
Endpoints
Quick Start (JavaScript)
const API_KEY = 'bp_your_api_key_here';
const BASE = 'http://localhost:3001';
// Upload file to IPFS
const formData = new FormData();
formData.append('files', fileInput.files[0]);
const res = await fetch(`${BASE}/api/v1/ipfs/upload`, {
method: 'POST',
headers: { Authorization: `Bearer ${API_KEY}` },
body: formData,
});
const { data } = await res.json();
console.log('CID:', data.cid);
console.log('Gateway:', data.gatewayUrl);Coming Soon
Official SDKs are under development: