Ir al contenido

API para editores

Lee tus sitios, zonas, estadísticas, ingresos y saldo desde tus propios scripts y herramientas. HTTPS y JSON simples, autenticados con una clave de API.

La referencia técnica se muestra en inglés. La interfaz está en español.

Inicio en 5 minutos

Make your first authenticated request, then read seven days of statistics. You need an active publisher account and cURL in your terminal.

  1. Crear una clave de lectura

    Open API keys in your account, create a key with publisher:read, and copy its secret once. Replace the placeholder below with your key on your own machine.

    export AGIMONE_API_KEY='adk_replace_with_your_key'
    Obtener clave
  2. Verificar tu cuenta

    A successful response is your profile: check id, role and publisher before you continue. A 401 means the key is missing, invalid or revoked.

    curl -fsS -H "Authorization: Bearer $AGIMONE_API_KEY" "${AGIMONE_API_BASE:-https://app.agimone.com}/v1/me"
  3. Consultar estadísticas

    Run this complete example in the same terminal. It selects the last seven calendar days in fixed EST (UTC−5), including today, and returns rows, totals and currency: USD. An empty rows array can be normal for a new account.

    #!/usr/bin/env bash
    # GET /v1/stats: daily pops, revenue and eCPM for the last 7 calendar days (EST, fixed UTC-5).
    # Needs: AGIMONE_API_KEY (create one at https://app.agimone.com/app/account/api-keys). Optional: AGIMONE_API_BASE, AGIMONE_FROM, AGIMONE_TO.
    set -euo pipefail
    BASE="${AGIMONE_API_BASE:-https://app.agimone.com}"
    # Snapshot the EST day once; calendar arithmetic uses that date label.
    TODAY="$(TZ=Etc/GMT+5 date +%F)"
    # `date -v` is BSD/macOS, `date -d` is GNU/Linux.
    FROM="${AGIMONE_FROM:-$(date -u -j -v-6d -f '%Y-%m-%d' "$TODAY" +%F 2>/dev/null || date -u -d "$TODAY -6 days" +%F)}"
    TO="${AGIMONE_TO:-$TODAY}"
    curl -fsS -H "Authorization: Bearer $AGIMONE_API_KEY" \
      "$BASE/v1/stats?from=$FROM&to=$TO&group_by=date&metrics=pops,revenue,ecpm"
    echo

Autenticación

Send your API key as a Bearer token on every request. Keys start with adk_ and are shown once, when you create them.

Create and revoke keys in your account at app.agimone.com/app/account/api-keys. Give a key the least access it needs: publisher:read for reading, publisher:write for changing sites and zones.

Base URL: https://app.agimone.com. Responses are JSON. Amounts are decimal strings in USD.

publisher:read
Read your sites, zones, statistics, earnings, balance and payouts. Start with this scope.
publisher:write
Change your sites and zones, or revoke keys. Add this scope only when needed; include publisher:read separately for read operations.

Keep keys on your server or in a secret store. Do not put them in browser code, public repositories, URLs or logs. To rotate a key, create a replacement, update your integration, then revoke the old key in the account page. Revoke a leaked key immediately.

OAuth para MCP

OAuth is for connecting an AI assistant through MCP. This REST reference uses API keys; follow the MCP guide for supported clients, account authorization and revocation.

Conectar mediante MCP

Límites de uso

Requests count in fixed 60-second windows. API keys have separate counters by key ID; signed-in web sessions share a counter per user. Public operations count per IP address. The me tier is shared by all sessions and user API keys of the same user.

NivelSe aplica aSolicitudes por minuto
readOther GET, HEAD and OPTIONS operations120
writePOST, PUT, PATCH and DELETE operations20
statsGET /v1/stats and GET /v1/stats/subid30
publicPublic routes, including the OpenAPI document (per IP)60
meGET and HEAD /v1/me (shared per user)600

Cabeceras de respuesta

  • RateLimit-Limit: Requests allowed in the current window.
  • RateLimit-Remaining: Requests left in the current window.
  • RateLimit-Reset: Seconds until the window ends.
  • Retry-After: On 429 only: seconds to wait before retrying.

Over the limit you get 429 with {"error":"rate_limited"}. The headers can be missing while the limiter is briefly unavailable; requests are then let through.

Errores

An error response is JSON with a stable error code, for example {"error":"unauthorized"}. Some operations include an optional message or structured detail. Branch on the HTTP status and error code; do not display raw messages as translated interface text.

CódigoHTTPSignificado
unauthorized401Missing, invalid or revoked API key. Check the Authorization header or replace the key.
forbidden403The key lacks the required scope, the publisher is not active, or this actor cannot perform the operation. Check account status and permissions before retrying.
rate_limited429The current window is full. Wait the number of seconds in Retry-After before retrying; avoid immediate retry loops.

The operation reference lists additional HTTP responses. Check its response schema in OpenAPI for the exact error codes and fields.

Paginación y resultados

There is no universal page, offset or cursor parameter. The site, zone, payout and API-key lists return arrays. Send only the parameters documented for each operation.

For /v1/stats, narrow from/to or add site_id, zone_id and other documented filters. A truncated: true response means some rows were omitted; split the date range or refine the filters instead of requesting a next-page cursor.

For /v1/stats/subid, limit selects the top results: default 100, maximum 1000 for JSON. This is not pagination. When truncated is true, the remaining labels are grouped into ~other; the totals still cover the full selection.

Fechas, horas e importes

Timestamp fields, including JSON hour values, use ISO 8601 in UTC (for example 2026-10-28T05:00:00Z). Reporting dates use EST, fixed UTC−5 all year; do not substitute America/New_York, which changes with daylight saving time.

The from and to dates are inclusive reporting-day labels (YYYY-MM-DD). One EST day runs from 05:00:00Z to just before 05:00:00Z the following day. CSV hour values display EST (UTC−5).

Statistics allow at most 366 inclusive days; grouping by hour allows 31 days, and sub-ID statistics allow 90 days. Split a larger range into non-overlapping reporting days.

Amounts are decimal strings in USD. Preserve decimal precision when calculating money. Revenue status is estimated, reported, final or mixed; eCPM can be null when there are no valid impressions. Hourly revenue may be allocated from daily revenue; inspect hourly_revenue_allocated.

Estabilidad y registro de cambios

The API is versioned by documentation date (current: 2026-10). Within /v1 we only add fields and operations. Removing a field or an operation is announced with Deprecation and Sunset response headers at least 183 days (six months) before it happens, and with an entry below.

Treat unknown response fields as normal and ignore them.

Cambios

2026-10

  • Añadido listSites: First public release
  • Añadido createSite: First public release
  • Añadido getSite: First public release
  • Añadido updateSite: First public release
  • Añadido listZones: First public release
  • Añadido listSiteZones: First public release
  • Añadido createZone: First public release
  • Añadido getZone: First public release
  • Añadido updateZone: First public release
  • Añadido getZoneCode: First public release
  • Añadido getStats: First public release
  • Añadido getEarnings: First public release
  • Añadido getBalance: First public release
  • Añadido listPayouts: First public release
  • Añadido getMe: First public release
  • Añadido whoAmI: First public release
  • Añadido listApiKeys: First public release
  • Añadido revokeApiKey: First public release
  • Añadido getOpenApiPublisher: First public release
  • Añadido getNotificationPrefs: First public release
  • Añadido listTelegramLinks: Read Telegram link status without chat identifiers
  • Añadido getNotificationPrefs (report_hour): Local hour for daily reports (0–23)

