API Documentation
Complete guide to integrating with the Cubemobi advertising platform
Overview
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.
Base URL
API Versioning
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.
Authentication
Platform access and API credentials are provided through the approved account process. The website enquiry form does not generate keys or create campaigns. Never enter live credentials into the public contact form.
All API requests require authentication using an API key. You can obtain your API key from the Cubemobi dashboard under Settings > API Access.
API Key Authentication
Include your API key in the Authorization header of every request:
Security Best Practices
- Never expose your API key in client-side code or public repositories
- Rotate your API keys periodically
- Use environment variables to store API keys
- Set up IP whitelisting for additional security
Reference Budget and Account Scope
The campaign example describes a daily-budget parameter minimum of $10. The advertiser FAQ gives commercial guidance of $50 per campaign per day and a $1,000 minimum deposit for new accounts. Preserve the distinction between an example parameter and an approved account requirement; confirm the current schema and account terms before implementing. Reference limits, responses and timestamps are examples, not a live measurement of this public website.
Rate Limits
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:
Error Handling
The API uses standard HTTP response codes to indicate success or failure:
Error Response Format
Create Campaign
Create a new advertising campaign with targeting options and budget settings.
Request Parameters
| 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) |
Example Request
Example Response
List Campaigns
Retrieve a paginated list of all campaigns in your account.
Query Parameters
| 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 |
Example Response
Update Campaign
Update an existing campaign's settings, targeting, or budget.
Example Request
Campaign Statistics
Retrieve detailed performance statistics for a specific campaign.
Query Parameters
| 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 |
Example Response
Upload Creative
Upload a new creative asset (image, video, or playable ad) to use in your campaigns.
Request (multipart/form-data)
| 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 |
Creative Specifications
Supported creative formats and specifications:
Banner Ads
| 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 |
Video Ads
| Aspect Ratio | Format | Duration | Max File Size |
|---|---|---|---|
| 16:9 or 9:16 | MP4, MOV | 15-60 seconds | 50 MB |
Generate Reports
Generate detailed performance reports with customizable dimensions and metrics.
Example Request
Real-time Data
Access real-time campaign performance data with minimal latency.
Real-time data is updated every 5 minutes and includes:
- Current hour impressions, clicks, and installs
- Spend pacing vs. daily budget
- Top performing creatives and countries
- Delivery status and any issues
Postback Setup
Configure server-to-server postbacks to receive real-time conversion notifications.
Postback URL Macros
| 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 |
Event Types
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) |