API Documentation

Complete REST API reference for AdvertisingAPI. All endpoints are MCP-ready. AdKernel-compatible endpoints allow drop-in migration from existing integrations.

Quick Start

Base URL

https://rate.advertisingapi.com

1. Get a JWT token

# Login to get your token

curl -X POST https://rate.advertisingapi.com/api/auth/login \

-H "Content-Type: application/json" \

-d '{"email": "you@example.com", "password": "your-password"}'

# Response: { "token": "eyJhbG...", "accountId": "..." }

2. Create a campaign

curl -X POST https://rate.advertisingapi.com/api/campaigns \

-H "Authorization: Bearer YOUR_TOKEN" \

-H "Content-Type: application/json" \

-d '{

"name": "My First Campaign",

"campaignType": "banner",

"budget": 1000,

"bidStrategy": "cpm",

"startDate": "2026-01-01T00:00:00Z"

}'

API Reference

Authentication

POST/api/auth/register
POST/api/auth/login

Account

GET/api/accounts/me
PUT/api/accounts/:id

Campaigns

GET/api/campaigns
POST/api/campaigns
GET/api/campaigns/:id
PUT/api/campaigns/:id
DELETE/api/campaigns/:id
POST/api/campaigns/:id/pause

Campaigns (AdKernel-Compatible)

GET/admin/api/campaigns/grid
POST/admin/api/campaigns/grid
PUT/admin/api/campaigns/grid
GET/admin/api/campaigns/grid/:id
PUT/admin/api/campaigns/grid/togglePause
DELETE/admin/api/campaigns/grid/multiple
POST/admin/api/campaigns/grid/copy/:id
POST/admin/api/campaigns/grid/copyWithoutCreatives/:id

Creatives

GET/admin/api/creatives
POST/admin/api/creatives
PUT/admin/api/creatives
GET/admin/api/creatives/:id
PUT/admin/api/creatives/togglePause
PUT/admin/api/creatives/updateMultipleRecords
POST/admin/api/creatives/copy/:id

Exchanges

GET/admin/api/exchange
POST/admin/api/exchange
PUT/admin/api/exchange
GET/admin/api/exchange/:id

Campaign Groups

GET/admin/api/campaign-groups
POST/admin/api/campaign-groups
PUT/admin/api/campaign-groups
GET/admin/api/campaign-groups/:id
PUT/admin/api/campaign-groups/togglePause
POST/admin/api/campaign-groups/copy/:id

Targeting Reference Data

GET/admin/api/locations/tree
GET/admin/api/browsers/tree
GET/admin/api/operating-systems/tree
GET/admin/api/languages/tree
GET/admin/api/iab-categories/list
GET/admin/api/sizes/list
GET/admin/api/audience/tree
GET/admin/api/device-brands/tree
GET/admin/api/domain-lists/tree
GET/admin/api/ip-lists/tree
GET/admin/api/content-categories/tree

MCP Integration

All API endpoints are accessible via the Model Context Protocol (MCP). Connect your AI assistant to manage campaigns, analyze performance, and optimize targeting through natural language.

Compatible with Claude Desktop, ChatGPT, and any MCP-compatible client.

# Example MCP server configuration

{

"mcpServers": {

"advertisingapi": {

"url": "https://rate.advertisingapi.com/mcp"

}

}

}

Authentication

All endpoints except /api/auth/register and /api/auth/login require a JWT Bearer token in the Authorization header.

Authorization: Bearer eyJhbGciOiJIUzI1NiIs...

Tokens expire after 7 days. Request a new token via the login endpoint.

Response Format

All responses are JSON. Successful responses return the requested data directly. Errors return an error message:

Success (200)

{

"id": "campaign_123",

"name": "Summer Sale",

"status": "active",

"budget": 5000

}

Error (4xx/5xx)

{

"error": "Campaign not found"

}