2026-10

  • Añadido getBalance (held): Active payout holds
  • Añadido getEarnings (adjustments[].source): Network or dispute adjustment source
  • Añadido getEarnings (adjustments[].earnings_day_id): Earnings day id for adjustment disputes
  • Añadido getIvtReport: Daily IVT by zone and EST date
  • Añadido getPayoutTerms: Public manual payout terms
  • Añadido listHolds: Publisher holds with evidence and decision times
  • Añadido listDisputes: Publisher disputes and deadlines
  • Añadido getDispute: Publisher dispute message thread
  • Añadido createDispute: Create a bounded publisher dispute
  • Añadido createDisputeMessage: Send a message to an open dispute

2026-10

  • Añadido getStatsAvailability: Available statistics views for the account configuration, with the first day carrying browser labels

2026-10

  • Añadido getSubidStats: Statistics by subid (sub1–sub3): pops, allocated revenue and eCPM, JSON or CSV
  • Añadido getSubidStatsAvailability: Whether statistics by subid are enabled

2026-10

  • Añadido deleteSite: Delete a site and its zones (requires the manage permission)
  • Añadido deleteZone: Delete a zone (requires the manage permission)
  • changed updateZone: direct_url_enabled can be changed with the Direct Link permission; X-Adnet-Confirm is only required when pausing a zone or turning Smart Link off
  • changed createZone: Accepts direct_url_enabled (requires the Direct Link permission to turn it on)
  • changed createSite: Sites are approved immediately when the auto-approve permission is enabled for the account
  • changed updateSite: The category can be changed after approval with the manage permission
  • changed getMe: publisher.permissions lists the advanced permissions enabled for the account

2026-10

  • Añadido patchSite: Change a site's category or note. Returns 202 with pending_category set when the change needs review; PUT /v1/sites/{id} now follows the same rule (202 instead of 409 manage_not_allowed or 400 site_kind_immutable)
  • Añadido getSite (pending_category): Category change awaiting review (null when none)
  • Añadido getSite (pending_category_at): When the pending category change was requested
  • Añadido getSite (deleted_at): Deletion time of a deleted site (null for live sites)
  • Añadido getSite (publisher_note): Your note for the review team (max 500 characters)
  • Añadido restoreSite: Restore a deleted site with manage permission. GET accepts include=deleted. POST /v1/sites restores your deleted site with 200, and conflicts use domain_exists, domain_taken or domain_archived instead of domain_deleted.

Operaciones

Every operation has a Markdown page for tools and language models.

Examples read AGIMONE_API_KEY (and optionally AGIMONE_API_BASE) from the environment and print the JSON response.

GET/v1/balance

Get balance

Current balance of the publisher: `available` is the amount that can be requested for payout, `pending` is estimated revenue (days AGIMone has not finalized yet; not payable until final), `requested` is the amount in open payout requests, `paid_total` is the total already paid out, and `min_payout` is the minimum payout amount. All amounts are money strings. Same numbers as the `balance` field of GET /v1/earnings. Requires scope `publisher:read` (API key or web session). Rate limit tier: `read`.

Alcance
publisher:read
Nivel de límite
read

Parámetros

Sin parámetros.

Respuesta

{ available: string; held: string; min_payout: string; paid_total: string; pending: string; requested: string }

Errores de la operación

The operation reference lists additional HTTP responses. Check its response schema in OpenAPI for the exact error codes and fields.

  • 401
  • 403
  • 429

Ejemplos

cURL
#!/usr/bin/env bash
# GET /v1/balance: current balance (pending, available, requested, paid_total, min_payout).
# Needs: AGIMONE_API_KEY (create one at https://app.agimone.com/app/account/api-keys). Optional: AGIMONE_API_BASE.
set -euo pipefail
BASE="${AGIMONE_API_BASE:-https://app.agimone.com}"
curl -fsS -H "Authorization: Bearer $AGIMONE_API_KEY" "$BASE/v1/balance"
echo
Node.js
// GET /v1/balance: current balance (pending, available, requested, paid_total, min_payout). Node 18+, no dependencies.
// Needs: AGIMONE_API_KEY (create one at https://app.agimone.com/app/account/api-keys). Optional: AGIMONE_API_BASE.
const base = process.env.AGIMONE_API_BASE ?? 'https://app.agimone.com';

const res = await fetch(`${base}/v1/balance`, {
  headers: { Authorization: `Bearer ${process.env.AGIMONE_API_KEY}` },
});
if (!res.ok) {
  console.error(`HTTP ${res.status}: ${await res.text()}`);
  process.exit(1);
}
console.log(JSON.stringify(await res.json()));
PHP
<?php
// GET /v1/balance: current balance (pending, available, requested, paid_total, min_payout). PHP 8 with the curl extension, no other dependencies.
// Needs: AGIMONE_API_KEY (create one at https://app.agimone.com/app/account/api-keys). Optional: AGIMONE_API_BASE.
$base = getenv('AGIMONE_API_BASE') ?: 'https://app.agimone.com';

$ch = curl_init("$base/v1/balance");
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . getenv('AGIMONE_API_KEY')],
    CURLOPT_TIMEOUT => 15,
]);
$body = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
if ($body === false || $status >= 400) {
    fwrite(STDERR, "HTTP $status: " . ($body === false ? curl_error($ch) : $body) . "\n");
    exit(1);
}
curl_close($ch);
echo trim($body), "\n";
Python
# GET /v1/balance: current balance (pending, available, requested, paid_total, min_payout). Python 3.8+, standard library only.
# Needs: AGIMONE_API_KEY (create one at https://app.agimone.com/app/account/api-keys). Optional: AGIMONE_API_BASE.
import json
import os
import sys
import urllib.error
import urllib.request

base = os.environ.get("AGIMONE_API_BASE", "https://app.agimone.com")
req = urllib.request.Request(
    f"{base}/v1/balance",
    headers={"Authorization": f"Bearer {os.environ['AGIMONE_API_KEY']}"},
)
try:
    with urllib.request.urlopen(req, timeout=15) as res:
        print(json.dumps(json.load(res)))
except urllib.error.HTTPError as e:
    print(f"HTTP {e.code}: {e.read().decode()}", file=sys.stderr)
    sys.exit(1)

GET/v1/disputes

List disputes

Publisher disputes with first-response (48 hours) and resolution (7 days) deadlines, overdue first. Requires `publisher:read`. Rate limit tier: `read`.

Alcance
publisher:read
Nivel de límite
read

Parámetros

Sin parámetros.

Respuesta

{ amount_returned: string | null; first_response_at: string | null; first_response_due_at: string; id: integer; opened_at: string; overdue: boolean; resolution: "upheld" | "rejected" | "partial" | null; resolve_due_at: string; resolved_at: string | null; status: "open" | "answered" | "resolved"; subject_id: integer | null; subject_type: "hold" | "adjustment" | "ivt" | "zone_quality" | "payout" | "other" }[]

Errores de la operación

The operation reference lists additional HTTP responses. Check its response schema in OpenAPI for the exact error codes and fields.

  • 401
  • 403
  • 429

POST/v1/disputes

Create dispute

Create a dispute with a message of up to 5,000 Unicode characters. At most five unresolved disputes per publisher and one zone-quality dispute per zone in 24 hours. Subjects must belong to the publisher. Requires `publisher:write`; view-as is read-only. Rate limit tier: `write`.

Alcance
publisher:write
Nivel de límite
write

Parámetros

Sin parámetros.

Cuerpo

{ message: string; subject_id?: integer | null; subject_type: "hold" | "adjustment" | "ivt" | "zone_quality" | "payout" | "other" }

Respuesta

