{
    "openapi": "3.0.3",
    "info": {
        "title": "ArchyMap API",
        "version": "1.0.0",
        "description": "Geolocated media intelligence over HTTPS.\n\n**Authentication.** Business and Enterprise plans create API keys under *Account → API access* and send them as `Authorization: Bearer am_live_…` (or `X-API-Key`). Signed-in browser sessions can also call data and account endpoints; state-changing calls from a session need the `X-CSRF` header.\n\n**Conventions.** JSON, UTF-8, timestamps in ISO 8601 UTC. Lists return `data` and `meta` (`count`, `total`, `has_more`, `next_cursor`); pass `cursor` to fetch the next page. Errors return `{\"error\":{\"code\",\"message\"}}`.\n\n**Limits.** Per-key rate limit is exposed in `X-RateLimit-Limit`, `X-RateLimit-Remaining`, `X-RateLimit-Reset`. Free sessions see the last 24 hours, paid plans 7 days.\n\n**Content.** Headlines link to the original publisher; full texts are not served.",
        "contact": {
            "name": "ArchyMap support",
            "url": "https://archymap.com/contact"
        },
        "termsOfService": "https://archymap.com/terms"
    },
    "servers": [
        {
            "url": "https://archymap.com/api/v1",
            "description": "Production"
        }
    ],
    "tags": [
        {
            "name": "System",
            "description": "Service health, statistics, plans and the price calculator."
        },
        {
            "name": "News",
            "description": "Geolocated headlines and topics."
        },
        {
            "name": "Analytics",
            "description": "Trends and news intensity by country."
        },
        {
            "name": "Places",
            "description": "Countries, regions, cities and place search."
        },
        {
            "name": "Sources",
            "description": "Monitored main media."
        },
        {
            "name": "Network",
            "description": "ArchyMap network sites available for advertising."
        },
        {
            "name": "Account",
            "description": "Your profile, notifications, API keys and usage."
        },
        {
            "name": "Monitoring",
            "description": "Monitoring campaigns: collect news by place, topic and keyword, with alerts and export."
        },
        {
            "name": "Watchlists",
            "description": "Legacy saved filters. Use Monitoring instead."
        },
        {
            "name": "Companies",
            "description": "Company profiles and verification."
        },
        {
            "name": "Creatives",
            "description": "Logos and banners (moderated)."
        },
        {
            "name": "Campaigns",
            "description": "Advertising campaigns and statistics."
        },
        {
            "name": "Billing",
            "description": "Orders and invoices."
        }
    ],
    "paths": {
        "/health": {
            "get": {
                "tags": [
                    "System"
                ],
                "summary": "Service health",
                "description": "Freshness of the data pipeline and API status. Suitable for uptime monitors.",
                "operationId": "get_health",
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/Health"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "security": []
            }
        },
        "/stats": {
            "get": {
                "tags": [
                    "System"
                ],
                "summary": "Platform statistics",
                "description": "Public counters: sources, countries, network sites and stories in the last 24 hours.",
                "operationId": "get_stats",
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/Stats"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "security": []
            }
        },
        "/plans": {
            "get": {
                "tags": [
                    "System"
                ],
                "summary": "Subscription plans",
                "description": "Plans, monthly prices and included features.",
                "operationId": "get_plans",
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/Plan"
                                            }
                                        },
                                        "meta": {
                                            "$ref": "#/components/schemas/Meta"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "security": []
            }
        },
        "/pricing/estimate": {
            "post": {
                "tags": [
                    "System"
                ],
                "summary": "Estimate campaign price",
                "description": "Calculates the price of a campaign without creating anything. Pass your plan to see the plan discount.",
                "operationId": "post_pricing_estimate",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "format": {
                                        "description": "banner, text or article",
                                        "type": "string",
                                        "enum": [
                                            "banner",
                                            "text",
                                            "article"
                                        ],
                                        "example": "banner"
                                    },
                                    "countries": {
                                        "description": "ISO country codes for map placement, or [\"ALL\"] for worldwide",
                                        "type": "array",
                                        "items": {
                                            "type": "string"
                                        },
                                        "example": [
                                            "DE",
                                            "PL"
                                        ]
                                    },
                                    "sites": {
                                        "description": "Network site domains (instead of countries)",
                                        "type": "array",
                                        "items": {
                                            "type": "string"
                                        },
                                        "example": [
                                            "finpulseua.site"
                                        ]
                                    },
                                    "start_date": {
                                        "description": "YYYY-MM-DD",
                                        "type": "string",
                                        "example": "2026-12-01"
                                    },
                                    "end_date": {
                                        "description": "YYYY-MM-DD",
                                        "type": "string",
                                        "example": "2026-12-14"
                                    },
                                    "plan": {
                                        "description": "Your plan for the discount",
                                        "type": "string",
                                        "enum": [
                                            "free",
                                            "pro",
                                            "business",
                                            "enterprise"
                                        ],
                                        "example": "business"
                                    }
                                },
                                "required": [
                                    "format",
                                    "start_date",
                                    "end_date"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/Quote"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "security": []
            }
        },
        "/news": {
            "get": {
                "tags": [
                    "News"
                ],
                "summary": "Search geolocated news",
                "description": "Returns geolocated headlines newest first. Combine filters freely. Each item links to the original publisher.",
                "operationId": "get_news",
                "parameters": [
                    {
                        "name": "country",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "ISO 3166-1 alpha-2 code; several separated by commas",
                        "example": "PL,DE"
                    },
                    {
                        "name": "topic",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Topic slug(s), comma separated",
                        "example": "economy"
                    },
                    {
                        "name": "language",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Reading language of the story",
                        "example": "en"
                    },
                    {
                        "name": "q",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Case-insensitive text in the title",
                        "example": "inflation"
                    },
                    {
                        "name": "source",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Exact source domain",
                        "example": "finpulseua.site"
                    },
                    {
                        "name": "level",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "enum": [
                                "country",
                                "region",
                                "city"
                            ]
                        },
                        "description": "Geographic precision of the placement"
                    },
                    {
                        "name": "since",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Start of the window: 90m, 6h, 2d, ISO 8601 or Unix time. Free plan: max 24h, paid: max 7d",
                        "example": "6h"
                    },
                    {
                        "name": "until",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "End of the window (same formats)"
                    },
                    {
                        "name": "bbox",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Bounding box min_lon,min_lat,max_lon,max_lat",
                        "example": "14,49,24,55"
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "Page size, 1–200 (default 50)",
                        "example": 50
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Opaque cursor from meta.next_cursor"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/NewsItem"
                                            }
                                        },
                                        "meta": {
                                            "$ref": "#/components/schemas/Meta"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid credentials",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limit exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    },
                    {
                        "apiKeyHeader": []
                    },
                    {
                        "cookieAuth": []
                    }
                ]
            }
        },
        "/news/{id}": {
            "get": {
                "tags": [
                    "News"
                ],
                "summary": "Get a story",
                "description": "Returns one story by its id.",
                "operationId": "get_news_id_",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Identifier"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/NewsItem"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid credentials",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limit exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    },
                    {
                        "apiKeyHeader": []
                    },
                    {
                        "cookieAuth": []
                    }
                ]
            }
        },
        "/topics": {
            "get": {
                "tags": [
                    "News"
                ],
                "summary": "List topics",
                "description": "Topics with the number of stories in the selected window.",
                "operationId": "get_topics",
                "parameters": [
                    {
                        "name": "country",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Limit to countries",
                        "example": "US"
                    },
                    {
                        "name": "since",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Window, default 24h",
                        "example": "24h"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/Topic"
                                            }
                                        },
                                        "meta": {
                                            "$ref": "#/components/schemas/Meta"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid credentials",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limit exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    },
                    {
                        "apiKeyHeader": []
                    },
                    {
                        "cookieAuth": []
                    }
                ]
            }
        },
        "/trends": {
            "get": {
                "tags": [
                    "Analytics"
                ],
                "summary": "Trending keywords and topics",
                "description": "Most frequent keywords and topics in the window, optionally per country. Useful for spotting spikes.",
                "operationId": "get_trends",
                "parameters": [
                    {
                        "name": "country",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Country code(s)",
                        "example": "DE"
                    },
                    {
                        "name": "since",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Window, default 24h",
                        "example": "24h"
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "Number of keywords (1–100)",
                        "example": 30
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/Trends"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid credentials",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limit exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    },
                    {
                        "apiKeyHeader": []
                    },
                    {
                        "cookieAuth": []
                    }
                ]
            }
        },
        "/heatmap": {
            "get": {
                "tags": [
                    "Analytics"
                ],
                "summary": "News intensity by country",
                "description": "Story counts per country in the window, with an intensity score from 0 to 1 for rendering heat maps.",
                "operationId": "get_heatmap",
                "parameters": [
                    {
                        "name": "since",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Window, default 24h",
                        "example": "24h"
                    },
                    {
                        "name": "topic",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Topic filter"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/HeatCell"
                                            }
                                        },
                                        "meta": {
                                            "$ref": "#/components/schemas/Meta"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid credentials",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limit exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    },
                    {
                        "apiKeyHeader": []
                    },
                    {
                        "cookieAuth": []
                    }
                ]
            }
        },
        "/countries": {
            "get": {
                "tags": [
                    "Places"
                ],
                "summary": "List countries",
                "description": "Countries with activity: stories in 24 hours, monitored sources and network sites.",
                "operationId": "get_countries",
                "parameters": [
                    {
                        "name": "q",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Filter by name or code",
                        "example": "pol"
                    },
                    {
                        "name": "sort",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "enum": [
                                "stories",
                                "name",
                                "sources"
                            ]
                        },
                        "description": "Sort order",
                        "example": "stories"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/Country"
                                            }
                                        },
                                        "meta": {
                                            "$ref": "#/components/schemas/Meta"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid credentials",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limit exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    },
                    {
                        "apiKeyHeader": []
                    },
                    {
                        "cookieAuth": []
                    }
                ]
            }
        },
        "/countries/{code}": {
            "get": {
                "tags": [
                    "Places"
                ],
                "summary": "Get a country",
                "description": "Country profile with top topics, top sources and languages over the last 24 hours.",
                "operationId": "get_countries_code_",
                "parameters": [
                    {
                        "name": "code",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Identifier"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/CountryDetail"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid credentials",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limit exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    },
                    {
                        "apiKeyHeader": []
                    },
                    {
                        "cookieAuth": []
                    }
                ]
            }
        },
        "/countries/{code}/news": {
            "get": {
                "tags": [
                    "Places"
                ],
                "summary": "News of a country",
                "description": "Same filters as /news, restricted to one country.",
                "operationId": "get_countries_code_news",
                "parameters": [
                    {
                        "name": "code",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Identifier"
                    },
                    {
                        "name": "topic",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Topic slug(s), comma separated",
                        "example": "economy"
                    },
                    {
                        "name": "language",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Reading language of the story",
                        "example": "en"
                    },
                    {
                        "name": "q",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Case-insensitive text in the title",
                        "example": "inflation"
                    },
                    {
                        "name": "source",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Exact source domain",
                        "example": "finpulseua.site"
                    },
                    {
                        "name": "level",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "enum": [
                                "country",
                                "region",
                                "city"
                            ]
                        },
                        "description": "Geographic precision of the placement"
                    },
                    {
                        "name": "since",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Start of the window: 90m, 6h, 2d, ISO 8601 or Unix time. Free plan: max 24h, paid: max 7d",
                        "example": "6h"
                    },
                    {
                        "name": "until",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "End of the window (same formats)"
                    },
                    {
                        "name": "bbox",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Bounding box min_lon,min_lat,max_lon,max_lat",
                        "example": "14,49,24,55"
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "Page size, 1–200 (default 50)",
                        "example": 50
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Opaque cursor from meta.next_cursor"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/NewsItem"
                                            }
                                        },
                                        "meta": {
                                            "$ref": "#/components/schemas/Meta"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid credentials",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limit exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    },
                    {
                        "apiKeyHeader": []
                    },
                    {
                        "cookieAuth": []
                    }
                ]
            }
        },
        "/countries/{code}/sources": {
            "get": {
                "tags": [
                    "Places"
                ],
                "summary": "Main media of a country",
                "description": "Monitored media outlets of the country with their latest headlines.",
                "operationId": "get_countries_code_sources",
                "parameters": [
                    {
                        "name": "code",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Identifier"
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "Page size",
                        "example": 50
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Cursor"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/Source"
                                            }
                                        },
                                        "meta": {
                                            "$ref": "#/components/schemas/Meta"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid credentials",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limit exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    },
                    {
                        "apiKeyHeader": []
                    },
                    {
                        "cookieAuth": []
                    }
                ]
            }
        },
        "/regions": {
            "get": {
                "tags": [
                    "Places"
                ],
                "summary": "List administrative regions",
                "description": "Regions (states, provinces) with coordinates. Filter by country.",
                "operationId": "get_regions",
                "parameters": [
                    {
                        "name": "country",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Country code",
                        "example": "PL"
                    },
                    {
                        "name": "q",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Name filter"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/Region"
                                            }
                                        },
                                        "meta": {
                                            "$ref": "#/components/schemas/Meta"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid credentials",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limit exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    },
                    {
                        "apiKeyHeader": []
                    },
                    {
                        "cookieAuth": []
                    }
                ]
            }
        },
        "/cities": {
            "get": {
                "tags": [
                    "Places"
                ],
                "summary": "Search cities",
                "description": "Cities of 15,000+ inhabitants with coordinates and population. Names are matched in several languages.",
                "operationId": "get_cities",
                "parameters": [
                    {
                        "name": "q",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Name, any supported language",
                        "example": "krakow"
                    },
                    {
                        "name": "country",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Country code",
                        "example": "PL"
                    },
                    {
                        "name": "min_population",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "Minimum population",
                        "example": 100000
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "Page size, 1–200",
                        "example": 20
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/City"
                                            }
                                        },
                                        "meta": {
                                            "$ref": "#/components/schemas/Meta"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid credentials",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limit exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    },
                    {
                        "apiKeyHeader": []
                    },
                    {
                        "cookieAuth": []
                    }
                ]
            }
        },
        "/places/search": {
            "get": {
                "tags": [
                    "Places"
                ],
                "summary": "Search places",
                "description": "Autocomplete over countries and cities in one request.",
                "operationId": "get_places_search",
                "parameters": [
                    {
                        "name": "q",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Query (min 2 characters)",
                        "example": "war"
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "Max results, 1–30",
                        "example": 10
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/Place"
                                            }
                                        },
                                        "meta": {
                                            "$ref": "#/components/schemas/Meta"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid credentials",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limit exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    },
                    {
                        "apiKeyHeader": []
                    },
                    {
                        "cookieAuth": []
                    }
                ]
            }
        },
        "/sources": {
            "get": {
                "tags": [
                    "Sources"
                ],
                "summary": "List monitored media",
                "description": "Main media outlets tracked on the map.",
                "operationId": "get_sources",
                "parameters": [
                    {
                        "name": "country",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Country code",
                        "example": "GB"
                    },
                    {
                        "name": "q",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Name filter",
                        "example": "bbc"
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "Page size",
                        "example": 50
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Cursor"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/Source"
                                            }
                                        },
                                        "meta": {
                                            "$ref": "#/components/schemas/Meta"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid credentials",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limit exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    },
                    {
                        "apiKeyHeader": []
                    },
                    {
                        "cookieAuth": []
                    }
                ]
            }
        },
        "/sources/{id}": {
            "get": {
                "tags": [
                    "Sources"
                ],
                "summary": "Get a media outlet",
                "description": "An outlet with its latest headlines.",
                "operationId": "get_sources_id_",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Identifier"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/Source"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid credentials",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limit exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    },
                    {
                        "apiKeyHeader": []
                    },
                    {
                        "cookieAuth": []
                    }
                ]
            }
        },
        "/sites": {
            "get": {
                "tags": [
                    "Network"
                ],
                "summary": "List network sites",
                "description": "News sites of the ArchyMap network available for advertising, with daily prices.",
                "operationId": "get_sites",
                "parameters": [
                    {
                        "name": "country",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Country code",
                        "example": "UA"
                    },
                    {
                        "name": "language",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Site language",
                        "example": "uk"
                    },
                    {
                        "name": "topic",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Topic",
                        "example": "sports"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/Site"
                                            }
                                        },
                                        "meta": {
                                            "$ref": "#/components/schemas/Meta"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid credentials",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limit exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    },
                    {
                        "apiKeyHeader": []
                    },
                    {
                        "cookieAuth": []
                    }
                ]
            }
        },
        "/sites/{domain}": {
            "get": {
                "tags": [
                    "Network"
                ],
                "summary": "Get a network site",
                "description": "Site details including the regions it writes about.",
                "operationId": "get_sites_domain_",
                "parameters": [
                    {
                        "name": "domain",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Identifier"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/Site"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid credentials",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limit exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    },
                    {
                        "apiKeyHeader": []
                    },
                    {
                        "cookieAuth": []
                    }
                ]
            }
        },
        "/me": {
            "get": {
                "tags": [
                    "Account"
                ],
                "summary": "Current account",
                "description": "The authenticated account. For compatibility with the live map, the response also carries top-level `user` and `plans`.",
                "operationId": "get_me",
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/Me"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "security": []
            },
            "patch": {
                "tags": [
                    "Account"
                ],
                "summary": "Update profile",
                "description": "Update your name or phone.",
                "operationId": "patch_me",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "description": "Full name",
                                        "type": "string",
                                        "example": "Anna Kowalska"
                                    },
                                    "phone": {
                                        "description": "Phone",
                                        "type": "string",
                                        "example": "+48 600 000 000"
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/Me"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid credentials",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limit exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    },
                    {
                        "apiKeyHeader": []
                    },
                    {
                        "cookieAuth": []
                    }
                ]
            }
        },
        "/me/notifications": {
            "get": {
                "tags": [
                    "Account"
                ],
                "summary": "Notifications",
                "description": "Moderation results, payments and account events.",
                "operationId": "get_me_notifications",
                "parameters": [
                    {
                        "name": "unread",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "boolean"
                        },
                        "description": "Only unread",
                        "example": true
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "Page size",
                        "example": 50
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/Notification"
                                            }
                                        },
                                        "meta": {
                                            "$ref": "#/components/schemas/Meta"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid credentials",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limit exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    },
                    {
                        "apiKeyHeader": []
                    },
                    {
                        "cookieAuth": []
                    }
                ]
            }
        },
        "/me/notifications/read": {
            "post": {
                "tags": [
                    "Account"
                ],
                "summary": "Mark notifications as read",
                "description": "Marks all notifications as read.",
                "operationId": "post_me_notifications_read",
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/Ok"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid credentials",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limit exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    },
                    {
                        "apiKeyHeader": []
                    },
                    {
                        "cookieAuth": []
                    }
                ]
            }
        },
        "/me/api-keys": {
            "get": {
                "tags": [
                    "Account"
                ],
                "summary": "List API keys",
                "description": "Your active keys. Secrets are never returned after creation.",
                "operationId": "get_me_api_keys",
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/ApiKey"
                                            }
                                        },
                                        "meta": {
                                            "$ref": "#/components/schemas/Meta"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid credentials",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limit exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    },
                    {
                        "apiKeyHeader": []
                    },
                    {
                        "cookieAuth": []
                    }
                ]
            },
            "post": {
                "tags": [
                    "Account"
                ],
                "summary": "Create an API key",
                "description": "Browser session only. The secret is returned once. Requires Business or Enterprise.",
                "operationId": "post_me_api_keys",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "label": {
                                        "description": "A name for the key",
                                        "type": "string",
                                        "example": "Production dashboard"
                                    }
                                },
                                "required": [
                                    "label"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/ApiKeyCreated"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid credentials",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limit exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "cookieAuth": []
                    }
                ]
            }
        },
        "/me/api-keys/{id}": {
            "delete": {
                "tags": [
                    "Account"
                ],
                "summary": "Revoke an API key",
                "description": "Revokes a key immediately.",
                "operationId": "delete_me_api_keys_id_",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Identifier"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/Ok"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid credentials",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limit exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    },
                    {
                        "apiKeyHeader": []
                    },
                    {
                        "cookieAuth": []
                    }
                ]
            }
        },
        "/watchlists": {
            "get": {
                "tags": [
                    "Watchlists"
                ],
                "summary": "List watchlists",
                "description": "Saved news filters.",
                "operationId": "get_watchlists",
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/Watchlist"
                                            }
                                        },
                                        "meta": {
                                            "$ref": "#/components/schemas/Meta"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid credentials",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limit exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    },
                    {
                        "apiKeyHeader": []
                    },
                    {
                        "cookieAuth": []
                    }
                ]
            },
            "post": {
                "tags": [
                    "Watchlists"
                ],
                "summary": "Create a watchlist",
                "description": "Saves a combination of /news filters under a name. Requires Pro or higher.\n\nRequires the **Pro** plan or higher.",
                "operationId": "post_watchlists",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "description": "Watchlist name",
                                        "type": "string",
                                        "example": "Energy in Poland"
                                    },
                                    "filters": {
                                        "description": "Any of country, topic, language, q, source",
                                        "type": "object",
                                        "example": {
                                            "country": "PL",
                                            "topic": "energy"
                                        }
                                    }
                                },
                                "required": [
                                    "name",
                                    "filters"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/Watchlist"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid credentials",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limit exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    },
                    {
                        "apiKeyHeader": []
                    },
                    {
                        "cookieAuth": []
                    }
                ]
            }
        },
        "/watchlists/{id}/news": {
            "get": {
                "tags": [
                    "Watchlists"
                ],
                "summary": "News for a watchlist",
                "description": "Applies the saved filters to the live feed.",
                "operationId": "get_watchlists_id_news",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Identifier"
                    },
                    {
                        "name": "since",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Window",
                        "example": "24h"
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "Page size",
                        "example": 50
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/NewsItem"
                                            }
                                        },
                                        "meta": {
                                            "$ref": "#/components/schemas/Meta"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid credentials",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limit exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    },
                    {
                        "apiKeyHeader": []
                    },
                    {
                        "cookieAuth": []
                    }
                ]
            }
        },
        "/watchlists/{id}": {
            "delete": {
                "tags": [
                    "Watchlists"
                ],
                "summary": "Delete a watchlist",
                "description": "Deletes a watchlist.",
                "operationId": "delete_watchlists_id_",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Identifier"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/Ok"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid credentials",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limit exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    },
                    {
                        "apiKeyHeader": []
                    },
                    {
                        "cookieAuth": []
                    }
                ]
            }
        },
        "/companies": {
            "get": {
                "tags": [
                    "Companies"
                ],
                "summary": "List your companies",
                "description": "Company profiles owned by the account.",
                "operationId": "get_companies",
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/Company"
                                            }
                                        },
                                        "meta": {
                                            "$ref": "#/components/schemas/Meta"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid credentials",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limit exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    },
                    {
                        "apiKeyHeader": []
                    },
                    {
                        "cookieAuth": []
                    }
                ]
            },
            "post": {
                "tags": [
                    "Companies"
                ],
                "summary": "Create a company",
                "description": "Creates a draft company profile. Complete it with PATCH and submit it for verification.",
                "operationId": "post_companies",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "description": "Brand name",
                                        "type": "string",
                                        "example": "Northwind Travel"
                                    }
                                },
                                "required": [
                                    "name"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/Company"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid credentials",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limit exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    },
                    {
                        "apiKeyHeader": []
                    },
                    {
                        "cookieAuth": []
                    }
                ]
            }
        },
        "/companies/{id}": {
            "get": {
                "tags": [
                    "Companies"
                ],
                "summary": "Get a company",
                "description": "A company profile with its verification status.",
                "operationId": "get_companies_id_",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Identifier"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/Company"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid credentials",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limit exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    },
                    {
                        "apiKeyHeader": []
                    },
                    {
                        "cookieAuth": []
                    }
                ]
            },
            "patch": {
                "tags": [
                    "Companies"
                ],
                "summary": "Update a company",
                "description": "Updates profile fields while the company is a draft or was rejected.",
                "operationId": "patch_companies_id_",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Identifier"
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "description": "Brand name",
                                        "type": "string"
                                    },
                                    "legal_name": {
                                        "description": "Registered entity name",
                                        "type": "string"
                                    },
                                    "industry": {
                                        "description": "Industry",
                                        "type": "string"
                                    },
                                    "website": {
                                        "description": "https://…",
                                        "type": "string"
                                    },
                                    "description": {
                                        "description": "30–600 characters",
                                        "type": "string"
                                    },
                                    "country": {
                                        "description": "Country name",
                                        "type": "string"
                                    },
                                    "city": {
                                        "description": "City",
                                        "type": "string"
                                    },
                                    "address": {
                                        "description": "Registered address",
                                        "type": "string"
                                    },
                                    "registration_number": {
                                        "description": "Registration ID",
                                        "type": "string"
                                    },
                                    "vat": {
                                        "description": "VAT / tax ID",
                                        "type": "string"
                                    },
                                    "contact_name": {
                                        "description": "Contact person",
                                        "type": "string"
                                    },
                                    "contact_email": {
                                        "description": "Contact email",
                                        "type": "string"
                                    },
                                    "contact_phone": {
                                        "description": "Contact phone",
                                        "type": "string"
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/Company"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid credentials",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limit exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    },
                    {
                        "apiKeyHeader": []
                    },
                    {
                        "cookieAuth": []
                    }
                ]
            }
        },
        "/companies/{id}/submit": {
            "post": {
                "tags": [
                    "Companies"
                ],
                "summary": "Submit for verification",
                "description": "Sends the profile to moderation. All required fields must be filled.",
                "operationId": "post_companies_id_submit",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Identifier"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/Company"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid credentials",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limit exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    },
                    {
                        "apiKeyHeader": []
                    },
                    {
                        "cookieAuth": []
                    }
                ]
            }
        },
        "/companies/{id}/assets": {
            "get": {
                "tags": [
                    "Creatives"
                ],
                "summary": "List creatives",
                "description": "Logos and banners uploaded for a company.",
                "operationId": "get_companies_id_assets",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Identifier"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/Asset"
                                            }
                                        },
                                        "meta": {
                                            "$ref": "#/components/schemas/Meta"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid credentials",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limit exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    },
                    {
                        "apiKeyHeader": []
                    },
                    {
                        "cookieAuth": []
                    }
                ]
            },
            "post": {
                "tags": [
                    "Creatives"
                ],
                "summary": "Upload a banner or logo",
                "description": "multipart/form-data with `file` and `kind` (banner or logo). JPG, PNG, WebP or GIF up to 2 MB. Banners must match a standard format: 728×90, 970×250, 300×250, 160×600, 320×100 or 1200×628 (up to 3× larger). The file is queued for moderation.",
                "operationId": "post_companies_id_assets",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Identifier"
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "file": {
                                        "description": "The image",
                                        "type": "string",
                                        "format": "binary"
                                    },
                                    "kind": {
                                        "description": "banner or logo",
                                        "type": "string",
                                        "enum": [
                                            "banner",
                                            "logo"
                                        ],
                                        "example": "banner"
                                    }
                                },
                                "required": [
                                    "file"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/Asset"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid credentials",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limit exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    },
                    {
                        "apiKeyHeader": []
                    },
                    {
                        "cookieAuth": []
                    }
                ]
            }
        },
        "/assets/{id}": {
            "delete": {
                "tags": [
                    "Creatives"
                ],
                "summary": "Delete a creative",
                "description": "Deletes a file that is not used by a pending or running campaign.",
                "operationId": "delete_assets_id_",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Identifier"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/Ok"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid credentials",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limit exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    },
                    {
                        "apiKeyHeader": []
                    },
                    {
                        "cookieAuth": []
                    }
                ]
            }
        },
        "/campaigns": {
            "get": {
                "tags": [
                    "Campaigns"
                ],
                "summary": "List campaigns",
                "description": "Your advertising campaigns with totals.",
                "operationId": "get_campaigns",
                "parameters": [
                    {
                        "name": "status",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "enum": [
                                "review",
                                "approved",
                                "active",
                                "paused",
                                "done",
                                "rejected",
                                "cancelled"
                            ]
                        },
                        "description": "Filter by status",
                        "example": "active"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/Campaign"
                                            }
                                        },
                                        "meta": {
                                            "$ref": "#/components/schemas/Meta"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid credentials",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limit exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    },
                    {
                        "apiKeyHeader": []
                    },
                    {
                        "cookieAuth": []
                    }
                ]
            },
            "post": {
                "tags": [
                    "Campaigns"
                ],
                "summary": "Create a campaign",
                "description": "Submits a campaign for moderation. The company must be verified. Banner campaigns reference an uploaded asset. An order is created for the quoted amount.",
                "operationId": "post_campaigns",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "company_id": {
                                        "description": "A verified company",
                                        "type": "integer",
                                        "example": 12
                                    },
                                    "name": {
                                        "description": "Internal name",
                                        "type": "string",
                                        "example": "Spring offer — Germany"
                                    },
                                    "format": {
                                        "description": "banner, text or article",
                                        "type": "string",
                                        "enum": [
                                            "banner",
                                            "text",
                                            "article"
                                        ],
                                        "example": "banner"
                                    },
                                    "placement": {
                                        "description": "map or network",
                                        "type": "string",
                                        "enum": [
                                            "map",
                                            "network"
                                        ],
                                        "example": "map"
                                    },
                                    "countries": {
                                        "description": "Country codes for placement=map; [\"ALL\"] for worldwide",
                                        "type": "array",
                                        "items": {
                                            "type": "string"
                                        },
                                        "example": [
                                            "DE"
                                        ]
                                    },
                                    "sites": {
                                        "description": "Domains for placement=network",
                                        "type": "array",
                                        "items": {
                                            "type": "string"
                                        }
                                    },
                                    "asset_id": {
                                        "description": "Approved or pending banner (format=banner)",
                                        "type": "integer",
                                        "example": 34
                                    },
                                    "headline": {
                                        "description": "Up to 70 characters",
                                        "type": "string",
                                        "example": "Spring sale"
                                    },
                                    "text": {
                                        "description": "Up to 200 characters",
                                        "type": "string"
                                    },
                                    "cta": {
                                        "description": "Button label",
                                        "type": "string",
                                        "example": "Learn more"
                                    },
                                    "landing_url": {
                                        "description": "https://…",
                                        "type": "string",
                                        "example": "https://example.com/offer"
                                    },
                                    "start_date": {
                                        "description": "YYYY-MM-DD, not in the past",
                                        "type": "string",
                                        "example": "2026-12-01"
                                    },
                                    "end_date": {
                                        "description": "YYYY-MM-DD",
                                        "type": "string",
                                        "example": "2026-12-14"
                                    }
                                },
                                "required": [
                                    "company_id",
                                    "name",
                                    "format",
                                    "placement",
                                    "landing_url",
                                    "start_date",
                                    "end_date"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/Campaign"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid credentials",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limit exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    },
                    {
                        "apiKeyHeader": []
                    },
                    {
                        "cookieAuth": []
                    }
                ]
            }
        },
        "/campaigns/{id}": {
            "get": {
                "tags": [
                    "Campaigns"
                ],
                "summary": "Get a campaign",
                "description": "A campaign with its totals.",
                "operationId": "get_campaigns_id_",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Identifier"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/Campaign"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid credentials",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limit exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    },
                    {
                        "apiKeyHeader": []
                    },
                    {
                        "cookieAuth": []
                    }
                ]
            }
        },
        "/campaigns/{id}/pause": {
            "post": {
                "tags": [
                    "Campaigns"
                ],
                "summary": "Pause a campaign",
                "description": "Pauses an active campaign.",
                "operationId": "post_campaigns_id_pause",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Identifier"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/Campaign"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid credentials",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limit exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    },
                    {
                        "apiKeyHeader": []
                    },
                    {
                        "cookieAuth": []
                    }
                ]
            }
        },
        "/campaigns/{id}/resume": {
            "post": {
                "tags": [
                    "Campaigns"
                ],
                "summary": "Resume a campaign",
                "description": "Resumes a paused campaign.",
                "operationId": "post_campaigns_id_resume",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Identifier"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/Campaign"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid credentials",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limit exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    },
                    {
                        "apiKeyHeader": []
                    },
                    {
                        "cookieAuth": []
                    }
                ]
            }
        },
        "/campaigns/{id}/cancel": {
            "post": {
                "tags": [
                    "Campaigns"
                ],
                "summary": "Cancel a campaign",
                "description": "Cancels a campaign that is in moderation or awaiting payment.",
                "operationId": "post_campaigns_id_cancel",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Identifier"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/Campaign"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid credentials",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limit exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    },
                    {
                        "apiKeyHeader": []
                    },
                    {
                        "cookieAuth": []
                    }
                ]
            }
        },
        "/campaigns/{id}/stats": {
            "get": {
                "tags": [
                    "Campaigns"
                ],
                "summary": "Campaign statistics",
                "description": "Impressions and clicks grouped by day or by country.",
                "operationId": "get_campaigns_id_stats",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Identifier"
                    },
                    {
                        "name": "group_by",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "enum": [
                                "day",
                                "country"
                            ]
                        },
                        "description": "day or country",
                        "example": "day"
                    },
                    {
                        "name": "from",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "YYYY-MM-DD (day grouping)",
                        "example": "2026-11-01"
                    },
                    {
                        "name": "to",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "YYYY-MM-DD",
                        "example": "2026-11-15"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/StatRow"
                                            }
                                        },
                                        "meta": {
                                            "$ref": "#/components/schemas/Meta"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid credentials",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limit exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    },
                    {
                        "apiKeyHeader": []
                    },
                    {
                        "cookieAuth": []
                    }
                ]
            }
        },
        "/orders": {
            "get": {
                "tags": [
                    "Billing"
                ],
                "summary": "List orders",
                "description": "Orders and invoices for plans and campaigns.",
                "operationId": "get_orders",
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/Order"
                                            }
                                        },
                                        "meta": {
                                            "$ref": "#/components/schemas/Meta"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid credentials",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limit exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    },
                    {
                        "apiKeyHeader": []
                    },
                    {
                        "cookieAuth": []
                    }
                ]
            }
        },
        "/me/usage": {
            "get": {
                "tags": [
                    "Account"
                ],
                "summary": "API usage",
                "description": "Request counts for your keys over the last 10 minutes and in total.",
                "operationId": "get_me_usage",
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/Usage"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid credentials",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limit exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    },
                    {
                        "apiKeyHeader": []
                    },
                    {
                        "cookieAuth": []
                    }
                ]
            }
        },
        "/monitors": {
            "get": {
                "tags": [
                    "Monitoring"
                ],
                "summary": "List monitors",
                "description": "Your monitoring campaigns.",
                "operationId": "get_monitors",
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/Monitor"
                                            }
                                        },
                                        "meta": {
                                            "$ref": "#/components/schemas/Meta"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid credentials",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limit exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    },
                    {
                        "apiKeyHeader": []
                    },
                    {
                        "cookieAuth": []
                    }
                ]
            },
            "post": {
                "tags": [
                    "Monitoring"
                ],
                "summary": "Create a monitor",
                "description": "Starts collecting immediately (the last 72 hours are backfilled). Limits depend on your plan: monitors, keywords, cities, radius, exclusions and delivery channels.",
                "operationId": "post_monitors",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "description": "Monitor name",
                                        "type": "string",
                                        "example": "Poland — energy"
                                    },
                                    "filters": {
                                        "description": "geo {mode: event|source, countries[], cities[{n,cc}], radius{la,lo,km}}, events[], languages[], scope[own|national|local], keywords{any[], all[], none[]}",
                                        "type": "object",
                                        "example": {
                                            "geo": {
                                                "countries": [
                                                    "PL"
                                                ]
                                            },
                                            "events": [
                                                "economy"
                                            ],
                                            "keywords": {
                                                "any": [
                                                    "energy",
                                                    "gas"
                                                ]
                                            }
                                        }
                                    },
                                    "delivery": {
                                        "description": "rss (bool), webhook (https URL), telegram_chat_id",
                                        "type": "object",
                                        "example": {
                                            "rss": true
                                        }
                                    }
                                },
                                "required": [
                                    "name",
                                    "filters"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/Monitor"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid credentials",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limit exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    },
                    {
                        "apiKeyHeader": []
                    },
                    {
                        "cookieAuth": []
                    }
                ]
            }
        },
        "/monitors/preview": {
            "post": {
                "tags": [
                    "Monitoring"
                ],
                "summary": "Preview a filter",
                "description": "How many stories of the last 24 hours the filters would match, with samples and breakdowns. Nothing is saved.",
                "operationId": "post_monitors_preview",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "filters": {
                                        "description": "geo {mode: event|source, countries[], cities[{n,cc}], radius{la,lo,km}}, events[], languages[], scope[own|national|local], keywords{any[], all[], none[]}",
                                        "type": "object",
                                        "example": {
                                            "geo": {
                                                "countries": [
                                                    "PL"
                                                ]
                                            },
                                            "events": [
                                                "economy"
                                            ],
                                            "keywords": {
                                                "any": [
                                                    "energy",
                                                    "gas"
                                                ]
                                            }
                                        }
                                    }
                                },
                                "required": [
                                    "filters"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/MonitorPreview"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid credentials",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limit exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    },
                    {
                        "apiKeyHeader": []
                    },
                    {
                        "cookieAuth": []
                    }
                ]
            }
        },
        "/monitors/{id}": {
            "get": {
                "tags": [
                    "Monitoring"
                ],
                "summary": "Get a monitor",
                "description": "A monitor with its filters and delivery settings.",
                "operationId": "get_monitors_id_",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Identifier"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/Monitor"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid credentials",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limit exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    },
                    {
                        "apiKeyHeader": []
                    },
                    {
                        "cookieAuth": []
                    }
                ]
            },
            "patch": {
                "tags": [
                    "Monitoring"
                ],
                "summary": "Update a monitor",
                "description": "Change name, filters, delivery or status (active/paused). Changing filters recollects matches from the last 72 hours.",
                "operationId": "patch_monitors_id_",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Identifier"
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "description": "Monitor name",
                                        "type": "string",
                                        "example": "Poland — energy"
                                    },
                                    "filters": {
                                        "description": "geo {mode: event|source, countries[], cities[{n,cc}], radius{la,lo,km}}, events[], languages[], scope[own|national|local], keywords{any[], all[], none[]}",
                                        "type": "object",
                                        "example": {
                                            "geo": {
                                                "countries": [
                                                    "PL"
                                                ]
                                            },
                                            "events": [
                                                "economy"
                                            ],
                                            "keywords": {
                                                "any": [
                                                    "energy",
                                                    "gas"
                                                ]
                                            }
                                        }
                                    },
                                    "delivery": {
                                        "description": "rss (bool), webhook (https URL), telegram_chat_id",
                                        "type": "object",
                                        "example": {
                                            "rss": true
                                        }
                                    },
                                    "status": {
                                        "description": "active or paused",
                                        "type": "string",
                                        "enum": [
                                            "active",
                                            "paused"
                                        ],
                                        "example": "paused"
                                    }
                                },
                                "required": [
                                    "name",
                                    "filters"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/Monitor"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid credentials",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limit exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    },
                    {
                        "apiKeyHeader": []
                    },
                    {
                        "cookieAuth": []
                    }
                ]
            },
            "delete": {
                "tags": [
                    "Monitoring"
                ],
                "summary": "Delete a monitor",
                "description": "Deletes the monitor and all stored matches.",
                "operationId": "delete_monitors_id_",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Identifier"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/Ok"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid credentials",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limit exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    },
                    {
                        "apiKeyHeader": []
                    },
                    {
                        "cookieAuth": []
                    }
                ]
            }
        },
        "/monitors/{id}/hits": {
            "get": {
                "tags": [
                    "Monitoring"
                ],
                "summary": "Matched stories",
                "description": "Stored matches of a monitor, newest first. Retention depends on your plan (3 days Free, 30 Pro, 90 Business, 365 Enterprise).",
                "operationId": "get_monitors_id_hits",
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Identifier"
                    },
                    {
                        "name": "q",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Text in the title",
                        "example": "gas"
                    },
                    {
                        "name": "event",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "enum": [
                                "conflict",
                                "disaster",
                                "crime",
                                "politics",
                                "economy",
                                "health",
                                "sport",
                                "tech",
                                "culture",
                                "society"
                            ]
                        },
                        "description": "Event type"
                    },
                    {
                        "name": "since",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Window: 6h, 2d, ISO date",
                        "example": "24h"
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "integer"
                        },
                        "description": "Page size, 1–200",
                        "example": 50
                    },
                    {
                        "name": "cursor",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Cursor"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/components/schemas/MonitorHit"
                                            }
                                        },
                                        "meta": {
                                            "$ref": "#/components/schemas/Meta"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Missing or invalid credentials",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    },
                    "429": {
                        "description": "Rate limit exceeded",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "bearerAuth": []
                    },
                    {
                        "apiKeyHeader": []
                    },
                    {
                        "cookieAuth": []
                    }
                ]
            }
        },
        "/openapi.json": {
            "get": {
                "tags": [
                    "System"
                ],
                "summary": "OpenAPI specification",
                "description": "This document in OpenAPI 3.0 format.",
                "operationId": "get_openapi_json",
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/components/schemas/Ok"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid parameter",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "security": []
            }
        }
    },
    "components": {
        "securitySchemes": {
            "bearerAuth": {
                "type": "http",
                "scheme": "bearer",
                "description": "API key from Account → API access (Business and Enterprise)."
            },
            "apiKeyHeader": {
                "type": "apiKey",
                "in": "header",
                "name": "X-API-Key"
            },
            "cookieAuth": {
                "type": "apiKey",
                "in": "cookie",
                "name": "PHPSESSID",
                "description": "Signed-in browser session."
            }
        },
        "schemas": {
            "Error": {
                "type": "object",
                "properties": {
                    "error": {
                        "type": "object",
                        "properties": {
                            "code": {
                                "type": "string",
                                "example": "invalid_parameter"
                            },
                            "message": {
                                "type": "string",
                                "example": "limit must be between 1 and 200"
                            }
                        }
                    }
                }
            },
            "Meta": {
                "type": "object",
                "properties": {
                    "count": {
                        "type": "integer",
                        "example": 50
                    },
                    "total": {
                        "type": "integer",
                        "example": 1284
                    },
                    "limit": {
                        "type": "integer",
                        "example": 50
                    },
                    "has_more": {
                        "type": "boolean"
                    },
                    "next_cursor": {
                        "type": "string",
                        "nullable": true,
                        "example": "NTA="
                    }
                }
            },
            "Health": {
                "type": "object",
                "properties": {
                    "ok": {
                        "type": "boolean"
                    },
                    "service": {
                        "type": "string",
                        "example": "archymap-api"
                    },
                    "version": {
                        "type": "integer",
                        "example": 1
                    },
                    "data_age_seconds": {
                        "type": "integer",
                        "example": 212
                    },
                    "data_fresh": {
                        "type": "boolean"
                    },
                    "time": {
                        "type": "string",
                        "format": "date-time",
                        "example": "2026-11-15T07:42:10Z"
                    }
                }
            },
            "Stats": {
                "type": "object",
                "properties": {
                    "sources": {
                        "type": "integer",
                        "example": 3041
                    },
                    "countries": {
                        "type": "integer",
                        "example": 195
                    },
                    "network_sites": {
                        "type": "integer",
                        "example": 39
                    },
                    "stories_24h": {
                        "type": "integer",
                        "example": 5503
                    },
                    "updated_at": {
                        "type": "string",
                        "format": "date-time",
                        "example": "2026-11-15T07:42:10Z"
                    }
                }
            },
            "Plan": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string",
                        "example": "business"
                    },
                    "name": {
                        "type": "string",
                        "example": "Business"
                    },
                    "price_per_month": {
                        "type": "number",
                        "example": 199
                    },
                    "currency": {
                        "type": "string",
                        "example": "USD"
                    },
                    "summary": {
                        "type": "string"
                    },
                    "features": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    },
                    "api_access": {
                        "type": "boolean"
                    }
                }
            },
            "Ok": {
                "type": "object",
                "properties": {
                    "ok": {
                        "type": "boolean"
                    }
                }
            },
            "Quote": {
                "type": "object",
                "properties": {
                    "days": {
                        "type": "integer",
                        "example": 14
                    },
                    "lines": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "description": {
                                    "type": "string",
                                    "example": "3 countries on the map × 14 d"
                                },
                                "amount": {
                                    "type": "number",
                                    "example": 126
                                }
                            }
                        }
                    },
                    "total": {
                        "type": "number",
                        "example": 100.8
                    },
                    "currency": {
                        "type": "string",
                        "example": "USD"
                    }
                }
            },
            "NewsItem": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string",
                        "example": "9f2c41ab7e10"
                    },
                    "title": {
                        "type": "string",
                        "example": "Central bank holds rates unchanged"
                    },
                    "url": {
                        "type": "string",
                        "example": "https://example-news.pl/economy/rates"
                    },
                    "source": {
                        "type": "string",
                        "example": "example-news.pl"
                    },
                    "language": {
                        "type": "string",
                        "example": "en"
                    },
                    "topic": {
                        "type": "string",
                        "example": "economy"
                    },
                    "country": {
                        "type": "string",
                        "example": "PL"
                    },
                    "place": {
                        "type": "string",
                        "example": "Poland"
                    },
                    "region": {
                        "type": "string"
                    },
                    "level": {
                        "type": "string",
                        "enum": [
                            "country",
                            "region",
                            "city"
                        ]
                    },
                    "lat": {
                        "type": "number",
                        "example": 52
                    },
                    "lon": {
                        "type": "number",
                        "example": 19.4
                    },
                    "published_at": {
                        "type": "string",
                        "format": "date-time",
                        "example": "2026-11-15T07:42:10Z"
                    }
                }
            },
            "Topic": {
                "type": "object",
                "properties": {
                    "topic": {
                        "type": "string",
                        "example": "economy"
                    },
                    "stories": {
                        "type": "integer",
                        "example": 214
                    }
                }
            },
            "Trends": {
                "type": "object",
                "properties": {
                    "stories_analysed": {
                        "type": "integer",
                        "example": 1200
                    },
                    "keywords": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "keyword": {
                                    "type": "string",
                                    "example": "inflation"
                                },
                                "mentions": {
                                    "type": "integer",
                                    "example": 41
                                }
                            }
                        }
                    },
                    "topics": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/Topic"
                        }
                    }
                }
            },
            "HeatCell": {
                "type": "object",
                "properties": {
                    "country": {
                        "type": "string",
                        "example": "DE"
                    },
                    "name": {
                        "type": "string",
                        "example": "Germany"
                    },
                    "stories": {
                        "type": "integer",
                        "example": 318
                    },
                    "intensity": {
                        "type": "number",
                        "example": 0.74
                    }
                }
            },
            "Country": {
                "type": "object",
                "properties": {
                    "code": {
                        "type": "string",
                        "example": "PL"
                    },
                    "name": {
                        "type": "string",
                        "example": "Poland"
                    },
                    "stories_24h": {
                        "type": "integer",
                        "example": 212
                    },
                    "sources": {
                        "type": "integer",
                        "example": 14
                    },
                    "network_sites": {
                        "type": "integer",
                        "example": 2
                    }
                }
            },
            "CountryDetail": {
                "type": "object",
                "properties": {
                    "code": {
                        "type": "string",
                        "example": "PL"
                    },
                    "name": {
                        "type": "string",
                        "example": "Poland"
                    },
                    "stories_24h": {
                        "type": "integer",
                        "example": 212
                    },
                    "sources": {
                        "type": "integer",
                        "example": 14
                    },
                    "top_topics": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/Topic"
                        }
                    },
                    "top_story_sources": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "source": {
                                    "type": "string",
                                    "example": "example-news.pl"
                                },
                                "stories": {
                                    "type": "integer",
                                    "example": 40
                                }
                            }
                        }
                    },
                    "languages": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "language": {
                                    "type": "string",
                                    "example": "pl"
                                },
                                "stories": {
                                    "type": "integer",
                                    "example": 180
                                }
                            }
                        }
                    }
                }
            },
            "Region": {
                "type": "object",
                "properties": {
                    "key": {
                        "type": "string",
                        "example": "PL.78"
                    },
                    "name": {
                        "type": "string",
                        "example": "Masovian"
                    },
                    "country": {
                        "type": "string",
                        "example": "PL"
                    },
                    "lat": {
                        "type": "number",
                        "example": 52.2
                    },
                    "lon": {
                        "type": "number",
                        "example": 21
                    }
                }
            },
            "City": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string",
                        "example": "Kraków"
                    },
                    "country": {
                        "type": "string",
                        "example": "PL"
                    },
                    "region": {
                        "type": "string",
                        "example": "Lesser Poland"
                    },
                    "lat": {
                        "type": "number",
                        "example": 50.06
                    },
                    "lon": {
                        "type": "number",
                        "example": 19.94
                    },
                    "population": {
                        "type": "integer",
                        "example": 769498
                    }
                }
            },
            "Place": {
                "type": "object",
                "properties": {
                    "type": {
                        "type": "string",
                        "enum": [
                            "country",
                            "city"
                        ]
                    },
                    "name": {
                        "type": "string",
                        "example": "Warsaw"
                    },
                    "country": {
                        "type": "string",
                        "example": "PL"
                    },
                    "population": {
                        "type": "integer",
                        "nullable": true
                    },
                    "lat": {
                        "type": "number"
                    },
                    "lon": {
                        "type": "number"
                    }
                }
            },
            "Source": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string",
                        "example": "a1b2c3d4e5"
                    },
                    "name": {
                        "type": "string",
                        "example": "BBC News"
                    },
                    "country": {
                        "type": "string",
                        "example": "GB"
                    },
                    "city": {
                        "type": "string",
                        "example": "London"
                    },
                    "lat": {
                        "type": "number",
                        "example": 51.51
                    },
                    "lon": {
                        "type": "number",
                        "example": -0.13
                    },
                    "website": {
                        "type": "string",
                        "example": "https://www.bbc.com/news"
                    },
                    "latest_story_at": {
                        "type": "string",
                        "format": "date-time",
                        "example": "2026-11-15T07:42:10Z"
                    },
                    "latest": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "title": {
                                    "type": "string"
                                },
                                "url": {
                                    "type": "string"
                                },
                                "published_at": {
                                    "type": "string",
                                    "format": "date-time",
                                    "example": "2026-11-15T07:42:10Z"
                                }
                            }
                        }
                    }
                }
            },
            "Site": {
                "type": "object",
                "properties": {
                    "domain": {
                        "type": "string",
                        "example": "finpulseua.site"
                    },
                    "name": {
                        "type": "string",
                        "example": "FinPulse"
                    },
                    "language": {
                        "type": "string",
                        "example": "uk"
                    },
                    "country": {
                        "type": "string",
                        "example": "UA"
                    },
                    "place": {
                        "type": "string",
                        "example": "Ukraine"
                    },
                    "posts_24h": {
                        "type": "integer",
                        "example": 168
                    },
                    "topics": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    },
                    "price_per_day": {
                        "type": "number",
                        "example": 5
                    },
                    "on_sale": {
                        "type": "boolean"
                    },
                    "currency": {
                        "type": "string",
                        "example": "USD"
                    }
                }
            },
            "Me": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "example": 7
                    },
                    "email": {
                        "type": "string",
                        "example": "anna@example.com"
                    },
                    "name": {
                        "type": "string",
                        "example": "Anna Kowalska"
                    },
                    "phone": {
                        "type": "string"
                    },
                    "plan": {
                        "type": "string",
                        "enum": [
                            "free",
                            "pro",
                            "business",
                            "enterprise"
                        ]
                    },
                    "plan_until": {
                        "type": "string",
                        "format": "date-time",
                        "nullable": true
                    },
                    "role": {
                        "type": "string",
                        "example": "user"
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time",
                        "example": "2026-11-15T07:42:10Z"
                    }
                }
            },
            "Notification": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "example": 1
                    },
                    "text": {
                        "type": "string",
                        "example": "Campaign approved"
                    },
                    "link": {
                        "type": "string",
                        "example": "/account/campaigns/4"
                    },
                    "read": {
                        "type": "boolean"
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time",
                        "example": "2026-11-15T07:42:10Z"
                    }
                }
            },
            "ApiKey": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "example": 3
                    },
                    "label": {
                        "type": "string",
                        "example": "Production"
                    },
                    "prefix": {
                        "type": "string",
                        "example": "am_live_1a2b3c"
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time",
                        "example": "2026-11-15T07:42:10Z"
                    },
                    "last_used_at": {
                        "type": "string",
                        "format": "date-time",
                        "nullable": true
                    },
                    "requests": {
                        "type": "integer",
                        "example": 1520
                    }
                }
            },
            "ApiKeyCreated": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "example": 3
                    },
                    "key": {
                        "type": "string",
                        "example": "am_live_…"
                    },
                    "note": {
                        "type": "string"
                    }
                }
            },
            "Usage": {
                "type": "object",
                "properties": {
                    "requests_last_10_min": {
                        "type": "integer",
                        "example": 42
                    },
                    "requests_total": {
                        "type": "integer",
                        "example": 1520
                    },
                    "limit_per_minute": {
                        "type": "integer",
                        "example": 60
                    }
                }
            },
            "Watchlist": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "example": 2
                    },
                    "name": {
                        "type": "string",
                        "example": "Energy in Poland"
                    },
                    "filters": {
                        "type": "object",
                        "properties": {
                            "country": {
                                "type": "string",
                                "example": "PL"
                            },
                            "topic": {
                                "type": "string",
                                "example": "energy"
                            }
                        }
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time",
                        "example": "2026-11-15T07:42:10Z"
                    }
                }
            },
            "Company": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "example": 12
                    },
                    "name": {
                        "type": "string",
                        "example": "Northwind Travel"
                    },
                    "legal_name": {
                        "type": "string",
                        "example": "Northwind Travel Ltd"
                    },
                    "industry": {
                        "type": "string",
                        "example": "Travel & hospitality"
                    },
                    "size": {
                        "type": "string",
                        "example": "11-50"
                    },
                    "website": {
                        "type": "string",
                        "example": "https://northwind.example"
                    },
                    "description": {
                        "type": "string"
                    },
                    "country": {
                        "type": "string",
                        "example": "Poland"
                    },
                    "city": {
                        "type": "string",
                        "example": "Warsaw"
                    },
                    "address": {
                        "type": "string"
                    },
                    "registration_number": {
                        "type": "string",
                        "example": "PL-1234567"
                    },
                    "vat": {
                        "type": "string"
                    },
                    "contact": {
                        "type": "object",
                        "properties": {
                            "name": {
                                "type": "string"
                            },
                            "email": {
                                "type": "string"
                            },
                            "phone": {
                                "type": "string"
                            }
                        }
                    },
                    "goals": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    },
                    "target_countries": {
                        "type": "array",
                        "items": {
                            "type": "string",
                            "example": "DE"
                        }
                    },
                    "budget": {
                        "type": "string",
                        "example": "500-2000"
                    },
                    "status": {
                        "type": "string",
                        "enum": [
                            "draft",
                            "pending",
                            "approved",
                            "rejected",
                            "suspended"
                        ]
                    },
                    "rejection_reason": {
                        "type": "string",
                        "nullable": true
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time",
                        "example": "2026-11-15T07:42:10Z"
                    }
                }
            },
            "Asset": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "example": 34
                    },
                    "company_id": {
                        "type": "integer",
                        "example": 12
                    },
                    "kind": {
                        "type": "string",
                        "enum": [
                            "banner",
                            "logo"
                        ]
                    },
                    "url": {
                        "type": "string",
                        "example": "https://archymap.com/media/banners/ab12….png"
                    },
                    "width": {
                        "type": "integer",
                        "example": 728
                    },
                    "height": {
                        "type": "integer",
                        "example": 90
                    },
                    "bytes": {
                        "type": "integer",
                        "example": 48211
                    },
                    "format": {
                        "type": "string",
                        "nullable": true,
                        "example": "728x90"
                    },
                    "status": {
                        "type": "string",
                        "enum": [
                            "pending",
                            "approved",
                            "rejected"
                        ]
                    },
                    "rejection_reason": {
                        "type": "string",
                        "nullable": true
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time",
                        "example": "2026-11-15T07:42:10Z"
                    }
                }
            },
            "Campaign": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "example": 4
                    },
                    "company_id": {
                        "type": "integer",
                        "example": 12
                    },
                    "name": {
                        "type": "string",
                        "example": "Spring offer — Germany"
                    },
                    "format": {
                        "type": "string",
                        "enum": [
                            "banner",
                            "text",
                            "article"
                        ]
                    },
                    "placement": {
                        "type": "string",
                        "enum": [
                            "map",
                            "network"
                        ]
                    },
                    "headline": {
                        "type": "string"
                    },
                    "text": {
                        "type": "string"
                    },
                    "cta": {
                        "type": "string",
                        "example": "Learn more"
                    },
                    "landing_url": {
                        "type": "string",
                        "example": "https://northwind.example/offer"
                    },
                    "banner_url": {
                        "type": "string",
                        "nullable": true
                    },
                    "countries": {
                        "type": "array",
                        "items": {
                            "type": "string",
                            "example": "DE"
                        }
                    },
                    "sites": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    },
                    "start_date": {
                        "type": "string",
                        "example": "2026-12-01"
                    },
                    "end_date": {
                        "type": "string",
                        "example": "2026-12-14"
                    },
                    "status": {
                        "type": "string",
                        "enum": [
                            "review",
                            "approved",
                            "rejected",
                            "active",
                            "paused",
                            "done",
                            "cancelled"
                        ]
                    },
                    "rejection_reason": {
                        "type": "string",
                        "nullable": true
                    },
                    "amount": {
                        "type": "number",
                        "example": 100.8
                    },
                    "currency": {
                        "type": "string",
                        "example": "USD"
                    },
                    "impressions": {
                        "type": "integer",
                        "example": 10450
                    },
                    "clicks": {
                        "type": "integer",
                        "example": 188
                    },
                    "ctr": {
                        "type": "number",
                        "example": 1.8
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time",
                        "example": "2026-11-15T07:42:10Z"
                    }
                }
            },
            "StatRow": {
                "type": "object",
                "properties": {
                    "date": {
                        "type": "string",
                        "example": "2026-11-14"
                    },
                    "country": {
                        "type": "string",
                        "example": "DE"
                    },
                    "impressions": {
                        "type": "integer",
                        "example": 920
                    },
                    "clicks": {
                        "type": "integer",
                        "example": 16
                    },
                    "ctr": {
                        "type": "number",
                        "example": 1.74
                    }
                }
            },
            "Monitor": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "example": 5
                    },
                    "name": {
                        "type": "string",
                        "example": "Poland — energy"
                    },
                    "status": {
                        "type": "string",
                        "enum": [
                            "active",
                            "paused"
                        ]
                    },
                    "filters": {
                        "type": "object",
                        "properties": {
                            "geo": {
                                "type": "object",
                                "properties": {
                                    "mode": {
                                        "type": "string",
                                        "example": "event"
                                    },
                                    "countries": {
                                        "type": "array",
                                        "items": {
                                            "type": "string",
                                            "example": "PL"
                                        }
                                    },
                                    "cities": {
                                        "type": "array",
                                        "items": {
                                            "type": "object",
                                            "properties": {
                                                "n": {
                                                    "type": "string",
                                                    "example": "Gdańsk"
                                                },
                                                "cc": {
                                                    "type": "string",
                                                    "example": "PL"
                                                }
                                            }
                                        }
                                    },
                                    "radius": {
                                        "type": "object",
                                        "nullable": true
                                    }
                                }
                            },
                            "events": {
                                "type": "array",
                                "items": {
                                    "type": "string",
                                    "example": "economy"
                                }
                            },
                            "languages": {
                                "type": "array",
                                "items": {
                                    "type": "string",
                                    "example": "pl"
                                }
                            },
                            "scope": {
                                "type": "array",
                                "items": {
                                    "type": "string",
                                    "example": "national"
                                }
                            },
                            "keywords": {
                                "type": "object",
                                "properties": {
                                    "any": {
                                        "type": "array",
                                        "items": {
                                            "type": "string",
                                            "example": "gas"
                                        }
                                    },
                                    "all": {
                                        "type": "array",
                                        "items": {
                                            "type": "string"
                                        }
                                    },
                                    "none": {
                                        "type": "array",
                                        "items": {
                                            "type": "string"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "delivery": {
                        "type": "object",
                        "properties": {
                            "rss": {
                                "type": "boolean"
                            },
                            "webhook": {
                                "type": "string"
                            },
                            "telegram_chat_id": {
                                "type": "string"
                            }
                        }
                    },
                    "feed_url": {
                        "type": "string",
                        "nullable": true
                    },
                    "webhook_secret": {
                        "type": "string"
                    },
                    "matches_stored": {
                        "type": "integer",
                        "example": 412
                    },
                    "last_match_at": {
                        "type": "string",
                        "format": "date-time",
                        "nullable": true
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time",
                        "example": "2026-11-15T07:42:10Z"
                    }
                }
            },
            "MonitorHit": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string",
                        "example": "a1b2c3d4e5f60718"
                    },
                    "title": {
                        "type": "string",
                        "example": "Gas prices fall across Europe"
                    },
                    "url": {
                        "type": "string",
                        "example": "https://example.com/a"
                    },
                    "source": {
                        "type": "string",
                        "example": "example.com"
                    },
                    "country": {
                        "type": "string",
                        "example": "PL"
                    },
                    "place": {
                        "type": "string",
                        "example": "Warsaw"
                    },
                    "event": {
                        "type": "string",
                        "example": "economy"
                    },
                    "language": {
                        "type": "string",
                        "example": "en"
                    },
                    "published_at": {
                        "type": "string",
                        "format": "date-time",
                        "example": "2026-11-15T07:42:10Z"
                    }
                }
            },
            "MonitorPreview": {
                "type": "object",
                "properties": {
                    "matched": {
                        "type": "integer",
                        "example": 128
                    },
                    "scanned": {
                        "type": "integer",
                        "example": 9800
                    },
                    "window_hours": {
                        "type": "integer",
                        "example": 24
                    },
                    "events": {
                        "type": "object",
                        "additionalProperties": {
                            "type": "integer"
                        }
                    },
                    "countries": {
                        "type": "object",
                        "additionalProperties": {
                            "type": "integer"
                        }
                    },
                    "sources": {
                        "type": "object",
                        "additionalProperties": {
                            "type": "integer"
                        }
                    },
                    "plan_errors": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    },
                    "samples": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/MonitorHit"
                        }
                    }
                }
            },
            "Order": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer",
                        "example": 9
                    },
                    "invoice": {
                        "type": "string",
                        "example": "INV-00009"
                    },
                    "type": {
                        "type": "string",
                        "enum": [
                            "plan",
                            "campaign"
                        ]
                    },
                    "reference": {
                        "type": "string",
                        "example": "business:3"
                    },
                    "amount": {
                        "type": "number",
                        "example": 597
                    },
                    "currency": {
                        "type": "string",
                        "example": "USD"
                    },
                    "status": {
                        "type": "string",
                        "enum": [
                            "pending",
                            "paid",
                            "cancelled"
                        ]
                    },
                    "created_at": {
                        "type": "string",
                        "format": "date-time",
                        "example": "2026-11-15T07:42:10Z"
                    },
                    "paid_at": {
                        "type": "string",
                        "format": "date-time",
                        "nullable": true
                    }
                }
            }
        }
    }
}