Developer Resources
API Documentation

API Documentation

AIAD offers a robust, developer-friendly API for programmatically accessing its advanced digital advertising ecosystem. Whether you’re building applications to manage ad campaigns, track performance metrics, or leverage fraud prevention tools, the API is designed to be highly flexible, scalable, and secure.

Core Features of the API

  • Comprehensive Campaign Management: Create, update, and delete ad campaigns programmatically.
  • Real-Time Metrics: Fetch live campaign performance data such as clicks, impressions, and conversion rates.
  • Fraud Detection: Access fraud analysis results and flagged activities for campaigns.
  • Blockchain Integration: Query blockchain-verified records for maximum transparency and accountability.
  • Token-Powered Payments: Manage API usage fees and campaign budgets using $AIAD tokens.

Getting Started

Base URL

The AIAD API is accessible at:

AIAD Base URL
https://api.aiad.info/v1

Authentication

The API uses Bearer Token Authentication. Obtain your API key from the AIAD Developer Dashboard after registering your account. Include the API key in the Authorization header of each request:

The AIAD API is accessible at:

AIAD Bearer Token Authentication
Authorization: Bearer <API_KEY>

API Endpoints

Create an Ad Campaign

Endpoint:

Create an Ad Campaign Endpoint
POST /campaigns

Headers:

Headers
Authorization: Bearer <API_KEY>
Content-Type: application/json

Request Body:

Request Body
{
  "campaignName": "Summer Sale Campaign",
  "budget": 10000,
  "targetAudience": {
    "ageRange": [18, 35],
    "interests": ["fashion", "outdoors"]
  },
  "adContent": {
    "headline": "50% Off Summer Sale!",
    "description": "Don't miss out on these amazing deals!",
    "imageUrl": "https://example.com/image.jpg"
  }
}

Response:

Response
{
  "campaignId": "camp12345",
  "status": "created",
  "message": "Campaign successfully created."
}

Fetch Campaign Metrics

Endpoint:

Fetch Campaign Metrics Endpoint
GET /campaigns/{campaignId}/metrics

Headers:

Headers
Authorization: Bearer <API_KEY>

Response:

Response
{
  "impressions": 15000,
  "clicks": 1200,
  "ctr": 8.0,
  "conversions": 350
}

Explanation:

Impressions: Total views of the ad.

Clicks: Total clicks on the ad.

CTR: Click-through rate (percentage of clicks relative to impressions).

Conversions: Total successful actions (e.g., purchases, sign-ups).

Fetch Campaign Metrics

Endpoint:

Fraud Detection Report Endpoint
GET /campaigns/{campaignId}/fraud-report

Headers:

Headers
Authorization: Bearer <API_KEY>

Response:

Fraud Detection Report Response
{
  "suspiciousClicks": 120,
  "botTraffic": 85,
  "flaggedSources": ["192.168.1.10", "192.168.1.25"],
  "recommendations": "Consider blocking flagged sources and reducing CPC rates for this audience."
}

Developer-Friendly Features

Rate Limiting

  • The API enforces rate limits of 10 requests per second per user to ensure fair and efficient access.

  • Exceeding the limit results in a 429 Too Many Requests response.

Error Handling

The API returns structured error messages for easier debugging. Response:

Error Handling Returns
{
  "error": {
    "code": 400,
    "message": "Invalid campaignId provided."
  }
}

Dashboard for Developers

View API usage statistics, manage keys, and monitor request quotas through the AIAD Developer Dashboard.


Free Plan and Pricing

AIAD offers a flexible and developer-friendly pricing structure, combining accessibility with fairness to ensure seamless integration into its ecosystem.

Free Tier

All developers start with 10,000 free API requests, giving them an opportunity to explore and leverage AIAD's robust advertising platform without any upfront cost. To activate the free tier, users are required to link a payment method. This measure ensures fair access, prevents misuse, and maintains the integrity of the platform.

Paid Plans

Once the free tier is utilized, additional API requests are billed in $AIAD tokens, the native currency of the AIAD ecosystem. Developers have multiple payment options to ensure a smooth experience:

  • Pay-As-You-Go: Developers can directly sign transactions via their wallet for precise usage-based billing.
  • Linked Payment Method: A linked payment method ensures automated billing for uninterrupted access to the API.

Exclusive Benefits for Green Pass Holders

Green Pass holders enjoy additional perks, including discounted API rates and priority support. This makes the Green Pass a valuable asset for developers and businesses seeking cost-effective and premium access to AIAD's advanced tools. While the Green Pass unlocks several utilities across the AIAD platform, its discounts on API usage provide a tangible benefit to long-term users.

With this tiered structure, AIAD ensures that all developers—from startups to enterprises—can seamlessly access its ecosystem while supporting its decentralized and token-driven model.

Advanced Features

  • Advanced Analytics Endpoints: API features to predict campaign success using AI algorithms.
  • GraphQL Integration: Allow developers to fetch only the data they need, improving efficiency.
  • Webhooks: Get real-time updates on campaign events like fraud detection and budget thresholds.

This documentation is to provide more scenarios and applications for developers interested in building and interacting with AIAD core application through API. Stay tuned to find out about AIAD new features, programs, resources and code examples, by subscribing to our official channels only.