{ amount_returned: string | null; first_response_at: string | null; first_response_due_at: string; id: integer; messages: { author_type: "publisher" | "admin"; body: string; created_at: string; id: integer }[]; opened_at: string; overdue: boolean; resolution: "upheld" | "rejected" | "partial" | null; resolve_due_at: string; resolved_at: string | null; status: "open" | "answered" | "resolved"; subject_id: integer | null; subject_type: "hold" | "adjustment" | "ivt" | "zone_quality" | "payout" | "other" }

Errores de la operación

The operation reference lists additional HTTP responses. Check its response schema in OpenAPI for the exact error codes and fields.

  • 400
  • 401
  • 403
  • 404
  • 409
  • 429

GET/v1/disputes/{id}

Get dispute

A publisher-owned dispute and its message thread. Requires `publisher:read`. Rate limit tier: `read`.

Alcance
publisher:read
Nivel de límite
read

Parámetros

NombreEnTipoObligatorio
idpathintegersí

Respuesta

{ amount_returned: string | null; first_response_at: string | null; first_response_due_at: string; id: integer; messages: { author_type: "publisher" | "admin"; body: string; created_at: string; id: integer }[]; opened_at: string; overdue: boolean; resolution: "upheld" | "rejected" | "partial" | null; resolve_due_at: string; resolved_at: string | null; status: "open" | "answered" | "resolved"; subject_id: integer | null; subject_type: "hold" | "adjustment" | "ivt" | "zone_quality" | "payout" | "other" }

Errores de la operación

The operation reference lists additional HTTP responses. Check its response schema in OpenAPI for the exact error codes and fields.

  • 401
  • 403
  • 404
  • 429

POST/v1/disputes/{id}/messages

Create dispute message

Send up to 5,000 Unicode characters to an unresolved publisher-owned dispute. A publisher reply reopens an answered dispute. Requires `publisher:write`; view-as is read-only. Rate limit tier: `write`.

Alcance
publisher:write
Nivel de límite
write

Parámetros

NombreEnTipoObligatorio
idpathintegersí

Cuerpo

{ message: string }

Respuesta

{ amount_returned: string | null; first_response_at: string | null; first_response_due_at: string; id: integer; messages: { author_type: "publisher" | "admin"; body: string; created_at: string; id: integer }[]; opened_at: string; overdue: boolean; resolution: "upheld" | "rejected" | "partial" | null; resolve_due_at: string; resolved_at: string | null; status: "open" | "answered" | "resolved"; subject_id: integer | null; subject_type: "hold" | "adjustment" | "ivt" | "zone_quality" | "payout" | "other" }

Errores de la operación

The operation reference lists additional HTTP responses. Check its response schema in OpenAPI for the exact error codes and fields.

  • 400
  • 401
  • 403
  • 404
  • 409
  • 429

GET/v1/earnings

Get earnings

Daily earnings in a date range together with the current balance. Requires scope `publisher:read` (API key or web session). Rate limit tier: `read`.

Alcance
publisher:read
Nivel de límite
read

Parámetros

NombreEnTipoObligatorio
fromquerystringsí
toquerystringsí

Respuesta

{ adjustments: { amount: string; detected_on: string; earnings_day_id: integer; for_date: string; source: "network" | "dispute" }[]; balance: { available: string; held: string; min_payout: string; paid_total: string; pending: string; requested: string }; count_basis?: "valid" | "legacy" | "mixed"; currency: "USD"; days: { adjustment: string; count_basis?: "valid" | "legacy" | "mixed"; date: string; pops: integer; revenue: string; status?: "estimated" | "reported" | "final" | "mixed" }[]; estimated_at?: string | null; forecast_basis_version?: "forecast-basis-v1"; forecast_generation?: string; forecast_updated_at?: string | null; measurement_definition?: { complete: boolean; includes_direct: boolean; includes_legacy: boolean; tag_valid_after_ms: integer[] }; measurement_generation?: string; measurement_status?: "ok" | "stale" | "updating"; measurement_updated_at?: string | null; money_basis_version?: string; money_generation?: string; updated_at?: string | null }

Errores de la operación

The operation reference lists additional HTTP responses. Check its response schema in OpenAPI for the exact error codes and fields.

  • 401
  • 403
  • 429
  • 503

GET/v1/holds

List payout holds

Up to 200 publisher holds, newest first, including evidence, decision status, seven-day forfeiture boundary and automatic release time. Active holds already reduce available balance. Requires `publisher:read`. Rate limit tier: `read`.

Alcance
publisher:read
Nivel de límite
read

Parámetros

Sin parámetros.

Respuesta

{ amount: string; auto_release_at: string; created_at: string; date_from: string; date_to: string; decided_at: string | null; decision_note: string | null; evidence: string; evidence_data: { cap: string; ivt: object | null; network_report_ref: string | null; reported_deduction: string | null; revenue_publisher: string; revshare_pct: number; suspect_pct: number | null }; forfeit_not_before: string; id: integer; original_amount: string; reason_code: "ivt_suspected" | "network_clawback_pending" | "policy_violation"; status: "active" | "released" | "forfeited"; zone_id: integer | null; zone_name: string | null }[]

Errores de la operación

The operation reference lists additional HTTP responses. Check its response schema in OpenAPI for the exact error codes and fields.

  • 401
  • 403
  • 429

GET/v1/me

Get my profile

Profile of the signed-in user (and publisher). Requires a user actor (API key of a user or web session). GET and HEAD use rate limit tier `me`: 600 requests/minute per user, shared by web sessions and user API keys. Other reads and profile writes keep their own rate limit tiers.

Alcance
cualquier clave o sesión
Nivel de límite
me
Markdown
get-me.md

Parámetros

Sin parámetros.

Respuesta

{ email: string; id: integer; locale: "en" | "vi" | "es" | "pt" | "fr" | "id" | "ru" | "zh" | "ar"; mfa_enabled: boolean; publisher: { display_name: string; id: integer; min_payout: string; payout_details_masked: string | null; payout_method: "paypal" | "usdt" | "bank" | null; payout_method_pending: { effective_at: string; masked: string; method: "paypal" | "usdt" | "bank"; requested_at: string } | null; permissions: { auto_approve_sites: boolean; direct_link: boolean; manage: boolean }; revshare_pct: number; status: "active" | "pending" | "suspended" } | null; role: "admin" | "publisher" | "advertiser"; security_notice: { at: string; kind: "mfa_enabled" | "mfa_disabled" | "mfa_reset_by_admin" | "recovery_regenerated" | "recovery_used" | "password_changed" | "login_new_device" | "session_revoked" | "payout_method_requested" | "payout_method_applied" | "payout_method_cancelled" | "telegram_linked" | "telegram_unlinked" | "telegram_payout_enabled" | "telegram_payout_disabled" } | null; timezone: string; view_as: { display_name: string; publisher_id: integer } | null }

Errores de la operación

The operation reference lists additional HTTP responses. Check its response schema in OpenAPI for the exact error codes and fields.

  • 401
  • 403
  • 429

GET/v1/me/api-keys

List API keys

List active API keys of the publisher (the secret is never returned again). Requires scope `publisher:read` (API key or web session). Rate limit tier: `read`.

Alcance
publisher:read
Nivel de límite
read

Parámetros

Sin parámetros.

Respuesta

{ created_at: string; id: integer; last_used_at: string | null; name: string; scopes: ("publisher:read" | "publisher:write" | "admin:read" | "admin:write" | "infra:read" | "infra:write" | "adv:read" | "adv:write" | "scan:work" | "dsp0:review")[] }[]

Errores de la operación

