Skip to content

Developer API

The Adexium Developer API is a REST API for external integrators: campaigns, creative assets, account balance, targeting dictionaries, and campaign analytics.

Base URL: https://api.adexium.io

Authentication

Every request must include your API key:

http
Authorization: Bearer <api_key>

You can find the API key in your account settings. API access must be enabled for your user (isApiAvailable).

Interactive documentation

Full endpoint reference, request/response schemas, and “Try it out”:

https://api.adexium.io/developer/api/doc

OpenAPI JSON (for code generators and MCP tools):

https://api.adexium.io/api/doc.json

Typical workflow

  1. Upload a creativePOST /api/v1/assets/from-url or POST /api/v1/assets → receive path
  2. Create a campaignPOST /api/v1/campaigns/{channel} with creatives[].creative set to that path
  3. List or updateGET /api/v1/campaigns, GET/PATCH /api/v1/campaigns/{id}
  4. StatsGET /api/v1/campaigns/stats/{id}?startDate=...&endDate=...&splitBy=country

Channels for create: tma, ime_messenger, web_pops, web_inpage, web_push, bot.

MCP integration

You can connect AI agents (Cursor, Claude Desktop, etc.) to Adexium via Model Context Protocol (MCP). An MCP server is a thin HTTP wrapper: the agent calls tools, your server calls https://api.adexium.io/api/v1/... with Authorization: Bearer <api_key>.

mermaid
flowchart LR
    Agent[AI Agent] --> MCP[MCP Server]
    MCP -->|Bearer api_key| API["api.adexium.io /api/v1"]
ToolHTTP
get_balanceGET /api/v1/account/balance
list_campaignsGET /api/v1/campaigns
get_campaign / update_campaignGET / PATCH /api/v1/campaigns/{id}
create_campaignPOST /api/v1/campaigns/{channel}
upload_asset_from_urlPOST /api/v1/assets/from-url
upload_asset_filePOST /api/v1/assets (multipart)
get_campaign_statsGET /api/v1/campaigns/stats/{id}
list_dictionaryGET /api/v1/dictionaries/{type}

Use the OpenAPI spec to generate tool schemas or implement tools manually.

Creating a campaign with an image

  1. Call upload_asset_from_url or upload_asset_file → get path from the response
  2. Call create_campaign with creatives[].creative = path (do not pass large base64 through the chat context)
  3. Use list_campaigns or get_campaign when you need campaign id for updates or stats

Cursor configuration example

Add to MCP settings (mcp.json or Cursor Settings → MCP):

json
{
  "mcpServers": {
    "adexium": {
      "command": "node",
      "args": ["/path/to/your-adexium-mcp/dist/index.js"],
      "env": {
        "ADEXIUM_API_BASE": "https://api.adexium.io",
        "ADEXIUM_API_KEY": "your-api-key"
      }
    }
  }
}

Replace /path/to/your-adexium-mcp/... with your own MCP server implementation.

Security and limits

  • Store the API key only in MCP server env or secrets — never in prompts, git, or client-side code.
  • /api/v1 is rate-limited (~2 requests per second per IP). Implement backoff/retry on HTTP 429 in your MCP server.