Complete guide to integrating with the Cubemobi advertising platform
The Cubemobi API provides programmatic access to our mobile advertising platform, enabling you to create and manage campaigns, upload creatives, retrieve performance data, and integrate with your existing marketing technology stack.
Our REST API uses standard HTTP methods and returns JSON responses. All API requests must be made over HTTPS.
The current API version is v2. We recommend always specifying the version in your requests. Previous versions will be supported for at least 12 months after a new version is released.
All API requests require authentication using an API key. You can obtain your API key from the Cubemobi dashboard under Settings > API Access.
Include your API key in the Authorization header of every request:
To ensure fair usage and platform stability, we enforce rate limits on API requests:
| Endpoint Type | Rate Limit | Window |
|---|---|---|
| Standard endpoints | 1,000 requests | per minute |
| Reporting endpoints | 100 requests | per minute |
| Bulk operations | 10 requests | per minute |
Rate limit information is included in response headers:
The API uses standard HTTP response codes to indicate success or failure:
Create a new advertising campaign with targeting options and budget settings.
| Parameter | Type | Description |
|---|---|---|
name required |
string | Campaign name (max 100 characters) |
daily_budget required |
number | Daily budget in USD (minimum $10) |
total_budget |
number | Total campaign budget in USD |
bid_type required |
string | Bidding type: CPC, CPM, CPI, CPA |
bid_amount required |
number | Bid amount in USD |
countries required |
array | List of ISO 3166-1 alpha-2 country codes |
platforms |
array | Target platforms: ios, android |
start_date |
string | Campaign start date (ISO 8601 format) |
end_date |
string | Campaign end date (ISO 8601 format) |
Retrieve a paginated list of all campaigns in your account.
| Parameter | Type | Description |
|---|---|---|
status |
string | Filter by status: active, paused, pending, completed |
page |
integer | Page number (default: 1) |
per_page |
integer | Results per page (default: 20, max: 100) |
sort |
string | Sort field: created_at, name, spent |
Update an existing campaign's settings, targeting, or budget.
Retrieve detailed performance statistics for a specific campaign.
| Parameter | Type | Description |
|---|---|---|
start_date required |
string | Start date (YYYY-MM-DD) |
end_date required |
string | End date (YYYY-MM-DD) |
granularity |
string | Data granularity: hourly, daily, weekly |
group_by |
string | Group results by: country, platform, creative |
Upload a new creative asset (image, video, or playable ad) to use in your campaigns.
| Parameter | Type | Description |
|---|---|---|
file required |
file | The creative file to upload |
name required |
string | Creative name |
type required |
string | banner, interstitial, video, playable |
click_url required |
string | Destination URL when creative is clicked |
Supported creative formats and specifications:
| Size | Format | Max File Size |
|---|---|---|
| 320x50 | PNG, JPG, GIF | 150 KB |
| 300x250 | PNG, JPG, GIF | 200 KB |
| 728x90 | PNG, JPG, GIF | 200 KB |
| 320x480 | PNG, JPG, GIF | 300 KB |
| Aspect Ratio | Format | Duration | Max File Size |
|---|---|---|---|
| 16:9 or 9:16 | MP4, MOV | 15-60 seconds | 50 MB |
Generate detailed performance reports with customizable dimensions and metrics.
Access real-time campaign performance data with minimal latency.
Real-time data is updated every 5 minutes and includes:
Configure server-to-server postbacks to receive real-time conversion notifications.
| Macro | Description |
|---|---|
{click_id} | Unique click identifier |
{campaign_id} | Campaign ID |
{creative_id} | Creative ID |
{country} | User country code |
{platform} | Device platform (ios/android) |
{device_id} | IDFA or GAID |
{payout} | Payout amount |
{event_name} | Event name |
Supported postback event types:
| Event | Description |
|---|---|
install | App installation completed |
registration | User completed registration |
purchase | In-app purchase made |
level_achieved | User reached specific level |
tutorial_complete | Tutorial completed |
custom | Custom event (specify event_name) |