The operation reference lists additional HTTP responses. Check its response schema in OpenAPI for the exact error codes and fields.

  • 401
  • 403
  • 429

DELETE/v1/me/api-keys/{id}

Revoke an API key

Revoke an API key, for example one that leaked. Requires scope `publisher:write` (API key or web session); not available in view-as. Rate limit tier: `write`.

Alcance
publisher:write
Nivel de límite
write

Parámetros

NombreEnTipoObligatorio
idpathintegersí

Respuesta

any

Errores de la operación

The operation reference lists additional HTTP responses. Check its response schema in OpenAPI for the exact error codes and fields.

  • 401
  • 403
  • 404
  • 429

GET/v1/notifications/prefs

Get notification preferences

Which notification events are enabled on each channel. Changing them is web-only (signed-in person). Requires scope `publisher:read` (API key or web session). Rate limit tier: `read`.

Alcance
publisher:read
Nivel de límite
read

Parámetros

Sin parámetros.

Respuesta

{ items: { channel: "email" | "telegram" | "webhook" | "webpush"; enabled: boolean; event_type: "payout.upcoming" | "payout.status_changed" | "hold.created" | "hold.decided" | "dispute.replied" | "kyc.status_changed" | "zone.quality_changed" | "ivt.threshold_exceeded" | "zone.traffic_stopped" | "zone.traffic_resumed" | "day.finalized" | "report.daily" | "site.status_changed" | "referral.credited" | "support.replied" | "webhook.endpoint_disabled" | "account.security" | "ping"; locked: boolean }[]; report_hour?: integer }

Errores de la operación

The operation reference lists additional HTTP responses. Check its response schema in OpenAPI for the exact error codes and fields.

  • 401
  • 403
  • 429

GET/v1/openapi/publisher.json

Get the OpenAPI document

The OpenAPI 3 document of this API (publisher operations only). No authentication. Rate limit tier: `public` (60 requests/minute per IP). Cached for 5 minutes.

Nivel de límite
public

Parámetros

Sin parámetros.

Respuesta

{  }

Errores de la operación

The operation reference lists additional HTTP responses. Check its response schema in OpenAPI for the exact error codes and fields.

  • 429

GET/v1/payouts

List payouts

List the publisher's payout requests and their status. Requires scope `publisher:read` (API key or web session). Rate limit tier: `read`.

Alcance
publisher:read
Nivel de límite
read

Parámetros

Sin parámetros.

Respuesta

{ amount: string; decided_at: string | null; id: integer; method: "paypal" | "usdt" | "bank"; notes: string | null; paid_at: string | null; requested_at: string; status: "requested" | "approved" | "paid" | "rejected"; tx_ref: string | null }[]

Errores de la operación

The operation reference lists additional HTTP responses. Check its response schema in OpenAPI for the exact error codes and fields.

  • 401
  • 403
  • 429

GET/v1/public/payout-terms

Get public payout terms

Current manual payout schedule, enforced publisher defaults and IVT policy. Public; cached for 300 seconds. Rate limit tier: `public`.

Nivel de límite
public

Parámetros

Sin parámetros.

Respuesta

{ generated_at: string; ivt_policy: { effective_from: string; status: "draft" | "approved"; version: string }; methods: "usdt"[]; minimum_payout: string; revshare_default_pct: number; schedule: { approval_business_days: integer | null; mode: "manual" | "net7" }; upcoming_changes: { effective_from: string; summary: object }[] }

Errores de la operación

The operation reference lists additional HTTP responses. Check its response schema in OpenAPI for the exact error codes and fields.

  • 429

GET/v1/quality/ivt

Get IVT report

Daily IVT totals and filtering reasons for this publisher, by zone and fixed EST date (UTC-5), up to 92 days inclusive. Requires `publisher:read`. Rate limit tier: `read`.

Alcance
publisher:read
Nivel de límite
read

Parámetros

NombreEnTipoObligatorio
fromquerystringsí
toquerystringsí
zone_idqueryintegerno

Respuesta

{ rows: { by_reason: object; capped: integer; date: string; demand_as_of: string | null; demand_ivt_amount: string | null; filtered: integer; final: boolean; ivt_rate_pre: number | null; level: "ok" | "watch" | "strict" | "limited" | "paused_quality"; paused: integer; requests: integer; sent: integer; zone_id: integer }[] }

Errores de la operación

The operation reference lists additional HTTP responses. Check its response schema in OpenAPI for the exact error codes and fields.

  • 400
  • 401
  • 403
  • 404
  • 429

GET/v1/sites

List sites

List the publisher's live sites. Use `include=deleted` to also include deleted sites. Requires scope `publisher:read` (API key or web session). Rate limit tier: `read`.

Alcance
publisher:read
Nivel de límite
read

Parámetros

NombreEnTipoObligatorio
includequery"deleted"no

Respuesta

{ category: "mainstream" | "adult" | "network"; created_at: string; deleted_at: string | null; domain: string; id: integer; notes: string | null; pending_category: "mainstream" | "adult" | "network" | null; pending_category_at: string | null; publisher_note: string | null; status: "pending" | "approved" | "rejected"; zones_count: integer }[]

Errores de la operación

The operation reference lists additional HTTP responses. Check its response schema in OpenAPI for the exact error codes and fields.

  • 401
  • 403
  • 429

POST/v1/sites

Create a site

Register a new site (201). If you have the manage permission, adding your deleted site again restores it with the requested category (200). A conflict returns reason `domain_exists` for your live site, `domain_taken` for a domain reserved by another publisher, or `domain_archived` if you lack permission to restore your site. Requires scope `publisher:write` (API key or web session); not available in view-as. Rate limit tier: `write`.

Alcance
publisher:write
Nivel de límite
write

Parámetros

Sin parámetros.

Cuerpo

{ category: "mainstream" | "adult" | "network"; domain: string }

Respuesta

{ category: "mainstream" | "adult" | "network"; created_at: string; deleted_at: string | null; domain: string; id: integer; notes: string | null; pending_category: "mainstream" | "adult" | "network" | null; pending_category_at: string | null; publisher_note: string | null; status: "pending" | "approved" | "rejected"; zones_count: integer }

Errores de la operación

The operation reference lists additional HTTP responses. Check its response schema in OpenAPI for the exact error codes and fields.

  • 400
  • 401
  • 403
  • 409
  • 429

DELETE/v1/sites/{id}

Delete a site

Delete a site and all of its zones. Requires the manage permission on your account (ask support to enable it); otherwise 403 with reason manage_not_allowed. With an API key, send the header X-Adnet-Confirm: true. Traffic stops within seconds; statistics and earnings are kept. Add the same domain again to restore the site. Requires scope publisher:write; not available in view-as. Rate limit tier: write.

Alcance
publisher:write
Nivel de límite
write

Parámetros

NombreEnTipoObligatorio
idpathintegersí
x-adnet-confirmheaderstringno

Respuesta

any

Errores de la operación

The operation reference lists additional HTTP responses. Check its response schema in OpenAPI for the exact error codes and fields.

  • 401
  • 403
  • 404
  • 428
  • 429

GET/v1/sites/{id}

Get a site

Return one live site owned by the publisher. Use `include=deleted` to also look up deleted sites you own. Requires scope `publisher:read` (API key or web session). Rate limit tier: `read`.

Alcance
publisher:read
Nivel de límite
read
Markdown
get-site.md

Parámetros

NombreEnTipoObligatorio
includequery"deleted"no
idpathintegersí

Respuesta

