Home/Docs/API Reference

API Reference

Complete reference for the Cube Platform REST API.

Base URL

https://api.cube.io/v1

Authentication

All API requests require authentication using an API key in the header.

Header
Authorization: Bearer YOUR_API_KEY

DPO Endpoints

POST/dpo/campaigns

Create a new DPO campaign

Request Body

{
  "name": "Summer Promo 2025",
  "budget": 10000,
  "targetAudience": ["tech", "gaming"],
  "startDate": "2025-06-01",
  "endDate": "2025-08-31",
  "dvuPerEngagement": 5
}

Response

{
  "id": "dpo_abc123",
  "name": "Summer Promo 2025",
  "status": "active",
  "budget": 10000,
  "spent": 0,
  "reach": 0,
  "createdAt": "2025-01-15T10:30:00Z"
}
GET/dpo/campaigns

List all DPO campaigns

Query Parameters

statusstringFilter by status (active, paused, completed)
limitintegerNumber of results (default: 20, max: 100)
offsetintegerPagination offset

DVU Endpoints

GET/dvu/balance

Get DVU balance for the authenticated user

Response

{
  "balance": 12450.00,
  "pending": 500.00,
  "currency": "DVU",
  "lastUpdated": "2025-01-15T10:30:00Z"
}
POST/dvu/transfer

Transfer DVU to another user

Request Body

{
  "to": "cube_user_xyz789",
  "amount": 100,
  "note": "Payment for services"
}

Rate Limits

API requests are rate limited based on your plan:

Free
100 req/min
Pro
1,000 req/min
Enterprise
Unlimited