SDK Reference
Resources and integration guides for developers building on the OikosTV ecosystem.
API Overview
OikosTV provides a robust set of RESTful APIs for managing content, monetization, and rewards. All API requests require valid authentication via your OikosTV session.
Common endpoints
GET /api/v1/videos/{shortUUID} // Fetch video details
POST /api/v1/rewards/redeem // Redeem PeerCredits for ad-free hours
GET /api/v1/me/rewards/balance // Check your current credit balanceIntegration Guide
Using the @crewvid/outpost-sdk
The SDK simplifies interacting with the peer network. It handles chunk fetching, decryption (AES-256-GCM), and reward tracking automatically.
import { CrewOutpostClient } from '@crewvid/outpost-sdk';
const client = new CrewOutpostClient({
apiKey: 'your_api_key',
storageQuota: 50, // GB
});
client.on('chunkServed', (data) => {
console.log(`Earned credits for chunk: ${data.chunkId}`);
});Monitoring Peer Credits
Developers can monitor real-time credit balances and redemption history via the following endpoints to provide a seamless experience in their own applications.
Webhooks & Notifications
Configure webhooks to receive real-time notifications about events on your channel.
| Event | Description |
|---|---|
| Upload Completion | Triggered when a video has finished transcoding and is ready for playback |
| New Tip Received | Real-time notification when a viewer sends a tip to your channel |
| Membership Joined | Triggered whenever a new user joins one of your membership tiers |
Setting up webhooks
- Navigate to Studio → Settings → Webhooks
- Enter your endpoint URL (must be HTTPS)
- Select which events to subscribe to
- Save — you'll receive a test payload immediately
Webhook security
Each webhook payload includes a signature in the X-OikosTV-Signature header. Verify this signature before processing the payload to ensure it's from OikosTV.
Need more help?
Check out the API Overview for detailed endpoint documentation, or join our developer community on GitHub Discussions.