{ category: "mainstream" | "adult" | "network"; created_at: string; deleted_at: string | null; domain: string; id: integer; notes: string | null; pending_category: "mainstream" | "adult" | "network" | null; pending_category_at: string | null; publisher_note: string | null; status: "pending" | "approved" | "rejected"; zones_count: integer }

Errores de la operación

The operation reference lists additional HTTP responses. Check its response schema in OpenAPI for the exact error codes and fields.

  • 401
  • 403
  • 404
  • 429

PATCH/v1/sites/{id}

Update a site (partial)

Update a site. `category`: mainstream, adult or network. Some changes on an approved site need review: the response is 202 and `pending_category` shows the requested value; the site keeps running with its current `category` until the review is done. Send the current category to cancel a pending request. Requires scope `publisher:write` (API key or web session); not available in view-as. Rate limit tier: `write`. `notes`: a note for the review team (max 500 characters); null or empty clears it.

Alcance
publisher:write
Nivel de límite
write

Parámetros

NombreEnTipoObligatorio
idpathintegersí

Cuerpo

{ category?: "mainstream" | "adult" | "network"; notes?: string | null }

Respuesta

{ category: "mainstream" | "adult" | "network"; created_at: string; deleted_at: string | null; domain: string; id: integer; notes: string | null; pending_category: "mainstream" | "adult" | "network" | null; pending_category_at: string | null; publisher_note: string | null; status: "pending" | "approved" | "rejected"; zones_count: integer }

Errores de la operación

The operation reference lists additional HTTP responses. Check its response schema in OpenAPI for the exact error codes and fields.

  • 400
  • 401
  • 403
  • 404
  • 409
  • 429

Ejemplos

cURL
#!/usr/bin/env bash
# Request mainstream for a site. HTTP 202 means it keeps its current category while the request is reviewed.
# Needs AGIMONE_API_KEY, AGIMONE_SITE_ID, curl and jq. Optional AGIMONE_API_BASE overrides the API URL.
set -euo pipefail
BASE="${AGIMONE_API_BASE:-https://app.agimone.com}"
SITE_ID="${AGIMONE_SITE_ID:?Set AGIMONE_SITE_ID to the site ID}"
curl -fsS -X PATCH -H "Authorization: Bearer $AGIMONE_API_KEY" -H 'Content-Type: application/json' \
  --data '{"category":"mainstream"}' "$BASE/v1/sites/$SITE_ID" | jq -c '{category, pending_category}'
Node.js
// Request mainstream for a site. HTTP 202 means it keeps its current category while the request is reviewed.
// Needs AGIMONE_API_KEY, AGIMONE_SITE_ID and Node 18+. Optional AGIMONE_API_BASE overrides the API URL.
const base = process.env.AGIMONE_API_BASE ?? 'https://app.agimone.com';
const siteId = process.env.AGIMONE_SITE_ID;
if (!siteId) {
  console.error('Set AGIMONE_SITE_ID to the site ID.');
  process.exit(1);
}

const res = await fetch(`${base}/v1/sites/${siteId}`, {
  method: 'PATCH',
  headers: { Authorization: `Bearer ${process.env.AGIMONE_API_KEY}`, 'Content-Type': 'application/json' },
  body: JSON.stringify({ category: 'mainstream' }),
});
if (!res.ok) {
  console.error(`HTTP ${res.status}: ${await res.text()}`);
  process.exit(1);
}
const { category, pending_category } = await res.json();
console.log(JSON.stringify({ category, pending_category }));
PHP
<?php
// Request mainstream for a site. HTTP 202 means it keeps its current category while the request is reviewed.
// Needs AGIMONE_API_KEY, AGIMONE_SITE_ID and PHP 8 with cURL. Optional AGIMONE_API_BASE overrides the API URL.
$base = getenv('AGIMONE_API_BASE') ?: 'https://app.agimone.com';
$siteId = getenv('AGIMONE_SITE_ID');
if (!$siteId) {
    fwrite(STDERR, "Set AGIMONE_SITE_ID to the site ID.\n");
    exit(1);
}

$ch = curl_init("$base/v1/sites/$siteId");
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'PATCH',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . getenv('AGIMONE_API_KEY'), 'Content-Type: application/json'],
    CURLOPT_POSTFIELDS => json_encode(['category' => 'mainstream']),
    CURLOPT_TIMEOUT => 15,
]);
$body = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
if ($body === false || $status >= 400) {
    fwrite(STDERR, "HTTP $status: " . ($body === false ? curl_error($ch) : $body) . "\n");
    exit(1);
}
curl_close($ch);
$site = json_decode($body, true, 512, JSON_THROW_ON_ERROR);
echo json_encode(['category' => $site['category'], 'pending_category' => $site['pending_category']]), "\n";
Python
# Request mainstream for a site. HTTP 202 means it keeps its current category while the request is reviewed.
# Needs AGIMONE_API_KEY, AGIMONE_SITE_ID and Python 3.8+. Optional AGIMONE_API_BASE overrides the API URL.
import json
import os
import sys
import urllib.error
import urllib.request

base = os.environ.get("AGIMONE_API_BASE", "https://app.agimone.com")
site_id = os.environ.get("AGIMONE_SITE_ID")
if not site_id:
    sys.exit("Set AGIMONE_SITE_ID to the site ID.")

req = urllib.request.Request(
    f"{base}/v1/sites/{site_id}",
    data=json.dumps({"category": "mainstream"}).encode("utf-8"),
    headers={
        "Authorization": f"Bearer {os.environ['AGIMONE_API_KEY']}",
        "Content-Type": "application/json",
    },
    method="PATCH",
)
try:
    with urllib.request.urlopen(req, timeout=15) as res:
        site = json.load(res)
        print(json.dumps({"category": site["category"], "pending_category": site["pending_category"]}))
except urllib.error.HTTPError as e:
    print(f"HTTP {e.code}: {e.read().decode()}", file=sys.stderr)
    sys.exit(1)

PUT/v1/sites/{id}

Update a site

Change the category of a site owned by the publisher: mainstream, adult or network. Prefer PATCH /v1/sites/{id}. Some changes on an approved site need review: the response is 202 and `pending_category` shows the requested value; the site keeps running with its current `category` until the review is done. Send the current category to cancel a pending request. Requires scope `publisher:write` (API key or web session); not available in view-as. Rate limit tier: `write`.

Alcance
publisher:write
Nivel de límite
write

Parámetros

NombreEnTipoObligatorio
idpathintegersí

Cuerpo

{ category: "mainstream" | "adult" | "network" }

Respuesta

{ category: "mainstream" | "adult" | "network"; created_at: string; deleted_at: string | null; domain: string; id: integer; notes: string | null; pending_category: "mainstream" | "adult" | "network" | null; pending_category_at: string | null; publisher_note: string | null; status: "pending" | "approved" | "rejected"; zones_count: integer }

Errores de la operación

The operation reference lists additional HTTP responses. Check its response schema in OpenAPI for the exact error codes and fields.

  • 400
  • 401
  • 403
  • 404
  • 409
  • 429

POST/v1/sites/{id}/restore

Restore a site

Restore a deleted site you own and the zones deleted with it. Restored zones stay paused. A live site is returned unchanged. Requires the manage permission and scope `publisher:write` (API key or web session); not available in view-as. A domain in use returns `domain_taken`. Rate limit tier: `write`.

Alcance
publisher:write
Nivel de límite
write

Parámetros

NombreEnTipoObligatorio
idpathintegersí

Respuesta

{ category: "mainstream" | "adult" | "network"; created_at: string; deleted_at: string | null; domain: string; id: integer; notes: string | null; pending_category: "mainstream" | "adult" | "network" | null; pending_category_at: string | null; publisher_note: string | null; status: "pending" | "approved" | "rejected"; zones_count: integer }

