ThrendMobi API Documentation

Welcome to the ThrendMobi API. Our RESTful API allows you to programmatically manage campaigns, access reporting data, and integrate with our advertising platform.

Base URL

https://api.threndmobi.com/v2

Quick Start

To get started with the ThrendMobi API:

  1. Sign up for an API account at developer.threndmobi.com
  2. Generate your API credentials from the dashboard
  3. Make your first API call using the examples below

Authentication

All API requests require authentication using an API key. Include your API key in the request headers:

Headers
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json

Obtaining API Keys

API keys can be generated from your ThrendMobi dashboard under Settings → API Access. Keep your API keys secure and never expose them in client-side code.

Security Notice

Never share your API keys publicly. If you believe your key has been compromised, regenerate it immediately from your dashboard.

Rate Limits

To ensure fair usage and platform stability, API requests are rate limited:

Plan Requests/Minute Requests/Day
Standard 60 10,000
Professional 300 50,000
Enterprise 1,000 Unlimited

Rate limit headers are included in all API responses:

Response Headers
X-RateLimit-Limit: 60
X-RateLimit-Remaining: 45
X-RateLimit-Reset: 1706183400

Error Handling

The API uses standard HTTP status codes and returns detailed error messages in JSON format:

Code Description
200 Success
400 Bad Request - Invalid parameters
401 Unauthorized - Invalid or missing API key
403 Forbidden - Insufficient permissions
404 Not Found - Resource doesn't exist
429 Too Many Requests - Rate limit exceeded
500 Internal Server Error
Error Response Example
{
  "error": {
    "code": "INVALID_PARAMETER",
    "message": "The 'start_date' parameter must be in YYYY-MM-DD format",
    "field": "start_date",
    "request_id": "req_abc123xyz"
  }
}

List Campaigns

Retrieve a list of all campaigns in your account.

GET /campaigns

Query Parameters

Parameter Type Required Description
status string No Filter by status: active, paused, completed
limit integer No Number of results (default: 20, max: 100)
offset integer No Pagination offset
Request Example (cURL)
curl -X GET "https://api.threndmobi.com/v2/campaigns?status=active&limit=10" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json"
Response
{
  "data": [
    {
      "id": "camp_12345",
      "name": "Summer UA Campaign",
      "status": "active",
      "budget": 10000.00,
      "spent": 4523.50,
      "start_date": "2026-01-01",
      "end_date": "2026-01-31",
      "created_at": "2025-12-15T10:30:00Z"
    }
  ],
  "meta": {
    "total": 45,
    "limit": 10,
    "offset": 0
  }
}

Create Campaign

Create a new advertising campaign.

POST /campaigns

Request Body

Parameter Type Required Description
name string Yes Campaign name
type string Yes Campaign type: cpi, cpm, cpa
budget number Yes Total budget in USD
daily_budget number No Daily cap in USD
bid number Yes Bid amount
targeting object Yes Targeting configuration
start_date string Yes Start date (YYYY-MM-DD)
end_date string No End date (YYYY-MM-DD)
Request Example
curl -X POST "https://api.threndmobi.com/v2/campaigns" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "New User Acquisition Campaign",
    "type": "cpi",
    "budget": 50000,
    "daily_budget": 2000,
    "bid": 1.50,
    "targeting": {
      "countries": ["US", "CA", "GB"],
      "platforms": ["ios", "android"],
      "os_versions": {
        "ios": "14.0+",
        "android": "10+"
      }
    },
    "start_date": "2026-02-01",
    "end_date": "2026-02-28"
  }'

Update Campaign

Update an existing campaign's configuration.

PUT /campaigns/{campaign_id}

Use the same parameters as Create Campaign. Only include fields you want to update.

Delete Campaign

Delete a campaign. This action cannot be undone.

DELETE /campaigns/{campaign_id}

Warning

Deleting a campaign will stop all active ads and archive all associated data. This action cannot be reversed.

Reports Overview

The Reports API allows you to access detailed performance data for your campaigns.

Available Metrics

  • impressions - Total ad impressions
  • clicks - Total clicks
  • installs - App installs
  • spend - Total spend in USD
  • ctr - Click-through rate
  • cpi - Cost per install
  • roas - Return on ad spend

Campaign Reports

Get performance reports for specific campaigns.

GET /reports/campaigns/{campaign_id}
Request Example
curl -X GET "https://api.threndmobi.com/v2/reports/campaigns/camp_12345?start_date=2026-01-01&end_date=2026-01-15&granularity=daily" \
  -H "Authorization: Bearer YOUR_API_KEY"

Revenue Reports

Access monetization and revenue data (for publishers).

GET /reports/revenue

Upload Creative

Upload a new creative asset for your campaigns.

POST /creatives

Supported Formats

  • Images: PNG, JPG, GIF (max 2MB)
  • Videos: MP4, MOV (max 50MB)
  • HTML5: ZIP archive (max 5MB)

List Creatives

Retrieve all creatives in your account.

GET /creatives

SDKs & Libraries

We provide official SDKs for popular programming languages:

Python

pip install threndmobi

Node.js

npm install @threndmobi/sdk

PHP

composer require threndmobi/sdk

Java

Maven: threndmobi-sdk

Need Help?

Our developer support team is here to assist you.