Errores de la operación

The operation reference lists additional HTTP responses. Check its response schema in OpenAPI for the exact error codes and fields.

  • 401
  • 403
  • 404
  • 409
  • 429

GET/v1/sites/{id}/zones

List zones of a site

List the ad zones of one site. Requires scope `publisher:read` (API key or web session). Rate limit tier: `read`.

Alcance
publisher:read
Nivel de límite
read

Parámetros

NombreEnTipoObligatorio
idpathintegersí

Respuesta

{ adblock_rate: number | null; category: "mainstream" | "adult"; category_source: "site" | "zone"; created_at: string; direct_url_enabled: boolean; freq: { cap_count: integer; cap_window_s: integer; delay_s: integer; min_interval_s: integer; per_page: integer | null; preset: "light" | "balanced" | "strong" | "per_page" | "custom"; repeat_after_s?: 0 | integer }; freq_cap_count: integer; freq_cap_hours: integer; id: integer; last_load_at: string | null; last_request_at: string | null; loads_24h: integer; name: string; requests_24h: integer; site_domain: string; site_id: integer; status: "active" | "paused"; tag_state: "never" | "stale" | "live"; via: "tag" | "smart_link" | "both" | null }[]

Errores de la operación

The operation reference lists additional HTTP responses. Check its response schema in OpenAPI for the exact error codes and fields.

  • 401
  • 403
  • 404
  • 429

POST/v1/sites/{id}/zones

Create a zone

Create an ad zone under a site. Requires scope `publisher:write` (API key or web session); not available in view-as. Rate limit tier: `write`.

Alcance
publisher:write
Nivel de límite
write

Parámetros

NombreEnTipoObligatorio
idpathintegersí

Cuerpo

{ category?: "mainstream" | "adult"; direct_url_enabled?: boolean; freq?: { cap_count?: integer; cap_window_s?: integer; delay_s?: integer; min_interval_s?: integer; per_page?: integer | null; preset: "light" | "balanced" | "strong" | "per_page" | "custom"; repeat_after_s?: 0 | integer }; freq_cap_count?: integer; freq_cap_hours?: integer; name: string }

Respuesta

{ adblock_rate: number | null; category: "mainstream" | "adult"; category_source: "site" | "zone"; created_at: string; direct_url_enabled: boolean; freq: { cap_count: integer; cap_window_s: integer; delay_s: integer; min_interval_s: integer; per_page: integer | null; preset: "light" | "balanced" | "strong" | "per_page" | "custom"; repeat_after_s?: 0 | integer }; freq_cap_count: integer; freq_cap_hours: integer; id: integer; last_load_at: string | null; last_request_at: string | null; loads_24h: integer; name: string; requests_24h: integer; site_domain: string; site_id: integer; status: "active" | "paused"; tag_state: "never" | "stale" | "live"; via: "tag" | "smart_link" | "both" | null }

Errores de la operación

The operation reference lists additional HTTP responses. Check its response schema in OpenAPI for the exact error codes and fields.

  • 400
  • 401
  • 403
  • 404
  • 409
  • 429

GET/v1/stats

Get statistics

Pops, revenue and eCPM for the publisher, grouped by date, hour, site, zone, country, device, os, browser or page_domain; JSON or CSV. The browser filter accepts canonical browser keys. Revenue by browser is allocated in proportion to impressions. The browser view may be unavailable or switched off; check /v1/stats/availability. Unavailable browser grouping or filtering returns 400 breakdown_unavailable with breakdown browser (JSON and CSV) before statistics queries. Grouping or filtering by page_domain is available only once measurement is active: before that it returns 400 `page_domain_unavailable`, and JSON responses carry `page_domain_available`. With group_by containing `hour` the range (both ends inclusive, EST business days) must be at most 31 days, otherwise 400 `hour_range`; hourly revenue of finalized days is an allocation of the daily revenue (response has `hourly_revenue_allocated: true`), not a per-hour measurement; hours of days not yet finalized are estimates. JSON hours are ISO UTC; CSV hours display EST (UTC-5). Each row has status estimated, reported, final or mixed; zero valid impressions have null eCPM. The response identifies the accepted count and money snapshot. Requires scope publisher:read (API key or web session). Rate limit tier: stats.

Alcance
publisher:read
Nivel de límite
stats
Markdown
get-stats.md

Parámetros

NombreEnTipoObligatorio
fromquerystringsí
toquerystringsí
group_byquery("date" | "hour" | "site" | "zone" | "country" | "device" | "os" | "browser" | "page_domain")[]no
metricsquery("pops" | "revenue" | "ecpm")[]no
site_idqueryintegerno
zone_idqueryintegerno
countryquerystringno
browserquery"chrome" | "safari" | "firefox" | "edge" | "samsung_internet" | "opera" | "uc_browser" | "yandex" | "other"no
page_domainquerystringno
formatquery"json" | "csv"no

Respuesta

{ browser_missing_days?: string[]; count_basis?: "valid" | "legacy" | "mixed"; currency: "USD"; data_as_of?: string | null; estimated_from: string | null; forecast_basis_version?: "forecast-basis-v1"; forecast_generation?: string; forecast_updated_at?: string | null; hourly_revenue_allocated?: true; measurement_definition?: { complete: boolean; includes_direct: boolean; includes_legacy: boolean; tag_valid_after_ms: integer[] }; measurement_generation?: string; measurement_status?: "ok" | "stale" | "updating"; measurement_updated_at?: string | null; money_basis_version?: string; money_generation?: string; page_domain_available?: boolean; rows: { browser?: "chrome" | "safari" | "firefox" | "edge" | "samsung_internet" | "opera" | "uc_browser" | "yandex" | "other"; country?: string; date?: string; device?: string; ecpm?: string | null; hour?: string; os?: string; page_domain?: string | null; pops?: integer; publisher_id?: integer; revenue?: string; site_deleted?: true; site_domain?: string; site_id?: integer; status?: "estimated" | "reported" | "final" | "mixed"; zone_deleted?: true; zone_id?: integer; zone_name?: string }[]; totals: { ecpm: string | null; pops: integer; revenue: string; status?: "estimated" | "reported" | "final" | "mixed" }; truncated?: boolean; updated_at?: string | null }

Errores de la operación

The operation reference lists additional HTTP responses. Check its response schema in OpenAPI for the exact error codes and fields.

  • 400
  • 401
  • 403
  • 404
  • 429
  • 503

Ejemplos

cURL
#!/usr/bin/env bash
# GET /v1/stats: daily pops, revenue and eCPM for the last 7 calendar days (EST, fixed UTC-5).
# Needs: AGIMONE_API_KEY (create one at https://app.agimone.com/app/account/api-keys). Optional: AGIMONE_API_BASE, AGIMONE_FROM, AGIMONE_TO.
set -euo pipefail
BASE="${AGIMONE_API_BASE:-https://app.agimone.com}"
# Snapshot the EST day once; calendar arithmetic uses that date label.
TODAY="$(TZ=Etc/GMT+5 date +%F)"
# `date -v` is BSD/macOS, `date -d` is GNU/Linux.
FROM="${AGIMONE_FROM:-$(date -u -j -v-6d -f '%Y-%m-%d' "$TODAY" +%F 2>/dev/null || date -u -d "$TODAY -6 days" +%F)}"
TO="${AGIMONE_TO:-$TODAY}"
curl -fsS -H "Authorization: Bearer $AGIMONE_API_KEY" \
  "$BASE/v1/stats?from=$FROM&to=$TO&group_by=date&metrics=pops,revenue,ecpm"
echo
Node.js
// GET /v1/stats: daily pops, revenue and eCPM for the last 7 calendar days (EST, fixed UTC-5). Node 18+, no dependencies.
// Needs: AGIMONE_API_KEY (create one at https://app.agimone.com/app/account/api-keys). Optional: AGIMONE_API_BASE, AGIMONE_FROM, AGIMONE_TO.
const base = process.env.AGIMONE_API_BASE ?? 'https://app.agimone.com';
const parts = new Intl.DateTimeFormat('en-US', { timeZone: 'Etc/GMT+5', year: 'numeric', month: '2-digit', day: '2-digit' }).formatToParts(new Date());
const part = (type) => parts.find((p) => p.type === type).value;
const today = `${part('year')}-${part('month')}-${part('day')}`;
const day = (offset) => new Date(Date.parse(`${today}T00:00:00Z`) + offset * 86_400_000).toISOString().slice(0, 10);
const query = new URLSearchParams({
  from: process.env.AGIMONE_FROM ?? day(-6),
  to: process.env.AGIMONE_TO ?? today,
  group_by: 'date',
  metrics: 'pops,revenue,ecpm',
});

const res = await fetch(`${base}/v1/stats?${query}`, {
  headers: { Authorization: `Bearer ${process.env.AGIMONE_API_KEY}` },
});
if (!res.ok) {
  console.error(`HTTP ${res.status}: ${await res.text()}`);
  process.exit(1);
}
console.log(JSON.stringify(await res.json()));
PHP
<?php
// GET /v1/stats: daily pops, revenue and eCPM for the last 7 calendar days (EST, fixed UTC-5). PHP 8 with the curl extension, no other dependencies.
// Needs: AGIMONE_API_KEY (create one at https://app.agimone.com/app/account/api-keys). Optional: AGIMONE_API_BASE, AGIMONE_FROM, AGIMONE_TO.
$base = getenv('AGIMONE_API_BASE') ?: 'https://app.agimone.com';
$today = new DateTimeImmutable('now', new DateTimeZone('Etc/GMT+5'));
$query = http_build_query([
    'from' => getenv('AGIMONE_FROM') ?: $today->modify('-6 days')->format('Y-m-d'),
    'to' => getenv('AGIMONE_TO') ?: $today->format('Y-m-d'),
    'group_by' => 'date',
    'metrics' => 'pops,revenue,ecpm',
]);

$ch = curl_init("$base/v1/stats?$query");
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . getenv('AGIMONE_API_KEY')],
    CURLOPT_TIMEOUT => 15,
]);
$body = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
if ($body === false || $status >= 400) {
    fwrite(STDERR, "HTTP $status: " . ($body === false ? curl_error($ch) : $body) . "\n");
    exit(1);
}
curl_close($ch);
echo trim($body), "\n";
Python
# GET /v1/stats: daily pops, revenue and eCPM for the last 7 calendar days (EST, fixed UTC-5). Python 3.8+, standard library only.
# Needs: AGIMONE_API_KEY (create one at https://app.agimone.com/app/account/api-keys). Optional: AGIMONE_API_BASE, AGIMONE_FROM, AGIMONE_TO.
import json
import os
import sys
import urllib.error
import urllib.parse
import urllib.request
from datetime import datetime, timedelta, timezone

base = os.environ.get("AGIMONE_API_BASE", "https://app.agimone.com")
# Fixed UTC-5 is Etc/GMT+5; Python 3.8 needs no zoneinfo/tzdata dependency.
today = datetime.now(timezone(timedelta(hours=-5))).date()
query = urllib.parse.urlencode({
    "from": os.environ.get("AGIMONE_FROM", str(today - timedelta(days=6))),
    "to": os.environ.get("AGIMONE_TO", str(today)),
    "group_by": "date",
    "metrics": "pops,revenue,ecpm",
})
req = urllib.request.Request(
    f"{base}/v1/stats?{query}",
    headers={"Authorization": f"Bearer {os.environ['AGIMONE_API_KEY']}"},
)
try:
    with urllib.request.urlopen(req, timeout=15) as res:
        print(json.dumps(json.load(res)))
except urllib.error.HTTPError as e:
    print(f"HTTP {e.code}: {e.read().decode()}", file=sys.stderr)
    sys.exit(1)

GET/v1/stats/availability

Get available statistics views

Returns browser_available: true when statistics may be grouped or filtered by browser, or false when this view is unavailable for the account configuration. Also returns browser_enabled: false when the browser view is switched off (hide the option) and browser_data_since: the first EST business day (YYYY-MM-DD) from which every hour carries a browser label, or null when unknown; earlier traffic is grouped as other. Check before selecting a browser view. Unavailable browser grouping or filtering returns 400 breakdown_unavailable with breakdown browser for JSON and CSV. Requires scope publisher:read (API key or web session). Rate limit tier: read.

Alcance
publisher:read
Nivel de límite
read

Parámetros

Sin parámetros.

Respuesta

{ browser_available: boolean; browser_data_since?: string | null; browser_enabled?: boolean }

Errores de la operación

The operation reference lists additional HTTP responses. Check its response schema in OpenAPI for the exact error codes and fields.

  • 401
  • 403
  • 429

GET/v1/stats/subid

Get statistics by subid

Pops, revenue and eCPM grouped by sub1, sub2 and sub3, for at most 90 days; JSON or CSV. Revenue per subid is an allocation of the revenue reported by /v1/stats for each zone and country in proportion to pops, not a separate measurement (`revenue_allocated` is always true); the totals equal the totals of /v1/stats for the same range and filters. Rows are sorted by revenue; rows beyond `limit` are merged into one row whose subid is `~other`. A null subid means no subid was sent. Requires scope publisher:read (API key or web session). Rate limit tier: stats.

Alcance
publisher:read
Nivel de límite
stats

Parámetros

NombreEnTipoObligatorio
fromquerystringsí
toquerystringsí
group_byquery("sub1" | "sub2" | "sub3")[]no
site_idqueryintegerno
zone_idqueryintegerno
sub1querystringno
sub2querystringno
sub3querystringno
limitqueryintegerno
formatquery"json" | "csv"no

Respuesta

{ count_basis?: "valid" | "legacy" | "mixed"; currency: "USD"; estimated_from: string | null; forecast_basis_version?: "forecast-basis-v1"; forecast_generation?: string; forecast_updated_at?: string | null; measurement_definition?: { complete: boolean; includes_direct: boolean; includes_legacy: boolean; tag_valid_after_ms: integer[] }; measurement_generation?: string; measurement_status?: "ok" | "stale" | "updating"; measurement_updated_at?: string | null; money_basis_version?: string; money_generation?: string; revenue_allocated: true; rows: { ecpm: string | null; pops: integer; revenue: string; status?: "estimated" | "reported" | "final" | "mixed"; sub1?: string | null; sub2?: string | null; sub3?: string | null }[]; totals: { ecpm: string | null; pops: integer; revenue: string; status?: "estimated" | "reported" | "final" | "mixed" }; truncated?: boolean; updated_at?: string | null }

Errores de la operación

The operation reference lists additional HTTP responses. Check its response schema in OpenAPI for the exact error codes and fields.

  • 400
  • 401
  • 403
  • 404
  • 429
  • 503

GET/v1/stats/subid/availability

Subid statistics availability

Whether statistics by subid are enabled. Requires scope publisher:read (API key or web session).

Alcance
publisher:read
Nivel de límite
read

Parámetros

Sin parámetros.

Respuesta

{ enabled: boolean }

Errores de la operación

The operation reference lists additional HTTP responses. Check its response schema in OpenAPI for the exact error codes and fields.

  • 401
  • 403
  • 429

GET/v1/whoami

Who am I

Actor behind the current API key or session, with its scopes. Any authenticated actor. Rate limit tier: `read`.

Alcance
cualquier clave o sesión
Nivel de límite
read
Markdown
who-am-i.md

Parámetros

Sin parámetros.

Respuesta

{ actor_id: integer | null; actor_type: string; api_key_id: integer | null; scopes: ("publisher:read" | "publisher:write" | "admin:read" | "admin:write" | "infra:read" | "infra:write" | "adv:read" | "adv:write" | "scan:work" | "dsp0:review")[] }

Errores de la operación

The operation reference lists additional HTTP responses. Check its response schema in OpenAPI for the exact error codes and fields.

  • 401
  • 403
  • 429

GET/v1/zones

List zones

List all ad zones of the publisher, optionally filtered by site_id. Requires scope `publisher:read` (API key or web session). Rate limit tier: `read`.

Alcance
publisher:read
Nivel de límite
read

Parámetros

NombreEnTipoObligatorio
site_idqueryintegerno

Respuesta

{ adblock_rate: number | null; category: "mainstream" | "adult"; category_source: "site" | "zone"; created_at: string; direct_url_enabled: boolean; freq: { cap_count: integer; cap_window_s: integer; delay_s: integer; min_interval_s: integer; per_page: integer | null; preset: "light" | "balanced" | "strong" | "per_page" | "custom"; repeat_after_s?: 0 | integer }; freq_cap_count: integer; freq_cap_hours: integer; id: integer; last_load_at: string | null; last_request_at: string | null; loads_24h: integer; name: string; requests_24h: integer; site_domain: string; site_id: integer; status: "active" | "paused"; tag_state: "never" | "stale" | "live"; via: "tag" | "smart_link" | "both" | null }[]

Errores de la operación

The operation reference lists additional HTTP responses. Check its response schema in OpenAPI for the exact error codes and fields.

  • 401
  • 403
  • 429

DELETE/v1/zones/{id}

Delete a zone

Delete a zone. Requires the manage permission on your account (ask support to enable it); otherwise 403 with reason manage_not_allowed. With an API key, send the header X-Adnet-Confirm: true. Traffic stops within seconds; statistics and earnings are kept. Contact support to restore the zone. Requires scope publisher:write; not available in view-as. Rate limit tier: write.

Alcance
publisher:write
Nivel de límite
write

Parámetros

NombreEnTipoObligatorio
idpathintegersí
x-adnet-confirmheaderstringno

Respuesta

any

Errores de la operación

The operation reference lists additional HTTP responses. Check its response schema in OpenAPI for the exact error codes and fields.

  • 401
  • 403
  • 404
  • 428
  • 429

GET/v1/zones/{id}

Get a zone

Return one zone owned by the publisher. Requires scope `publisher:read` (API key or web session). Rate limit tier: `read`.

Alcance
publisher:read
Nivel de límite
read
Markdown
get-zone.md

Parámetros

NombreEnTipoObligatorio
idpathintegersí

Respuesta

{ adblock_rate: number | null; category: "mainstream" | "adult"; category_source: "site" | "zone"; created_at: string; direct_url_enabled: boolean; freq: { cap_count: integer; cap_window_s: integer; delay_s: integer; min_interval_s: integer; per_page: integer | null; preset: "light" | "balanced" | "strong" | "per_page" | "custom"; repeat_after_s?: 0 | integer }; freq_cap_count: integer; freq_cap_hours: integer; id: integer; last_load_at: string | null; last_request_at: string | null; loads_24h: integer; name: string; requests_24h: integer; site_domain: string; site_id: integer; status: "active" | "paused"; tag_state: "never" | "stale" | "live"; via: "tag" | "smart_link" | "both" | null }

Errores de la operación

The operation reference lists additional HTTP responses. Check its response schema in OpenAPI for the exact error codes and fields.

  • 401
  • 403
  • 404
  • 429

PUT/v1/zones/{id}

Update a zone

Update fields of a zone owned by the publisher. Requires scope `publisher:write` (API key or web session); not available in view-as. Renaming and changing frequency need no confirmation. With an API key, pausing an active zone or turning its Smart Link off requires the header `X-Adnet-Confirm: true` (otherwise 428). Changing `direct_url_enabled` needs the Direct Link permission (403 `direct_link_not_allowed`). After the site is approved, changing the category of a network-site zone from mainstream to adult is always allowed; from adult to mainstream requires the manage permission (409 `manage_not_allowed`). Rate limit tier: `write`.

Alcance
publisher:write
Nivel de límite
write

Parámetros

NombreEnTipoObligatorio
idpathintegersí
x-adnet-confirmheaderstringno

Cuerpo

{ category?: "mainstream" | "adult"; direct_url_enabled?: boolean; freq?: { cap_count?: integer; cap_window_s?: integer; delay_s?: integer; min_interval_s?: integer; per_page?: integer | null; preset: "light" | "balanced" | "strong" | "per_page" | "custom"; repeat_after_s?: 0 | integer }; freq_cap_count?: integer; freq_cap_hours?: integer; name?: string; status?: "active" | "paused" }

Respuesta

{ adblock_rate: number | null; category: "mainstream" | "adult"; category_source: "site" | "zone"; created_at: string; direct_url_enabled: boolean; freq: { cap_count: integer; cap_window_s: integer; delay_s: integer; min_interval_s: integer; per_page: integer | null; preset: "light" | "balanced" | "strong" | "per_page" | "custom"; repeat_after_s?: 0 | integer }; freq_cap_count: integer; freq_cap_hours: integer; id: integer; last_load_at: string | null; last_request_at: string | null; loads_24h: integer; name: string; requests_24h: integer; site_domain: string; site_id: integer; status: "active" | "paused"; tag_state: "never" | "stale" | "live"; via: "tag" | "smart_link" | "both" | null }

Errores de la operación

The operation reference lists additional HTTP responses. Check its response schema in OpenAPI for the exact error codes and fields.

  • 400
  • 401
  • 403
  • 404
  • 409
  • 428
  • 429

GET/v1/zones/{id}/code

Get zone embed code

Return the embed code snippet for a zone. Requires scope `publisher:read` (API key or web session). Rate limit tier: `read`.

Alcance
publisher:read
Nivel de límite
read

Parámetros

NombreEnTipoObligatorio
idpathintegersí

Respuesta

{ direct_url: string | null; loader: string; tag: { adblock_rate: number | null; last_load_at: string | null; last_request_at: string | null; loads_24h: integer; requests_24h: integer; state: "never" | "stale" | "live"; via: "tag" | "smart_link" | "both" | null } }

Errores de la operación

The operation reference lists additional HTTP responses. Check its response schema in OpenAPI for the exact error codes and fields.

  • 401
  • 403
  • 404
  • 429

Solo web

These operations are not part of the public API. They are available only in the signed-in web app, because they move money or change security settings.

  • POST /v1/payouts
    Requesting a payout. With an API key it returns 403 human_required.
  • PUT /v1/me/payout-method
    Changing where payouts are sent. Web only.
  • PUT /v1/notifications/prefs
    Notification channels, including security alerts. Web only, so a leaked key cannot switch alerts off.
  • PUT /v1/me/password
    Changing your password. Web only.
  • POST /v1/me/api-keys
    Creating API keys. Web only; keys can list and revoke keys but not create them.
  • PUT /v1/me
    Not part of the public API.