{
    "openapi": "3.1.0",
    "info": {
        "title": "MarketingTracer API",
        "version": "1",
        "description": "Read your MarketingTracer data. The same endpoints power the app and the MCP server. Every call is a POST with a JSON body; GET with the same arguments in the query string also works for reading."
    },
    "servers": [
        {
            "url": "https://app.marketingtracer.com"
        }
    ],
    "security": [
        {
            "bearer": []
        }
    ],
    "paths": {
        "/rest/v1/linkbuilding.overview": {
            "post": {
                "operationId": "linkbuilding_overview",
                "tags": [
                    "linkbuilding"
                ],
                "summary": "Returns the link building results of one site: live and lost links, links won and lost per month (12 months up to month), how far the prospects added in the last 90 days got (found, contacted, agreed, live), what needs attention, and the anchor texts of the live links.",
                "description": "Returns the link building results of one site: live and lost links, links won and lost per month (12 months up to month), how far the prospects added in the last 90 days got (found, contacted, agreed, live), what needs attention, and the anchor texts of the live links.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "site_id": {
                                        "type": "string",
                                        "description": "The site: its id from list_sites, or the id in the app’s address."
                                    },
                                    "month": {
                                        "type": "string",
                                        "pattern": "^\\d{4}-\\d{2}$",
                                        "description": "Last month of the 12-month series, YYYY-MM. Defaults to this month."
                                    }
                                },
                                "required": [
                                    "site_id"
                                ],
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "month": {
                                                    "description": "The last month of the series, YYYY-MM.",
                                                    "type": "string"
                                                },
                                                "kpis": {
                                                    "description": "The state now.",
                                                    "type": "object",
                                                    "properties": {
                                                        "live": {
                                                            "description": "Live links.",
                                                            "type": "integer"
                                                        },
                                                        "lost": {
                                                            "description": "Links that were live and are gone.",
                                                            "type": "integer"
                                                        },
                                                        "waiting": {
                                                            "description": "Contacted links waiting for an answer.",
                                                            "type": "integer"
                                                        },
                                                        "follow": {
                                                            "description": "Checked live links that are follow (as last found).",
                                                            "type": "integer"
                                                        },
                                                        "checked": {
                                                            "description": "Live links our check has found on their page at least once.",
                                                            "type": "integer"
                                                        },
                                                        "nofollow": {
                                                            "description": "Checked live links that are nofollow (as last found).",
                                                            "type": "integer"
                                                        },
                                                        "new_this_month": {
                                                            "description": "Links that went live in month.",
                                                            "type": "integer"
                                                        },
                                                        "lost_this_month": {
                                                            "description": "Links lost in month.",
                                                            "type": "integer"
                                                        },
                                                        "follow_pct": {
                                                            "description": "follow as a share of checked, 0-100, a whole number; null when no live link has been found yet.",
                                                            "type": [
                                                                "number",
                                                                "null"
                                                            ]
                                                        }
                                                    },
                                                    "required": [
                                                        "live",
                                                        "lost",
                                                        "waiting",
                                                        "follow",
                                                        "checked",
                                                        "nofollow",
                                                        "new_this_month",
                                                        "lost_this_month",
                                                        "follow_pct"
                                                    ]
                                                },
                                                "months": {
                                                    "description": "12 months up to month, oldest first.",
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "month": {
                                                                "description": "YYYY-MM.",
                                                                "type": "string"
                                                            },
                                                            "new": {
                                                                "description": "Links that went live that month (for older links without a live date: the month they were added).",
                                                                "type": "integer"
                                                            },
                                                            "lost": {
                                                                "description": "Links lost that month.",
                                                                "type": "integer"
                                                            }
                                                        },
                                                        "required": [
                                                            "month",
                                                            "new",
                                                            "lost"
                                                        ]
                                                    }
                                                },
                                                "funnel_90_days": {
                                                    "description": "Prospects added in the last 90 days, by how far they got.",
                                                    "type": "object",
                                                    "properties": {
                                                        "found": {
                                                            "description": "All of them.",
                                                            "type": "integer"
                                                        },
                                                        "sent": {
                                                            "description": "Contacted, or rejected later.",
                                                            "type": "integer"
                                                        },
                                                        "agreed": {
                                                            "description": "Agreed (or further).",
                                                            "type": "integer"
                                                        },
                                                        "live": {
                                                            "description": "Live (or lost later).",
                                                            "type": "integer"
                                                        }
                                                    },
                                                    "required": [
                                                        "found",
                                                        "sent",
                                                        "agreed",
                                                        "live"
                                                    ]
                                                },
                                                "attention": {
                                                    "description": "What needs a look; the lists hold at most 5 each.",
                                                    "type": "object",
                                                    "properties": {
                                                        "lost": {
                                                            "description": "Links lost in the last 30 days.",
                                                            "type": "array",
                                                            "items": {
                                                                "type": "object",
                                                                "properties": {
                                                                    "link_id": {
                                                                        "description": "The link.",
                                                                        "type": "string"
                                                                    },
                                                                    "url": {
                                                                        "description": "The page.",
                                                                        "type": "string"
                                                                    },
                                                                    "lost_at": {
                                                                        "description": "When it was lost, ISO 8601 UTC.",
                                                                        "type": [
                                                                            "string",
                                                                            "null"
                                                                        ]
                                                                    }
                                                                },
                                                                "required": [
                                                                    "link_id",
                                                                    "url",
                                                                    "lost_at"
                                                                ]
                                                            }
                                                        },
                                                        "agreed_old": {
                                                            "description": "Links agreed more than 14 days ago and not live yet.",
                                                            "type": "array",
                                                            "items": {
                                                                "type": "object",
                                                                "properties": {
                                                                    "link_id": {
                                                                        "description": "The link.",
                                                                        "type": "string"
                                                                    },
                                                                    "url": {
                                                                        "description": "The page.",
                                                                        "type": "string"
                                                                    }
                                                                },
                                                                "required": [
                                                                    "link_id",
                                                                    "url"
                                                                ]
                                                            }
                                                        },
                                                        "changed": {
                                                            "description": "Live links that changed.",
                                                            "type": "array",
                                                            "items": {
                                                                "type": "object",
                                                                "properties": {
                                                                    "link_id": {
                                                                        "description": "The link.",
                                                                        "type": "string"
                                                                    },
                                                                    "url": {
                                                                        "description": "The page.",
                                                                        "type": "string"
                                                                    },
                                                                    "changes": {
                                                                        "description": "nofollow, anchor and/or target.",
                                                                        "type": "array",
                                                                        "items": {
                                                                            "type": "string"
                                                                        }
                                                                    }
                                                                },
                                                                "required": [
                                                                    "link_id",
                                                                    "url",
                                                                    "changes"
                                                                ]
                                                            }
                                                        },
                                                        "mails_next_24h": {
                                                            "description": "Outreach mails due within the next 24 hours, including overdue ones.",
                                                            "type": "integer"
                                                        }
                                                    },
                                                    "required": [
                                                        "lost",
                                                        "agreed_old",
                                                        "changed",
                                                        "mails_next_24h"
                                                    ]
                                                },
                                                "anchors": {
                                                    "description": "The 4 most used anchor texts of the live links, then one row with anchor null for all the others.",
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "anchor": {
                                                                "description": "The anchor text, lowercase (the one our check found, else the one you want); null for the row with all other anchors.",
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "count": {
                                                                "description": "Live links with it.",
                                                                "type": "integer"
                                                            },
                                                            "share_pct": {
                                                                "description": "Share of the live links that have an anchor text, 0-100, a whole number.",
                                                                "type": "number"
                                                            }
                                                        },
                                                        "required": [
                                                            "anchor",
                                                            "count",
                                                            "share_pct"
                                                        ]
                                                    }
                                                },
                                                "smtp_ready": {
                                                    "description": "Whether the site's own mail server is set up and approved for outreach.",
                                                    "type": "boolean"
                                                }
                                            },
                                            "required": [
                                                "month",
                                                "kpis",
                                                "months",
                                                "funnel_90_days",
                                                "attention",
                                                "anchors",
                                                "smtp_ready"
                                            ]
                                        },
                                        "meta": {
                                            "type": "object",
                                            "description": "site_id; next_cursor and total for a list; period {from, to, compare_from, compare_to} where the endpoint covers a period."
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "400": {
                        "$ref": "#/components/responses/Error"
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "404": {
                        "$ref": "#/components/responses/Error"
                    },
                    "409": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    },
                    "502": {
                        "$ref": "#/components/responses/Error"
                    }
                }
            }
        },
        "/rest/v1/linkbuilding.links": {
            "post": {
                "operationId": "linkbuilding_links",
                "tags": [
                    "linkbuilding"
                ],
                "summary": "Returns the links and prospects of one site, newest first: the page, its domain, the stage (found, sent = contacted, agreed, live, lost, rejected), the contact found, what our own check last saw on the page (is the link there, the anchor, follow or nofollow) and the state of the outreach mails.",
                "description": "Returns the links and prospects of one site, newest first: the page, its domain, the stage (found, sent = contacted, agreed, live, lost, rejected), the contact found, what our own check last saw on the page (is the link there, the anchor, follow or nofollow) and the state of the outreach mails.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "site_id": {
                                        "type": "string",
                                        "description": "The site: its id from list_sites, or the id in the app’s address."
                                    },
                                    "stage": {
                                        "type": "string",
                                        "enum": [
                                            "found",
                                            "sent",
                                            "agreed",
                                            "live",
                                            "lost",
                                            "rejected"
                                        ],
                                        "description": "Only links in this stage."
                                    },
                                    "limit": {
                                        "type": "integer",
                                        "minimum": 1,
                                        "maximum": 5000,
                                        "default": 100,
                                        "description": "Links per call."
                                    },
                                    "cursor": {
                                        "type": "string",
                                        "description": "meta.next_cursor of the previous call, for the next page."
                                    }
                                },
                                "required": [
                                    "site_id"
                                ],
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "description": "The link id.",
                                                        "type": "string"
                                                    },
                                                    "url": {
                                                        "description": "The page that links, or should link, to the site.",
                                                        "type": "string"
                                                    },
                                                    "domain": {
                                                        "description": "Its domain.",
                                                        "type": "string"
                                                    },
                                                    "status": {
                                                        "description": "The detailed status: open, pending, firstreminder, secondreminder, agreed, done, lost, rejected or stalled.",
                                                        "type": "string"
                                                    },
                                                    "stage": {
                                                        "description": "found, sent, agreed, live, lost or rejected.",
                                                        "type": "string"
                                                    },
                                                    "my_url": {
                                                        "description": "The page of the site the link should point to, as entered; null when not set (then the homepage).",
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "anchor": {
                                                        "description": "The anchor text you want.",
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "tag": {
                                                        "description": "Your own label.",
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "note": {
                                                        "description": "Your own note.",
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "email": {
                                                        "description": "The contact address found on this domain.",
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "contact_form": {
                                                        "description": "The contact form found on this domain.",
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "contact_queued": {
                                                        "description": "Whether a contact search is waiting.",
                                                        "type": "boolean"
                                                    },
                                                    "contact_checked_at": {
                                                        "description": "When a contact was last looked for on this domain, ISO 8601 UTC.",
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "added_at": {
                                                        "description": "When it was added, ISO 8601 UTC.",
                                                        "type": "string"
                                                    },
                                                    "status_at": {
                                                        "description": "When the status last changed, ISO 8601 UTC.",
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "live_at": {
                                                        "description": "When it went live, ISO 8601 UTC.",
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "check": {
                                                        "description": "Our check of the page.",
                                                        "type": "object",
                                                        "properties": {
                                                            "state": {
                                                                "description": "found, changed or missing at the last check that got an answer; null before that.",
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "last_at": {
                                                                "description": "When it was last checked, ISO 8601 UTC.",
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "next_at": {
                                                                "description": "When it is checked next, ISO 8601 UTC; null when it is not checked (stage found or rejected).",
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "found": {
                                                                "description": "The link as our check last found it on the page; null if never found.",
                                                                "type": [
                                                                    "object",
                                                                    "null"
                                                                ],
                                                                "properties": {
                                                                    "href": {
                                                                        "description": "Where it points.",
                                                                        "type": [
                                                                            "string",
                                                                            "null"
                                                                        ]
                                                                    },
                                                                    "anchor": {
                                                                        "description": "Its anchor text.",
                                                                        "type": [
                                                                            "string",
                                                                            "null"
                                                                        ]
                                                                    },
                                                                    "rel": {
                                                                        "description": "Its rel attribute.",
                                                                        "type": [
                                                                            "string",
                                                                            "null"
                                                                        ]
                                                                    },
                                                                    "follow": {
                                                                        "description": "Whether it is follow.",
                                                                        "type": "boolean"
                                                                    }
                                                                },
                                                                "required": [
                                                                    "href",
                                                                    "anchor",
                                                                    "rel",
                                                                    "follow"
                                                                ]
                                                            },
                                                            "history": {
                                                                "description": "The last checks, oldest first, at most 12.",
                                                                "type": "array",
                                                                "items": {
                                                                    "type": "object",
                                                                    "properties": {
                                                                        "at": {
                                                                            "description": "When, ISO 8601 UTC.",
                                                                            "type": [
                                                                                "string",
                                                                                "null"
                                                                            ]
                                                                        },
                                                                        "result": {
                                                                            "description": "found, changed, missing, or error (the page did not answer; never counts as missing).",
                                                                            "type": [
                                                                                "string",
                                                                                "null"
                                                                            ]
                                                                        }
                                                                    },
                                                                    "required": [
                                                                        "at",
                                                                        "result"
                                                                    ]
                                                                }
                                                            },
                                                            "changes": {
                                                                "description": "What changed at the last check that found the link: nofollow, anchor and/or target.",
                                                                "type": "array",
                                                                "items": {
                                                                    "type": "string"
                                                                }
                                                            }
                                                        },
                                                        "required": [
                                                            "state",
                                                            "last_at",
                                                            "next_at",
                                                            "found",
                                                            "history",
                                                            "changes"
                                                        ]
                                                    },
                                                    "mail": {
                                                        "description": "The outreach for this link.",
                                                        "type": "object",
                                                        "properties": {
                                                            "sequence_id": {
                                                                "description": "The sequence it is in.",
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "step": {
                                                                "description": "Mails sent so far.",
                                                                "type": "integer"
                                                            },
                                                            "next_at": {
                                                                "description": "When the next mail goes out, ISO 8601 UTC.",
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "last_at": {
                                                                "description": "When the last mail went out, ISO 8601 UTC.",
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "stopped": {
                                                                "description": "Why the sequence stopped: manual, deleted (sequence removed), status (status changed), no_email, blocked (do-not-contact list), recent (domain contacted in the last 180 days) or no_step; null when it did not stop.",
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "error": {
                                                                "description": "The last sending error.",
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            }
                                                        },
                                                        "required": [
                                                            "sequence_id",
                                                            "step",
                                                            "next_at",
                                                            "last_at",
                                                            "stopped",
                                                            "error"
                                                        ]
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "url",
                                                    "domain",
                                                    "status",
                                                    "stage",
                                                    "my_url",
                                                    "anchor",
                                                    "tag",
                                                    "note",
                                                    "email",
                                                    "contact_form",
                                                    "contact_queued",
                                                    "contact_checked_at",
                                                    "added_at",
                                                    "status_at",
                                                    "live_at",
                                                    "check",
                                                    "mail"
                                                ]
                                            }
                                        },
                                        "meta": {
                                            "type": "object",
                                            "description": "site_id; next_cursor and total for a list; period {from, to, compare_from, compare_to} where the endpoint covers a period."
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "400": {
                        "$ref": "#/components/responses/Error"
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "404": {
                        "$ref": "#/components/responses/Error"
                    },
                    "409": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    },
                    "502": {
                        "$ref": "#/components/responses/Error"
                    }
                }
            }
        },
        "/rest/v1/linkbuilding.sequences": {
            "post": {
                "operationId": "linkbuilding_sequences",
                "tags": [
                    "linkbuilding"
                ],
                "summary": "Returns the outreach sequences of one site: a first mail and up to two follow-ups after a number of working days, with how many sites were contacted with it and how many agreed.",
                "description": "Returns the outreach sequences of one site: a first mail and up to two follow-ups after a number of working days, with how many sites were contacted with it and how many agreed.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "site_id": {
                                        "type": "string",
                                        "description": "The site: its id from list_sites, or the id in the app’s address."
                                    }
                                },
                                "required": [
                                    "site_id"
                                ],
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "description": "The sequence id.",
                                                        "type": "string"
                                                    },
                                                    "name": {
                                                        "description": "Its name.",
                                                        "type": "string"
                                                    },
                                                    "steps": {
                                                        "description": "The mails, in order.",
                                                        "type": "array",
                                                        "items": {
                                                            "type": "object",
                                                            "properties": {
                                                                "subject": {
                                                                    "description": "The subject; empty for a follow-up means \"Re:\" plus the first subject.",
                                                                    "type": "string"
                                                                },
                                                                "body": {
                                                                    "description": "The text, with the fields [partner_domain], [partner_link], [voornaam], [mijn_pagina] and [ankertekst].",
                                                                    "type": "string"
                                                                },
                                                                "after_workdays": {
                                                                    "description": "Working days after the mail before; always 0 for the first.",
                                                                    "type": "integer"
                                                                }
                                                            },
                                                            "required": [
                                                                "subject",
                                                                "body",
                                                                "after_workdays"
                                                            ]
                                                        }
                                                    },
                                                    "contacted": {
                                                        "description": "Links that got at least one mail of it.",
                                                        "type": "integer"
                                                    },
                                                    "agreed": {
                                                        "description": "Links in it that are now agreed or live.",
                                                        "type": "integer"
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "name",
                                                    "steps",
                                                    "contacted",
                                                    "agreed"
                                                ]
                                            }
                                        },
                                        "meta": {
                                            "type": "object",
                                            "description": "site_id; next_cursor and total for a list; period {from, to, compare_from, compare_to} where the endpoint covers a period."
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "400": {
                        "$ref": "#/components/responses/Error"
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "404": {
                        "$ref": "#/components/responses/Error"
                    },
                    "409": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    },
                    "502": {
                        "$ref": "#/components/responses/Error"
                    }
                }
            }
        },
        "/rest/v1/linkbuilding.queue": {
            "post": {
                "operationId": "linkbuilding_queue",
                "tags": [
                    "linkbuilding"
                ],
                "summary": "Returns the outreach mails scheduled for one site, sent through the site's own mail server on working days, and how many went out today against the daily limit.",
                "description": "Returns the outreach mails scheduled for one site, sent through the site's own mail server on working days, and how many went out today against the daily limit.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "site_id": {
                                        "type": "string",
                                        "description": "The site: its id from list_sites, or the id in the app’s address."
                                    }
                                },
                                "required": [
                                    "site_id"
                                ],
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "sent_today": {
                                                    "description": "Mails sent today (Amsterdam time).",
                                                    "type": "integer"
                                                },
                                                "day_limit": {
                                                    "description": "Mails the site sends at most per day.",
                                                    "type": "integer"
                                                },
                                                "scheduled": {
                                                    "description": "The next mails, soonest first, at most 100, including overdue ones.",
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "link_id": {
                                                                "description": "The link.",
                                                                "type": "string"
                                                            },
                                                            "domain": {
                                                                "description": "The site it goes to.",
                                                                "type": "string"
                                                            },
                                                            "email": {
                                                                "description": "The address.",
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "sequence_id": {
                                                                "description": "The sequence.",
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "sequence": {
                                                                "description": "Its name.",
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "step": {
                                                                "description": "Mails sent so far; this is the next one.",
                                                                "type": "integer"
                                                            },
                                                            "send_at": {
                                                                "description": "When it goes out, ISO 8601 UTC; the time may already have passed.",
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "error": {
                                                                "description": "The last sending error.",
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            }
                                                        },
                                                        "required": [
                                                            "link_id",
                                                            "domain",
                                                            "email",
                                                            "sequence_id",
                                                            "sequence",
                                                            "step",
                                                            "send_at",
                                                            "error"
                                                        ]
                                                    }
                                                }
                                            },
                                            "required": [
                                                "sent_today",
                                                "day_limit",
                                                "scheduled"
                                            ]
                                        },
                                        "meta": {
                                            "type": "object",
                                            "description": "site_id; next_cursor and total for a list; period {from, to, compare_from, compare_to} where the endpoint covers a period."
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "400": {
                        "$ref": "#/components/responses/Error"
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "404": {
                        "$ref": "#/components/responses/Error"
                    },
                    "409": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    },
                    "502": {
                        "$ref": "#/components/responses/Error"
                    }
                }
            }
        },
        "/rest/v1/serp.summary": {
            "post": {
                "operationId": "serp_summary",
                "tags": [
                    "serp"
                ],
                "summary": "Returns the Rank tracker status of one site: whether measuring is on, whether the site is in its trial, how deep each measurement goes, the months with data, how many keywords are in use of the site's quota, and when the latest and the next measurement are.",
                "description": "Returns the Rank tracker status of one site: whether measuring is on, whether the site is in its trial, how deep each measurement goes, the months with data, how many keywords are in use of the site's quota, and when the latest and the next measurement are. Positions are real Google results per keyword, country and device, separate from Search Console.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "site_id": {
                                        "type": "string",
                                        "description": "The site: its id from list_sites, or the id in the app’s address."
                                    },
                                    "month": {
                                        "type": "string",
                                        "pattern": "^\\d{4}-\\d{2}$",
                                        "description": "Last month to show, YYYY-MM, for a report of an earlier month. Defaults to this month."
                                    }
                                },
                                "required": [
                                    "site_id"
                                ],
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "measuring_enabled": {
                                                    "description": "Whether the Rank tracker is measuring at all right now (one switch for all sites).",
                                                    "type": "boolean"
                                                },
                                                "trial": {
                                                    "description": "Whether the site is in its free trial. The Rank tracker does not measure during the trial.",
                                                    "type": "boolean"
                                                },
                                                "own_domain": {
                                                    "description": "The domain of the site, without www.",
                                                    "type": "string"
                                                },
                                                "depth": {
                                                    "description": "How deep each measurement goes: 20 means the top 20. A position below that is null.",
                                                    "type": "integer"
                                                },
                                                "months": {
                                                    "description": "The months serp.keywords returns, YYYY-MM, oldest first: the six months before this month (or before month), plus that month itself once it has a measurement.",
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    }
                                                },
                                                "report_month": {
                                                    "description": "The month asked for with month; null when month was not given.",
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "quota": {
                                                    "description": "Keywords this calendar month.",
                                                    "type": "object",
                                                    "properties": {
                                                        "used": {
                                                            "description": "Keywords (keyword, country and device) measured or queued this calendar month, including ones deleted since; deleting a keyword does not give its slot back.",
                                                            "type": "integer"
                                                        },
                                                        "total": {
                                                            "description": "Keywords the site's plan allows.",
                                                            "type": "integer"
                                                        }
                                                    },
                                                    "required": [
                                                        "used",
                                                        "total"
                                                    ]
                                                },
                                                "last_measured_at": {
                                                    "description": "The date of the site's newest measurement of any keyword, ISO 8601 UTC; null before the first one. Not limited by month. The monthly measurement runs in the last two days of a month and is dated the 1st of the next month, 00:00 Amsterdam time, the month it counts for.",
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "next_measurement_at": {
                                                    "description": "The date the next monthly measurement will carry: the 1st of a month, 00:00 Amsterdam time (it runs in the last two days of the month before), ISO 8601 UTC; null for a report of an earlier month.",
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "can_set_plan": {
                                                    "description": "Whether the caller may set a measuring plan for the site (white label admins).",
                                                    "type": "boolean"
                                                },
                                                "can_buy": {
                                                    "description": "Whether the caller may buy a bigger plan for the site.",
                                                    "type": "boolean"
                                                }
                                            },
                                            "required": [
                                                "measuring_enabled",
                                                "trial",
                                                "own_domain",
                                                "depth",
                                                "months",
                                                "report_month",
                                                "quota",
                                                "last_measured_at",
                                                "next_measurement_at",
                                                "can_set_plan",
                                                "can_buy"
                                            ]
                                        },
                                        "meta": {
                                            "type": "object",
                                            "description": "site_id; next_cursor and total for a list; period {from, to, compare_from, compare_to} where the endpoint covers a period."
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "400": {
                        "$ref": "#/components/responses/Error"
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "404": {
                        "$ref": "#/components/responses/Error"
                    },
                    "409": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    },
                    "502": {
                        "$ref": "#/components/responses/Error"
                    }
                }
            }
        },
        "/rest/v1/serp.keywords": {
            "post": {
                "operationId": "serp_keywords",
                "tags": [
                    "serp"
                ],
                "summary": "Returns the tracked keywords of one site, oldest first, one item per keyword, country and device: the site's best position in the latest measured month and in the measured month before, the change, the position per month, the position per month of each own page that ranked and of each followed competitor, plus the monthly search volume.",
                "description": "Returns the tracked keywords of one site, oldest first, one item per keyword, country and device: the site's best position in the latest measured month and in the measured month before, the change, the position per month, the position per month of each own page that ranked and of each followed competitor, plus the monthly search volume. A position is null when the site was not in the measured top, or when nothing was measured that month (measured false).",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "site_id": {
                                        "type": "string",
                                        "description": "The site: its id from list_sites, or the id in the app’s address."
                                    },
                                    "month": {
                                        "type": "string",
                                        "pattern": "^\\d{4}-\\d{2}$",
                                        "description": "Last month of the series, YYYY-MM, for a report of an earlier month. Defaults to this month."
                                    },
                                    "group": {
                                        "type": "string",
                                        "maxLength": 40,
                                        "description": "Only the keywords in this group."
                                    },
                                    "limit": {
                                        "type": "integer",
                                        "minimum": 1,
                                        "maximum": 10000,
                                        "default": 1000,
                                        "description": "Keywords per call."
                                    },
                                    "cursor": {
                                        "type": "string",
                                        "description": "meta.next_cursor of the previous call, for the next page."
                                    }
                                },
                                "required": [
                                    "site_id"
                                ],
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "description": "The keyword id; keyword_id in serp.keyword.",
                                                        "type": "string"
                                                    },
                                                    "keyword": {
                                                        "description": "The keyword as tracked.",
                                                        "type": "string"
                                                    },
                                                    "country": {
                                                        "description": "Two-letter country code of the Google that is measured, e.g. nl.",
                                                        "type": "string"
                                                    },
                                                    "device": {
                                                        "description": "desktop or mobile.",
                                                        "type": "string"
                                                    },
                                                    "group": {
                                                        "description": "The group the keyword is in; null without a group.",
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "starred": {
                                                        "description": "Whether the keyword has a star.",
                                                        "type": "boolean"
                                                    },
                                                    "target_url": {
                                                        "description": "The page that should rank for this keyword; null when not set.",
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "search_volume": {
                                                        "description": "Average searches per month in this country; null when not known yet.",
                                                        "type": [
                                                            "integer",
                                                            "null"
                                                        ]
                                                    },
                                                    "state": {
                                                        "description": "new (waiting for its first measurement), queued, ok or error.",
                                                        "type": "string"
                                                    },
                                                    "paused": {
                                                        "description": "Whether the keyword falls outside the plan's keyword count and is not measured (starred keywords count first, then the oldest).",
                                                        "type": "boolean"
                                                    },
                                                    "last_measured_month": {
                                                        "description": "The latest month in the series with a measurement, YYYY-MM; null when no month has one.",
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "position": {
                                                        "description": "The site's best position at the last measurement of last_measured_month; null when not in the measured top or without a measurement.",
                                                        "type": [
                                                            "integer",
                                                            "null"
                                                        ]
                                                    },
                                                    "previous_position": {
                                                        "description": "The site's best position in the measured month before last_measured_month (its last measurement that month); null when not in the top or without such a month.",
                                                        "type": [
                                                            "integer",
                                                            "null"
                                                        ]
                                                    },
                                                    "change": {
                                                        "description": "Places gained between the last two measured months (positive is up); a month outside the measured top counts as depth + 1. Null with fewer than two measured months.",
                                                        "type": [
                                                            "integer",
                                                            "null"
                                                        ]
                                                    },
                                                    "positions": {
                                                        "description": "The best position of the site per month, oldest first.",
                                                        "type": "array",
                                                        "items": {
                                                            "type": "object",
                                                            "properties": {
                                                                "month": {
                                                                    "description": "YYYY-MM.",
                                                                    "type": "string"
                                                                },
                                                                "position": {
                                                                    "description": "The best position that month; null when not in the top or not measured.",
                                                                    "type": [
                                                                        "integer",
                                                                        "null"
                                                                    ]
                                                                },
                                                                "measured": {
                                                                    "description": "Whether the keyword was measured that month.",
                                                                    "type": "boolean"
                                                                }
                                                            },
                                                            "required": [
                                                                "month",
                                                                "position",
                                                                "measured"
                                                            ]
                                                        }
                                                    },
                                                    "pages": {
                                                        "description": "Each own page that ranked for the keyword, with its position per month.",
                                                        "type": "array",
                                                        "items": {
                                                            "type": "object",
                                                            "properties": {
                                                                "url": {
                                                                    "description": "The page.",
                                                                    "type": "string"
                                                                },
                                                                "positions": {
                                                                    "description": "Per month, oldest first.",
                                                                    "type": "array",
                                                                    "items": {
                                                                        "type": "object",
                                                                        "properties": {
                                                                            "month": {
                                                                                "description": "YYYY-MM.",
                                                                                "type": "string"
                                                                            },
                                                                            "position": {
                                                                                "description": "The position of this page; null when not in the measured top or not measured that month.",
                                                                                "type": [
                                                                                    "integer",
                                                                                    "null"
                                                                                ]
                                                                            }
                                                                        },
                                                                        "required": [
                                                                            "month",
                                                                            "position"
                                                                        ]
                                                                    }
                                                                }
                                                            },
                                                            "required": [
                                                                "url",
                                                                "positions"
                                                            ]
                                                        }
                                                    },
                                                    "competitors": {
                                                        "description": "Each followed competitor (also when it never ranked), with its best position per month.",
                                                        "type": "array",
                                                        "items": {
                                                            "type": "object",
                                                            "properties": {
                                                                "domain": {
                                                                    "description": "The competitor.",
                                                                    "type": "string"
                                                                },
                                                                "positions": {
                                                                    "description": "Per month, oldest first.",
                                                                    "type": "array",
                                                                    "items": {
                                                                        "type": "object",
                                                                        "properties": {
                                                                            "month": {
                                                                                "description": "YYYY-MM.",
                                                                                "type": "string"
                                                                            },
                                                                            "position": {
                                                                                "description": "The best position of this domain; null when not in the measured top or not measured that month.",
                                                                                "type": [
                                                                                    "integer",
                                                                                    "null"
                                                                                ]
                                                                            }
                                                                        },
                                                                        "required": [
                                                                            "month",
                                                                            "position"
                                                                        ]
                                                                    }
                                                                }
                                                            },
                                                            "required": [
                                                                "domain",
                                                                "positions"
                                                            ]
                                                        }
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "keyword",
                                                    "country",
                                                    "device",
                                                    "group",
                                                    "starred",
                                                    "target_url",
                                                    "search_volume",
                                                    "state",
                                                    "paused",
                                                    "last_measured_month",
                                                    "position",
                                                    "previous_position",
                                                    "change",
                                                    "positions",
                                                    "pages",
                                                    "competitors"
                                                ]
                                            }
                                        },
                                        "meta": {
                                            "type": "object",
                                            "description": "site_id; next_cursor and total for a list; period {from, to, compare_from, compare_to} where the endpoint covers a period."
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "400": {
                        "$ref": "#/components/responses/Error"
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "404": {
                        "$ref": "#/components/responses/Error"
                    },
                    "409": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    },
                    "502": {
                        "$ref": "#/components/responses/Error"
                    }
                }
            }
        },
        "/rest/v1/serp.keyword": {
            "post": {
                "operationId": "serp_keyword",
                "tags": [
                    "serp"
                ],
                "summary": "Returns one tracked keyword up close: the organic top of its latest measurement (every result with its position, domain, URL and whether it is the site's own page), and the position per month of every other domain in that top, of each followed competitor and of each own page.",
                "description": "Returns one tracked keyword up close: the organic top of its latest measurement (every result with its position, domain, URL and whether it is the site's own page), and the position per month of every other domain in that top, of each followed competitor and of each own page.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "site_id": {
                                        "type": "string",
                                        "description": "The site: its id from list_sites, or the id in the app’s address."
                                    },
                                    "keyword_id": {
                                        "type": "string",
                                        "description": "The id from serp.keywords."
                                    }
                                },
                                "required": [
                                    "site_id",
                                    "keyword_id"
                                ],
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "description": "The keyword id.",
                                                    "type": "string"
                                                },
                                                "keyword": {
                                                    "description": "The keyword.",
                                                    "type": "string"
                                                },
                                                "country": {
                                                    "description": "Two-letter country code.",
                                                    "type": "string"
                                                },
                                                "device": {
                                                    "description": "desktop or mobile.",
                                                    "type": "string"
                                                },
                                                "measured_at": {
                                                    "description": "When the latest measurement came in, ISO 8601 UTC; null before the first one (top is then empty).",
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "google_url": {
                                                    "description": "The Google results page the latest measurement was taken from, to check it by hand; null for measurements from before 2026-11-03.",
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "searched": {
                                                    "description": "What the latest measurement searched Google for; null for measurements from before 2026-11-03.",
                                                    "type": [
                                                        "object",
                                                        "null"
                                                    ],
                                                    "properties": {
                                                        "keyword": {
                                                            "description": "The search as sent to Google.",
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        },
                                                        "location_code": {
                                                            "description": "The location (Google Ads geo code, e.g. 2528 for the Netherlands).",
                                                            "type": [
                                                                "integer",
                                                                "null"
                                                            ]
                                                        },
                                                        "language_code": {
                                                            "description": "The language, e.g. nl.",
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        },
                                                        "google_domain": {
                                                            "description": "The Google domain searched, e.g. google.nl.",
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        }
                                                    },
                                                    "required": [
                                                        "keyword",
                                                        "location_code",
                                                        "language_code",
                                                        "google_domain"
                                                    ]
                                                },
                                                "months": {
                                                    "description": "The six months before this month, plus this month once it has a measurement, oldest first.",
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "month": {
                                                                "description": "YYYY-MM.",
                                                                "type": "string"
                                                            },
                                                            "measured": {
                                                                "description": "Whether the keyword was measured that month.",
                                                                "type": "boolean"
                                                            }
                                                        },
                                                        "required": [
                                                            "month",
                                                            "measured"
                                                        ]
                                                    }
                                                },
                                                "top": {
                                                    "description": "The organic results of the latest measurement, best first.",
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "position": {
                                                                "description": "The organic position in Google.",
                                                                "type": "integer"
                                                            },
                                                            "domain": {
                                                                "description": "The domain, without www.",
                                                                "type": "string"
                                                            },
                                                            "url": {
                                                                "description": "The page.",
                                                                "type": "string"
                                                            },
                                                            "own": {
                                                                "description": "Whether it is a page of the site itself.",
                                                                "type": "boolean"
                                                            }
                                                        },
                                                        "required": [
                                                            "position",
                                                            "domain",
                                                            "url",
                                                            "own"
                                                        ]
                                                    }
                                                },
                                                "pages": {
                                                    "description": "Each own page that ranked, with its position per month.",
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "url": {
                                                                "description": "The page.",
                                                                "type": "string"
                                                            },
                                                            "positions": {
                                                                "description": "Per month, oldest first.",
                                                                "type": "array",
                                                                "items": {
                                                                    "type": "object",
                                                                    "properties": {
                                                                        "month": {
                                                                            "description": "YYYY-MM.",
                                                                            "type": "string"
                                                                        },
                                                                        "position": {
                                                                            "description": "The position of this page; null when not in the measured top or not measured that month.",
                                                                            "type": [
                                                                                "integer",
                                                                                "null"
                                                                            ]
                                                                        }
                                                                    },
                                                                    "required": [
                                                                        "month",
                                                                        "position"
                                                                    ]
                                                                }
                                                            }
                                                        },
                                                        "required": [
                                                            "url",
                                                            "positions"
                                                        ]
                                                    }
                                                },
                                                "domains": {
                                                    "description": "Each other domain in the latest top, plus each followed competitor, with its best position per month.",
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "domain": {
                                                                "description": "The domain.",
                                                                "type": "string"
                                                            },
                                                            "positions": {
                                                                "description": "Per month, oldest first.",
                                                                "type": "array",
                                                                "items": {
                                                                    "type": "object",
                                                                    "properties": {
                                                                        "month": {
                                                                            "description": "YYYY-MM.",
                                                                            "type": "string"
                                                                        },
                                                                        "position": {
                                                                            "description": "The best position of this domain; null when not in the measured top or not measured that month.",
                                                                            "type": [
                                                                                "integer",
                                                                                "null"
                                                                            ]
                                                                        }
                                                                    },
                                                                    "required": [
                                                                        "month",
                                                                        "position"
                                                                    ]
                                                                }
                                                            }
                                                        },
                                                        "required": [
                                                            "domain",
                                                            "positions"
                                                        ]
                                                    }
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "keyword",
                                                "country",
                                                "device",
                                                "measured_at",
                                                "google_url",
                                                "searched",
                                                "months",
                                                "top",
                                                "pages",
                                                "domains"
                                            ]
                                        },
                                        "meta": {
                                            "type": "object",
                                            "description": "site_id; next_cursor and total for a list; period {from, to, compare_from, compare_to} where the endpoint covers a period."
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "400": {
                        "$ref": "#/components/responses/Error"
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "404": {
                        "$ref": "#/components/responses/Error"
                    },
                    "409": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    },
                    "502": {
                        "$ref": "#/components/responses/Error"
                    }
                }
            }
        },
        "/rest/v1/serp.competitors": {
            "post": {
                "operationId": "serp_competitors",
                "tags": [
                    "serp"
                ],
                "summary": "Returns the followed competitors of one site (one list shared by the Rank tracker, Core Web Vitals and AI Insights), and suggestions: the domains that show up most often in the latest tops of the site's tracked keywords.",
                "description": "Returns the followed competitors of one site (one list shared by the Rank tracker, Core Web Vitals and AI Insights), and suggestions: the domains that show up most often in the latest tops of the site's tracked keywords.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "site_id": {
                                        "type": "string",
                                        "description": "The site: its id from list_sites, or the id in the app’s address."
                                    }
                                },
                                "required": [
                                    "site_id"
                                ],
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "competitors": {
                                                    "description": "The followed competitors, at most 6 domains.",
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    }
                                                },
                                                "suggestions": {
                                                    "description": "At most 6 domains, other than the site and its followed competitors, that are most often in the latest tops of the tracked keywords, most first.",
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "domain": {
                                                                "description": "The domain.",
                                                                "type": "string"
                                                            },
                                                            "keywords": {
                                                                "description": "For how many tracked keywords it is in the latest top (once per keyword).",
                                                                "type": "integer"
                                                            }
                                                        },
                                                        "required": [
                                                            "domain",
                                                            "keywords"
                                                        ]
                                                    }
                                                }
                                            },
                                            "required": [
                                                "competitors",
                                                "suggestions"
                                            ]
                                        },
                                        "meta": {
                                            "type": "object",
                                            "description": "site_id; next_cursor and total for a list; period {from, to, compare_from, compare_to} where the endpoint covers a period."
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "400": {
                        "$ref": "#/components/responses/Error"
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "404": {
                        "$ref": "#/components/responses/Error"
                    },
                    "409": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    },
                    "502": {
                        "$ref": "#/components/responses/Error"
                    }
                }
            }
        },
        "/rest/v1/aiinsights.summary": {
            "post": {
                "operationId": "aiinsights_summary",
                "tags": [
                    "aiinsights"
                ],
                "summary": "Returns the AI visibility of one site: of the current answers (per prompt and AI the latest answer, if it is at most 62 days old), how many mention the site (name it or link to it) and how many link to it (cite one of its pages as a source), as a share now against the last day of the previous period, also per AI (ChatGPT, Gemini); plus the prompts, the measuring package and what is connected.",
                "description": "Returns the AI visibility of one site: of the current answers (per prompt and AI the latest answer, if it is at most 62 days old), how many mention the site (name it or link to it) and how many link to it (cite one of its pages as a source), as a share now against the last day of the previous period, also per AI (ChatGPT, Gemini); plus the prompts, the measuring package and what is connected. One measurement is one prompt asked to one AI; one round asks every prompt once, at the package's frequency.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "site_id": {
                                        "type": "string",
                                        "description": "The site: its id from list_sites, or the id in the app’s address."
                                    },
                                    "from": {
                                        "type": "string",
                                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                                        "description": "First day of the period, YYYY-MM-DD; give it together with to. Without from and to, the period is the last 28 days up to yesterday, against the 28 days before."
                                    },
                                    "to": {
                                        "type": "string",
                                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                                        "description": "Last day of the period, YYYY-MM-DD (at most yesterday); give it together with from. The previous period is then the same days one month earlier."
                                    }
                                },
                                "required": [
                                    "site_id"
                                ],
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "prompts": {
                                                    "description": "Prompts of the site.",
                                                    "type": "integer"
                                                },
                                                "prompts_measured": {
                                                    "description": "Prompts with at least one current answer.",
                                                    "type": "integer"
                                                },
                                                "last_measured_date": {
                                                    "description": "The day of the site's newest answer, YYYY-MM-DD; null before the first answer.",
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "engines": {
                                                    "description": "The AIs the prompts are asked to.",
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "key": {
                                                                "description": "chatgpt or gemini.",
                                                                "type": "string"
                                                            },
                                                            "label": {
                                                                "description": "The name to show.",
                                                                "type": "string"
                                                            }
                                                        },
                                                        "required": [
                                                            "key",
                                                            "label"
                                                        ]
                                                    }
                                                },
                                                "answers": {
                                                    "description": "Current answers: per prompt and AI the latest answer, if it is at most 62 days old.",
                                                    "type": "integer"
                                                },
                                                "mentioned": {
                                                    "description": "Current answers that mention the site (name it or link to it).",
                                                    "type": "integer"
                                                },
                                                "linked": {
                                                    "description": "Current answers that link to the site (cite one of its pages as a source).",
                                                    "type": "integer"
                                                },
                                                "mentioned_pct": {
                                                    "description": "The share of current answers that mention the site, 0-100, on the last day of the period, against the last day of the previous period.",
                                                    "type": "object",
                                                    "properties": {
                                                        "value": {
                                                            "description": "Now (or on to); null without answers.",
                                                            "type": [
                                                                "number",
                                                                "null"
                                                            ]
                                                        },
                                                        "previous": {
                                                            "description": "The previous period; null when there was nothing to compare with.",
                                                            "type": [
                                                                "number",
                                                                "null"
                                                            ]
                                                        },
                                                        "change": {
                                                            "description": "value minus previous (for a _pct field: percentage points).",
                                                            "type": [
                                                                "number",
                                                                "null"
                                                            ]
                                                        },
                                                        "change_pct": {
                                                            "description": "The change in percent of previous; null when previous is 0 or null.",
                                                            "type": [
                                                                "number",
                                                                "null"
                                                            ]
                                                        }
                                                    },
                                                    "required": [
                                                        "value",
                                                        "previous",
                                                        "change",
                                                        "change_pct"
                                                    ]
                                                },
                                                "linked_pct": {
                                                    "description": "The share of current answers that link to the site, 0-100, on the last day of the period, against the last day of the previous period.",
                                                    "type": "object",
                                                    "properties": {
                                                        "value": {
                                                            "description": "Now (or on to); null without answers.",
                                                            "type": [
                                                                "number",
                                                                "null"
                                                            ]
                                                        },
                                                        "previous": {
                                                            "description": "The previous period; null when there was nothing to compare with.",
                                                            "type": [
                                                                "number",
                                                                "null"
                                                            ]
                                                        },
                                                        "change": {
                                                            "description": "value minus previous (for a _pct field: percentage points).",
                                                            "type": [
                                                                "number",
                                                                "null"
                                                            ]
                                                        },
                                                        "change_pct": {
                                                            "description": "The change in percent of previous; null when previous is 0 or null.",
                                                            "type": [
                                                                "number",
                                                                "null"
                                                            ]
                                                        }
                                                    },
                                                    "required": [
                                                        "value",
                                                        "previous",
                                                        "change",
                                                        "change_pct"
                                                    ]
                                                },
                                                "per_engine": {
                                                    "description": "The same counts per AI.",
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "key": {
                                                                "description": "chatgpt or gemini.",
                                                                "type": "string"
                                                            },
                                                            "label": {
                                                                "description": "The name to show.",
                                                                "type": "string"
                                                            },
                                                            "answers": {
                                                                "description": "Current answers of this AI.",
                                                                "type": "integer"
                                                            },
                                                            "mentioned": {
                                                                "description": "Answers that mention the site.",
                                                                "type": "integer"
                                                            },
                                                            "linked": {
                                                                "description": "Answers that link to the site.",
                                                                "type": "integer"
                                                            }
                                                        },
                                                        "required": [
                                                            "key",
                                                            "label",
                                                            "answers",
                                                            "mentioned",
                                                            "linked"
                                                        ]
                                                    }
                                                },
                                                "brand_terms": {
                                                    "description": "The names we look for in the answers.",
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    }
                                                },
                                                "competitors": {
                                                    "description": "The followed competitors (the list shared with the Rank tracker).",
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    }
                                                },
                                                "ga4_connected": {
                                                    "description": "Whether GA4 is connected; the traffic endpoints need it.",
                                                    "type": "boolean"
                                                },
                                                "search_console_connected": {
                                                    "description": "Whether Search Console is connected.",
                                                    "type": "boolean"
                                                },
                                                "rank_tracker_keywords": {
                                                    "description": "Tracked keywords in the Rank tracker; aiinsights.ai_overviews needs them.",
                                                    "type": "integer"
                                                },
                                                "package": {
                                                    "description": "The measuring package of the site.",
                                                    "type": "object",
                                                    "properties": {
                                                        "frequency": {
                                                            "description": "monthly, biweekly or weekly: how often a round runs.",
                                                            "type": "string"
                                                        },
                                                        "measurements": {
                                                            "description": "Measurements per round.",
                                                            "type": "integer"
                                                        }
                                                    },
                                                    "required": [
                                                        "frequency",
                                                        "measurements"
                                                    ]
                                                },
                                                "included": {
                                                    "description": "The package that comes with every site.",
                                                    "type": "object",
                                                    "properties": {
                                                        "frequency": {
                                                            "description": "monthly, biweekly or weekly: how often a round runs.",
                                                            "type": "string"
                                                        },
                                                        "measurements": {
                                                            "description": "Measurements per round.",
                                                            "type": "integer"
                                                        }
                                                    },
                                                    "required": [
                                                        "frequency",
                                                        "measurements"
                                                    ]
                                                },
                                                "measurements_used": {
                                                    "description": "Measurements the prompts take per round; above the package, the newest prompts are paused.",
                                                    "type": "integer"
                                                },
                                                "can_write": {
                                                    "description": "Whether the caller may add and change prompts.",
                                                    "type": "boolean"
                                                },
                                                "can_set_plan": {
                                                    "description": "Whether the caller may set a package for the site (white label admins).",
                                                    "type": "boolean"
                                                },
                                                "can_buy": {
                                                    "description": "Whether the caller may buy a bigger package.",
                                                    "type": "boolean"
                                                }
                                            },
                                            "required": [
                                                "prompts",
                                                "prompts_measured",
                                                "last_measured_date",
                                                "engines",
                                                "answers",
                                                "mentioned",
                                                "linked",
                                                "mentioned_pct",
                                                "linked_pct",
                                                "per_engine",
                                                "brand_terms",
                                                "competitors",
                                                "ga4_connected",
                                                "search_console_connected",
                                                "rank_tracker_keywords",
                                                "package",
                                                "included",
                                                "measurements_used",
                                                "can_write",
                                                "can_set_plan",
                                                "can_buy"
                                            ]
                                        },
                                        "meta": {
                                            "type": "object",
                                            "description": "site_id; next_cursor and total for a list; period {from, to, compare_from, compare_to} where the endpoint covers a period."
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "400": {
                        "$ref": "#/components/responses/Error"
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "404": {
                        "$ref": "#/components/responses/Error"
                    },
                    "409": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    },
                    "502": {
                        "$ref": "#/components/responses/Error"
                    }
                }
            }
        },
        "/rest/v1/aiinsights.prompts": {
            "post": {
                "operationId": "aiinsights_prompts",
                "tags": [
                    "aiinsights"
                ],
                "summary": "Returns the prompts of one site, oldest first, with per AI the status of the current answer (linked: the site is a source; mentioned: named, not linked; none: not named; nosearch: the AI answered without sources and did not name the site; null: no answer from the last 62 days), the site's place among the sources, the other sites that appear in the answers, and the best status per week over the last 12 weeks.",
                "description": "Returns the prompts of one site, oldest first, with per AI the status of the current answer (linked: the site is a source; mentioned: named, not linked; none: not named; nosearch: the AI answered without sources and did not name the site; null: no answer from the last 62 days), the site's place among the sources, the other sites that appear in the answers, and the best status per week over the last 12 weeks.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "site_id": {
                                        "type": "string",
                                        "description": "The site: its id from list_sites, or the id in the app’s address."
                                    }
                                },
                                "required": [
                                    "site_id"
                                ],
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "description": "The prompt id; prompt_id in aiinsights.prompt.",
                                                        "type": "string"
                                                    },
                                                    "prompt": {
                                                        "description": "The question as asked.",
                                                        "type": "string"
                                                    },
                                                    "engines": {
                                                        "description": "The AIs this prompt is asked to.",
                                                        "type": "array",
                                                        "items": {
                                                            "type": "string"
                                                        }
                                                    },
                                                    "brand_terms": {
                                                        "description": "Extra names looked for in the answers to this prompt.",
                                                        "type": "array",
                                                        "items": {
                                                            "type": "string"
                                                        }
                                                    },
                                                    "paused": {
                                                        "description": "Whether the prompt is above the package and not asked.",
                                                        "type": "boolean"
                                                    },
                                                    "errors": {
                                                        "description": "Keys of the AIs (chatgpt, gemini) whose latest attempt failed.",
                                                        "type": "array",
                                                        "items": {
                                                            "type": "string"
                                                        }
                                                    },
                                                    "created_at": {
                                                        "description": "When the prompt was added, ISO 8601 UTC.",
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "per_engine": {
                                                        "description": "The latest answer per AI.",
                                                        "type": "array",
                                                        "items": {
                                                            "type": "object",
                                                            "properties": {
                                                                "key": {
                                                                    "description": "chatgpt or gemini.",
                                                                    "type": "string"
                                                                },
                                                                "label": {
                                                                    "description": "The name to show.",
                                                                    "type": "string"
                                                                },
                                                                "asked": {
                                                                    "description": "Whether this prompt is asked to this AI.",
                                                                    "type": "boolean"
                                                                },
                                                                "status": {
                                                                    "description": "linked, mentioned, none or nosearch for the current answer; null when there is no answer from the last 62 days.",
                                                                    "type": [
                                                                        "string",
                                                                        "null"
                                                                    ]
                                                                },
                                                                "position": {
                                                                    "description": "The site's first place among the answer's sources; null when the answer does not link to the site.",
                                                                    "type": [
                                                                        "integer",
                                                                        "null"
                                                                    ]
                                                                },
                                                                "date": {
                                                                    "description": "The day of the answer, YYYY-MM-DD; null without a current answer.",
                                                                    "type": [
                                                                        "string",
                                                                        "null"
                                                                    ]
                                                                }
                                                            },
                                                            "required": [
                                                                "key",
                                                                "label",
                                                                "asked",
                                                                "status",
                                                                "position",
                                                                "date"
                                                            ]
                                                        }
                                                    },
                                                    "also_mentioned": {
                                                        "description": "The other domains that appear most often in the current answers (cited or named), at most 3.",
                                                        "type": "array",
                                                        "items": {
                                                            "type": "string"
                                                        }
                                                    },
                                                    "weeks": {
                                                        "description": "The best status over the AIs per week, oldest first, 12 weeks.",
                                                        "type": "array",
                                                        "items": {
                                                            "type": "object",
                                                            "properties": {
                                                                "date": {
                                                                    "description": "The Monday of the week, YYYY-MM-DD.",
                                                                    "type": "string"
                                                                },
                                                                "status": {
                                                                    "description": "linked, mentioned, none, nosearch, or null without an answer that week.",
                                                                    "type": [
                                                                        "string",
                                                                        "null"
                                                                    ]
                                                                }
                                                            },
                                                            "required": [
                                                                "date",
                                                                "status"
                                                            ]
                                                        }
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "prompt",
                                                    "engines",
                                                    "brand_terms",
                                                    "paused",
                                                    "errors",
                                                    "created_at",
                                                    "per_engine",
                                                    "also_mentioned",
                                                    "weeks"
                                                ]
                                            }
                                        },
                                        "meta": {
                                            "type": "object",
                                            "description": "site_id; next_cursor and total for a list; period {from, to, compare_from, compare_to} where the endpoint covers a period."
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "400": {
                        "$ref": "#/components/responses/Error"
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "404": {
                        "$ref": "#/components/responses/Error"
                    },
                    "409": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    },
                    "502": {
                        "$ref": "#/components/responses/Error"
                    }
                }
            }
        },
        "/rest/v1/aiinsights.prompt": {
            "post": {
                "operationId": "aiinsights_prompt",
                "tags": [
                    "aiinsights"
                ],
                "summary": "Returns one prompt up close: per AI its status per week over the last 12 weeks, and its latest answer with the text, the sources it cited (the site's own pages marked) and the other sites in it; plus the site's own pages the AIs cite, with their visits from AI over the last 28 days (GA4).",
                "description": "Returns one prompt up close: per AI its status per week over the last 12 weeks, and its latest answer with the text, the sources it cited (the site's own pages marked) and the other sites in it; plus the site's own pages the AIs cite, with their visits from AI over the last 28 days (GA4).",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "site_id": {
                                        "type": "string",
                                        "description": "The site: its id from list_sites, or the id in the app’s address."
                                    },
                                    "prompt_id": {
                                        "type": "string",
                                        "description": "The id from aiinsights.prompts."
                                    }
                                },
                                "required": [
                                    "site_id",
                                    "prompt_id"
                                ],
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "description": "The prompt id.",
                                                    "type": "string"
                                                },
                                                "prompt": {
                                                    "description": "The question as asked.",
                                                    "type": "string"
                                                },
                                                "country": {
                                                    "description": "Two-letter code of the country the prompt is asked for; null when not set.",
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "language": {
                                                    "description": "Two-letter language code; null when not set.",
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "engines": {
                                                    "description": "The AIs this prompt is asked to.",
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    }
                                                },
                                                "brand_terms": {
                                                    "description": "Extra names looked for in the answers to this prompt.",
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    }
                                                },
                                                "created_at": {
                                                    "description": "When the prompt was added, ISO 8601 UTC.",
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "per_engine": {
                                                    "description": "Per AI.",
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "key": {
                                                                "description": "chatgpt or gemini.",
                                                                "type": "string"
                                                            },
                                                            "label": {
                                                                "description": "The name to show.",
                                                                "type": "string"
                                                            },
                                                            "weeks": {
                                                                "description": "12 weeks, oldest first.",
                                                                "type": "array",
                                                                "items": {
                                                                    "type": "object",
                                                                    "properties": {
                                                                        "date": {
                                                                            "description": "The Monday of the week, YYYY-MM-DD.",
                                                                            "type": "string"
                                                                        },
                                                                        "status": {
                                                                            "description": "linked, mentioned, none or nosearch; null without an answer that week.",
                                                                            "type": [
                                                                                "string",
                                                                                "null"
                                                                            ]
                                                                        },
                                                                        "position": {
                                                                            "description": "The site's first place among the sources; null when that answer does not link to the site.",
                                                                            "type": [
                                                                                "integer",
                                                                                "null"
                                                                            ]
                                                                        }
                                                                    },
                                                                    "required": [
                                                                        "date",
                                                                        "status",
                                                                        "position"
                                                                    ]
                                                                }
                                                            },
                                                            "answer": {
                                                                "description": "The current answer (the latest, at most 62 days old); null when there is none.",
                                                                "type": [
                                                                    "object",
                                                                    "null"
                                                                ],
                                                                "properties": {
                                                                    "date": {
                                                                        "description": "The day of the answer, YYYY-MM-DD.",
                                                                        "type": "string"
                                                                    },
                                                                    "status": {
                                                                        "description": "linked, mentioned, none or nosearch.",
                                                                        "type": "string"
                                                                    },
                                                                    "position": {
                                                                        "description": "The site's first place among the sources; null when the answer does not link to the site.",
                                                                        "type": [
                                                                            "integer",
                                                                            "null"
                                                                        ]
                                                                    },
                                                                    "text": {
                                                                        "description": "The answer as the AI gave it (usually Markdown), cut at 6,000 characters.",
                                                                        "type": "string"
                                                                    },
                                                                    "sources": {
                                                                        "description": "The pages the answer cites, in order.",
                                                                        "type": "array",
                                                                        "items": {
                                                                            "type": "object",
                                                                            "properties": {
                                                                                "position": {
                                                                                    "description": "The place among the sources.",
                                                                                    "type": "integer"
                                                                                },
                                                                                "url": {
                                                                                    "description": "The page.",
                                                                                    "type": "string"
                                                                                },
                                                                                "domain": {
                                                                                    "description": "Its domain.",
                                                                                    "type": "string"
                                                                                },
                                                                                "own": {
                                                                                    "description": "Whether it is a page of the site itself.",
                                                                                    "type": "boolean"
                                                                                }
                                                                            },
                                                                            "required": [
                                                                                "position",
                                                                                "url",
                                                                                "domain",
                                                                                "own"
                                                                            ]
                                                                        }
                                                                    },
                                                                    "other_sites": {
                                                                        "description": "The other sites in the answer.",
                                                                        "type": "array",
                                                                        "items": {
                                                                            "type": "object",
                                                                            "properties": {
                                                                                "domain": {
                                                                                    "description": "The domain.",
                                                                                    "type": "string"
                                                                                },
                                                                                "mentioned": {
                                                                                    "description": "Whether the text names it.",
                                                                                    "type": "boolean"
                                                                                },
                                                                                "position": {
                                                                                    "description": "Its first place among the sources; null when only named.",
                                                                                    "type": [
                                                                                        "integer",
                                                                                        "null"
                                                                                    ]
                                                                                }
                                                                            },
                                                                            "required": [
                                                                                "domain",
                                                                                "mentioned",
                                                                                "position"
                                                                            ]
                                                                        }
                                                                    }
                                                                },
                                                                "required": [
                                                                    "date",
                                                                    "status",
                                                                    "position",
                                                                    "text",
                                                                    "sources",
                                                                    "other_sites"
                                                                ]
                                                            }
                                                        },
                                                        "required": [
                                                            "key",
                                                            "label",
                                                            "weeks",
                                                            "answer"
                                                        ]
                                                    }
                                                },
                                                "own_pages": {
                                                    "description": "The site's own pages the current answers cite.",
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "url": {
                                                                "description": "The page.",
                                                                "type": "string"
                                                            },
                                                            "path": {
                                                                "description": "Its path.",
                                                                "type": "string"
                                                            },
                                                            "cited_by": {
                                                                "description": "Which AI cites it, and where.",
                                                                "type": "array",
                                                                "items": {
                                                                    "type": "object",
                                                                    "properties": {
                                                                        "key": {
                                                                            "description": "chatgpt or gemini.",
                                                                            "type": "string"
                                                                        },
                                                                        "position": {
                                                                            "description": "This page's place among that answer's sources.",
                                                                            "type": [
                                                                                "integer",
                                                                                "null"
                                                                            ]
                                                                        }
                                                                    },
                                                                    "required": [
                                                                        "key",
                                                                        "position"
                                                                    ]
                                                                }
                                                            },
                                                            "ai_sessions": {
                                                                "description": "Visits from AI assistants to this page, last 28 days; null without GA4.",
                                                                "type": [
                                                                    "integer",
                                                                    "null"
                                                                ]
                                                            },
                                                            "conversions": {
                                                                "description": "Key events of those visits, last 28 days (GA4); null without GA4.",
                                                                "type": [
                                                                    "number",
                                                                    "null"
                                                                ]
                                                            },
                                                            "revenue_eur": {
                                                                "description": "Revenue of those visits in euro, last 28 days (GA4); null without GA4.",
                                                                "type": [
                                                                    "number",
                                                                    "null"
                                                                ]
                                                            }
                                                        },
                                                        "required": [
                                                            "url",
                                                            "path",
                                                            "cited_by",
                                                            "ai_sessions",
                                                            "conversions",
                                                            "revenue_eur"
                                                        ]
                                                    }
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "prompt",
                                                "country",
                                                "language",
                                                "engines",
                                                "brand_terms",
                                                "created_at",
                                                "per_engine",
                                                "own_pages"
                                            ]
                                        },
                                        "meta": {
                                            "type": "object",
                                            "description": "site_id; next_cursor and total for a list; period {from, to, compare_from, compare_to} where the endpoint covers a period."
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "400": {
                        "$ref": "#/components/responses/Error"
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "404": {
                        "$ref": "#/components/responses/Error"
                    },
                    "409": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    },
                    "502": {
                        "$ref": "#/components/responses/Error"
                    }
                }
            }
        },
        "/rest/v1/aiinsights.competitors": {
            "post": {
                "operationId": "aiinsights_competitors",
                "tags": [
                    "aiinsights"
                ],
                "summary": "Returns who appears in the current answers to the site's prompts (named or cited), against 28 days earlier: the site itself, the other sites (the 15 that appear most, plus every followed competitor), the pages of other sites the AIs cite most often, and the followed competitors.",
                "description": "Returns who appears in the current answers to the site's prompts (named or cited), against 28 days earlier: the site itself, the other sites (the 15 that appear most, plus every followed competitor), the pages of other sites the AIs cite most often, and the followed competitors.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "site_id": {
                                        "type": "string",
                                        "description": "The site: its id from list_sites, or the id in the app’s address."
                                    }
                                },
                                "required": [
                                    "site_id"
                                ],
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "answers": {
                                                    "description": "Current answers (per prompt and AI the latest, at most 62 days old).",
                                                    "type": "integer"
                                                },
                                                "own": {
                                                    "description": "The site itself.",
                                                    "type": "object",
                                                    "properties": {
                                                        "domain": {
                                                            "description": "The site's domain.",
                                                            "type": "string"
                                                        },
                                                        "answers": {
                                                            "description": "The same as answers.",
                                                            "type": "integer"
                                                        },
                                                        "mentioned": {
                                                            "description": "Current answers that mention the site.",
                                                            "type": "integer"
                                                        },
                                                        "linked": {
                                                            "description": "Current answers that link to it.",
                                                            "type": "integer"
                                                        },
                                                        "mentioned_previous": {
                                                            "description": "Answers that mentioned it 28 days earlier; null when there were no answers then.",
                                                            "type": [
                                                                "integer",
                                                                "null"
                                                            ]
                                                        },
                                                        "per_engine": {
                                                            "description": "Mentions per AI.",
                                                            "type": "array",
                                                            "items": {
                                                                "type": "object",
                                                                "properties": {
                                                                    "key": {
                                                                        "description": "chatgpt or gemini.",
                                                                        "type": "string"
                                                                    },
                                                                    "label": {
                                                                        "description": "The name to show.",
                                                                        "type": "string"
                                                                    },
                                                                    "mentioned": {
                                                                        "description": "Answers that mention the site.",
                                                                        "type": "integer"
                                                                    }
                                                                },
                                                                "required": [
                                                                    "key",
                                                                    "label",
                                                                    "mentioned"
                                                                ]
                                                            }
                                                        }
                                                    },
                                                    "required": [
                                                        "domain",
                                                        "answers",
                                                        "mentioned",
                                                        "linked",
                                                        "mentioned_previous",
                                                        "per_engine"
                                                    ]
                                                },
                                                "sites": {
                                                    "description": "Other sites in the current answers (cited or named): the 15 that appear most, then every other followed competitor (with 0 when absent).",
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "domain": {
                                                                "description": "The domain.",
                                                                "type": "string"
                                                            },
                                                            "answers": {
                                                                "description": "Answers it appears in (named or as a source).",
                                                                "type": "integer"
                                                            },
                                                            "mentioned": {
                                                                "description": "Answers whose text names it.",
                                                                "type": "integer"
                                                            },
                                                            "linked": {
                                                                "description": "Answers that cite it as a source.",
                                                                "type": "integer"
                                                            },
                                                            "answers_previous": {
                                                                "description": "Answers it appeared in 28 days earlier; null when there were no answers then.",
                                                                "type": [
                                                                    "integer",
                                                                    "null"
                                                                ]
                                                            },
                                                            "followed": {
                                                                "description": "Whether it is a followed competitor.",
                                                                "type": "boolean"
                                                            },
                                                            "per_engine": {
                                                                "description": "Answers per AI.",
                                                                "type": "array",
                                                                "items": {
                                                                    "type": "object",
                                                                    "properties": {
                                                                        "key": {
                                                                            "description": "chatgpt or gemini.",
                                                                            "type": "string"
                                                                        },
                                                                        "label": {
                                                                            "description": "The name to show.",
                                                                            "type": "string"
                                                                        },
                                                                        "answers": {
                                                                            "description": "Answers it appears in.",
                                                                            "type": "integer"
                                                                        }
                                                                    },
                                                                    "required": [
                                                                        "key",
                                                                        "label",
                                                                        "answers"
                                                                    ]
                                                                }
                                                            }
                                                        },
                                                        "required": [
                                                            "domain",
                                                            "answers",
                                                            "mentioned",
                                                            "linked",
                                                            "answers_previous",
                                                            "followed",
                                                            "per_engine"
                                                        ]
                                                    }
                                                },
                                                "cited_pages": {
                                                    "description": "Pages of other sites the AIs cite most, at most 8.",
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "url": {
                                                                "description": "The page.",
                                                                "type": "string"
                                                            },
                                                            "domain": {
                                                                "description": "Its domain.",
                                                                "type": "string"
                                                            },
                                                            "citations": {
                                                                "description": "In how many current answers it is a source.",
                                                                "type": "integer"
                                                            },
                                                            "prompts": {
                                                                "description": "For how many prompts.",
                                                                "type": "integer"
                                                            }
                                                        },
                                                        "required": [
                                                            "url",
                                                            "domain",
                                                            "citations",
                                                            "prompts"
                                                        ]
                                                    }
                                                },
                                                "competitors": {
                                                    "description": "The followed competitors (the list shared with the Rank tracker).",
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    }
                                                }
                                            },
                                            "required": [
                                                "answers",
                                                "own",
                                                "sites",
                                                "cited_pages",
                                                "competitors"
                                            ]
                                        },
                                        "meta": {
                                            "type": "object",
                                            "description": "site_id; next_cursor and total for a list; period {from, to, compare_from, compare_to} where the endpoint covers a period."
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "400": {
                        "$ref": "#/components/responses/Error"
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "404": {
                        "$ref": "#/components/responses/Error"
                    },
                    "409": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    },
                    "502": {
                        "$ref": "#/components/responses/Error"
                    }
                }
            }
        },
        "/rest/v1/aiinsights.traffic_summary": {
            "post": {
                "operationId": "aiinsights_traffic_summary",
                "tags": [
                    "aiinsights"
                ],
                "summary": "Returns the visits from AI assistants (ChatGPT, Perplexity, Gemini, Copilot, Claude and others) in Google Analytics 4 for the period: sessions, engaged sessions, key events and revenue against the previous period, the share of all visits, and the same per AI.",
                "description": "Returns the visits from AI assistants (ChatGPT, Perplexity, Gemini, Copilot, Claude and others) in Google Analytics 4 for the period: sessions, engaged sessions, key events and revenue against the previous period, the share of all visits, and the same per AI. Without GA4 data, ga4_connected is false, the figures are null and per_engine is empty.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "site_id": {
                                        "type": "string",
                                        "description": "The site: its id from list_sites, or the id in the app’s address."
                                    },
                                    "from": {
                                        "type": "string",
                                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                                        "description": "First day of the period, YYYY-MM-DD; give it together with to. Without from and to, the period is the last 28 days up to yesterday, against the 28 days before."
                                    },
                                    "to": {
                                        "type": "string",
                                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                                        "description": "Last day of the period, YYYY-MM-DD (at most yesterday); give it together with from. The previous period is then the same days one month earlier."
                                    }
                                },
                                "required": [
                                    "site_id"
                                ],
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "ga4_connected": {
                                                    "description": "Whether GA4 data came back (false when GA4 is not connected or did not answer).",
                                                    "type": "boolean"
                                                },
                                                "sessions": {
                                                    "description": "Sessions from AI assistants in the period, against the previous period.",
                                                    "type": [
                                                        "object",
                                                        "null"
                                                    ],
                                                    "properties": {
                                                        "value": {
                                                            "description": "This period.",
                                                            "type": [
                                                                "number",
                                                                "null"
                                                            ]
                                                        },
                                                        "previous": {
                                                            "description": "The previous period; null when there was nothing to compare with.",
                                                            "type": [
                                                                "number",
                                                                "null"
                                                            ]
                                                        },
                                                        "change": {
                                                            "description": "value minus previous (for a _pct field: percentage points).",
                                                            "type": [
                                                                "number",
                                                                "null"
                                                            ]
                                                        },
                                                        "change_pct": {
                                                            "description": "The change in percent of previous; null when previous is 0 or null.",
                                                            "type": [
                                                                "number",
                                                                "null"
                                                            ]
                                                        }
                                                    },
                                                    "required": [
                                                        "value",
                                                        "previous",
                                                        "change",
                                                        "change_pct"
                                                    ]
                                                },
                                                "engaged_sessions": {
                                                    "description": "Engaged sessions from AI assistants in the period, against the previous period.",
                                                    "type": [
                                                        "object",
                                                        "null"
                                                    ],
                                                    "properties": {
                                                        "value": {
                                                            "description": "This period.",
                                                            "type": [
                                                                "number",
                                                                "null"
                                                            ]
                                                        },
                                                        "previous": {
                                                            "description": "The previous period; null when there was nothing to compare with.",
                                                            "type": [
                                                                "number",
                                                                "null"
                                                            ]
                                                        },
                                                        "change": {
                                                            "description": "value minus previous (for a _pct field: percentage points).",
                                                            "type": [
                                                                "number",
                                                                "null"
                                                            ]
                                                        },
                                                        "change_pct": {
                                                            "description": "The change in percent of previous; null when previous is 0 or null.",
                                                            "type": [
                                                                "number",
                                                                "null"
                                                            ]
                                                        }
                                                    },
                                                    "required": [
                                                        "value",
                                                        "previous",
                                                        "change",
                                                        "change_pct"
                                                    ]
                                                },
                                                "conversions": {
                                                    "description": "Key events of those sessions in the period, against the previous period.",
                                                    "type": [
                                                        "object",
                                                        "null"
                                                    ],
                                                    "properties": {
                                                        "value": {
                                                            "description": "This period.",
                                                            "type": [
                                                                "number",
                                                                "null"
                                                            ]
                                                        },
                                                        "previous": {
                                                            "description": "The previous period; null when there was nothing to compare with.",
                                                            "type": [
                                                                "number",
                                                                "null"
                                                            ]
                                                        },
                                                        "change": {
                                                            "description": "value minus previous (for a _pct field: percentage points).",
                                                            "type": [
                                                                "number",
                                                                "null"
                                                            ]
                                                        },
                                                        "change_pct": {
                                                            "description": "The change in percent of previous; null when previous is 0 or null.",
                                                            "type": [
                                                                "number",
                                                                "null"
                                                            ]
                                                        }
                                                    },
                                                    "required": [
                                                        "value",
                                                        "previous",
                                                        "change",
                                                        "change_pct"
                                                    ]
                                                },
                                                "revenue_eur": {
                                                    "description": "Revenue of those sessions in euro in the period, against the previous period.",
                                                    "type": [
                                                        "object",
                                                        "null"
                                                    ],
                                                    "properties": {
                                                        "value": {
                                                            "description": "This period.",
                                                            "type": [
                                                                "number",
                                                                "null"
                                                            ]
                                                        },
                                                        "previous": {
                                                            "description": "The previous period; null when there was nothing to compare with.",
                                                            "type": [
                                                                "number",
                                                                "null"
                                                            ]
                                                        },
                                                        "change": {
                                                            "description": "value minus previous (for a _pct field: percentage points).",
                                                            "type": [
                                                                "number",
                                                                "null"
                                                            ]
                                                        },
                                                        "change_pct": {
                                                            "description": "The change in percent of previous; null when previous is 0 or null.",
                                                            "type": [
                                                                "number",
                                                                "null"
                                                            ]
                                                        }
                                                    },
                                                    "required": [
                                                        "value",
                                                        "previous",
                                                        "change",
                                                        "change_pct"
                                                    ]
                                                },
                                                "all_sessions": {
                                                    "description": "All sessions of the site in the period.",
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ]
                                                },
                                                "ai_share_pct": {
                                                    "description": "Sessions from AI as a share of all sessions, 0-100.",
                                                    "type": [
                                                        "number",
                                                        "null"
                                                    ]
                                                },
                                                "per_engine": {
                                                    "description": "Per AI, most sessions first.",
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "key": {
                                                                "description": "chatgpt, perplexity, gemini, copilot, claude, deepseek, meta, grok, mistral, you, phind or poe.",
                                                                "type": "string"
                                                            },
                                                            "label": {
                                                                "description": "The name to show.",
                                                                "type": "string"
                                                            },
                                                            "sessions": {
                                                                "description": "Sessions.",
                                                                "type": "integer"
                                                            },
                                                            "engaged_sessions": {
                                                                "description": "Engaged sessions.",
                                                                "type": "integer"
                                                            },
                                                            "conversions": {
                                                                "description": "Key events.",
                                                                "type": "number"
                                                            },
                                                            "revenue_eur": {
                                                                "description": "Revenue in euro.",
                                                                "type": "number"
                                                            }
                                                        },
                                                        "required": [
                                                            "key",
                                                            "label",
                                                            "sessions",
                                                            "engaged_sessions",
                                                            "conversions",
                                                            "revenue_eur"
                                                        ]
                                                    }
                                                }
                                            },
                                            "required": [
                                                "ga4_connected",
                                                "sessions",
                                                "engaged_sessions",
                                                "conversions",
                                                "revenue_eur",
                                                "all_sessions",
                                                "ai_share_pct",
                                                "per_engine"
                                            ]
                                        },
                                        "meta": {
                                            "type": "object",
                                            "description": "site_id; next_cursor and total for a list; period {from, to, compare_from, compare_to} where the endpoint covers a period."
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "400": {
                        "$ref": "#/components/responses/Error"
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "404": {
                        "$ref": "#/components/responses/Error"
                    },
                    "409": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    },
                    "502": {
                        "$ref": "#/components/responses/Error"
                    }
                }
            }
        },
        "/rest/v1/aiinsights.traffic_pages": {
            "post": {
                "operationId": "aiinsights_traffic_pages",
                "tags": [
                    "aiinsights"
                ],
                "summary": "Returns the visits from AI assistants per landing page in the period (GA4), most first: per AI, engaged sessions, key events, revenue, the sessions in the previous period, and for how many prompts a current answer cites the page.",
                "description": "Returns the visits from AI assistants per landing page in the period (GA4), most first: per AI, engaged sessions, key events, revenue, the sessions in the previous period, and for how many prompts a current answer cites the page. Empty without GA4 data.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "site_id": {
                                        "type": "string",
                                        "description": "The site: its id from list_sites, or the id in the app’s address."
                                    },
                                    "from": {
                                        "type": "string",
                                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                                        "description": "First day of the period, YYYY-MM-DD; give it together with to. Without from and to, the period is the last 28 days up to yesterday, against the 28 days before."
                                    },
                                    "to": {
                                        "type": "string",
                                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                                        "description": "Last day of the period, YYYY-MM-DD (at most yesterday); give it together with from. The previous period is then the same days one month earlier."
                                    },
                                    "limit": {
                                        "type": "integer",
                                        "minimum": 1,
                                        "maximum": 5000,
                                        "default": 500,
                                        "description": "Pages per call."
                                    },
                                    "cursor": {
                                        "type": "string",
                                        "description": "meta.next_cursor of the previous call, for the next page."
                                    }
                                },
                                "required": [
                                    "site_id"
                                ],
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "url": {
                                                        "description": "The landing page; null for GA4's (not set).",
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "path": {
                                                        "description": "Its path with the query string, without tracking parameters (utm_*, gclid, fbclid, msclkid, srsltid); (not set) as GA4 gives it.",
                                                        "type": "string"
                                                    },
                                                    "sessions": {
                                                        "description": "Sessions from AI assistants.",
                                                        "type": "integer"
                                                    },
                                                    "sessions_previous": {
                                                        "description": "The same in the previous period.",
                                                        "type": "integer"
                                                    },
                                                    "engaged_sessions": {
                                                        "description": "Engaged sessions.",
                                                        "type": "integer"
                                                    },
                                                    "conversions": {
                                                        "description": "Key events.",
                                                        "type": "number"
                                                    },
                                                    "revenue_eur": {
                                                        "description": "Revenue in euro.",
                                                        "type": "number"
                                                    },
                                                    "per_engine": {
                                                        "description": "Sessions per AI, most first.",
                                                        "type": "array",
                                                        "items": {
                                                            "type": "object",
                                                            "properties": {
                                                                "key": {
                                                                    "description": "chatgpt, perplexity, …",
                                                                    "type": "string"
                                                                },
                                                                "label": {
                                                                    "description": "The name to show.",
                                                                    "type": "string"
                                                                },
                                                                "sessions": {
                                                                    "description": "Sessions.",
                                                                    "type": "integer"
                                                                }
                                                            },
                                                            "required": [
                                                                "key",
                                                                "label",
                                                                "sessions"
                                                            ]
                                                        }
                                                    },
                                                    "cited_by_prompts": {
                                                        "description": "For how many prompts a current answer cites this page.",
                                                        "type": "integer"
                                                    }
                                                },
                                                "required": [
                                                    "url",
                                                    "path",
                                                    "sessions",
                                                    "sessions_previous",
                                                    "engaged_sessions",
                                                    "conversions",
                                                    "revenue_eur",
                                                    "per_engine",
                                                    "cited_by_prompts"
                                                ]
                                            }
                                        },
                                        "meta": {
                                            "type": "object",
                                            "description": "site_id; next_cursor and total for a list; period {from, to, compare_from, compare_to} where the endpoint covers a period."
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "400": {
                        "$ref": "#/components/responses/Error"
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "404": {
                        "$ref": "#/components/responses/Error"
                    },
                    "409": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    },
                    "502": {
                        "$ref": "#/components/responses/Error"
                    }
                }
            }
        },
        "/rest/v1/aiinsights.traffic_monthly": {
            "post": {
                "operationId": "aiinsights_traffic_monthly",
                "tags": [
                    "aiinsights"
                ],
                "summary": "Returns the visits from AI assistants per month for the 16 months up to the month of to (GA4): sessions per AI, plus key events and revenue for the month.",
                "description": "Returns the visits from AI assistants per month for the 16 months up to the month of to (GA4): sessions per AI, plus key events and revenue for the month. The last month is incomplete until it ends (complete false). Empty without GA4 data.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "site_id": {
                                        "type": "string",
                                        "description": "The site: its id from list_sites, or the id in the app’s address."
                                    },
                                    "to": {
                                        "type": "string",
                                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                                        "description": "Last day, YYYY-MM-DD (at most yesterday). Defaults to yesterday."
                                    }
                                },
                                "required": [
                                    "site_id"
                                ],
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "month": {
                                                        "description": "YYYY-MM.",
                                                        "type": "string"
                                                    },
                                                    "sessions": {
                                                        "description": "Sessions from AI assistants.",
                                                        "type": "integer"
                                                    },
                                                    "per_engine": {
                                                        "description": "Sessions per AI, most first.",
                                                        "type": "array",
                                                        "items": {
                                                            "type": "object",
                                                            "properties": {
                                                                "key": {
                                                                    "description": "chatgpt, perplexity, …",
                                                                    "type": "string"
                                                                },
                                                                "label": {
                                                                    "description": "The name to show.",
                                                                    "type": "string"
                                                                },
                                                                "sessions": {
                                                                    "description": "Sessions.",
                                                                    "type": "integer"
                                                                }
                                                            },
                                                            "required": [
                                                                "key",
                                                                "label",
                                                                "sessions"
                                                            ]
                                                        }
                                                    },
                                                    "conversions": {
                                                        "description": "Key events.",
                                                        "type": "number"
                                                    },
                                                    "revenue_eur": {
                                                        "description": "Revenue in euro.",
                                                        "type": "number"
                                                    },
                                                    "complete": {
                                                        "description": "Whether the month is over (false for the month of to, unless to is its last day).",
                                                        "type": "boolean"
                                                    }
                                                },
                                                "required": [
                                                    "month",
                                                    "sessions",
                                                    "per_engine",
                                                    "conversions",
                                                    "revenue_eur",
                                                    "complete"
                                                ]
                                            }
                                        },
                                        "meta": {
                                            "type": "object",
                                            "description": "site_id; next_cursor and total for a list; period {from, to, compare_from, compare_to} where the endpoint covers a period."
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "400": {
                        "$ref": "#/components/responses/Error"
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "404": {
                        "$ref": "#/components/responses/Error"
                    },
                    "409": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    },
                    "502": {
                        "$ref": "#/components/responses/Error"
                    }
                }
            }
        },
        "/rest/v1/aiinsights.ai_overviews": {
            "post": {
                "operationId": "aiinsights_ai_overviews",
                "tags": [
                    "aiinsights"
                ],
                "summary": "Returns Google's AI Overview at the site's Rank tracker keywords, one item per keyword with an AI Overview reading (its latest measurement): whether Google showed an AI Overview, the site's place among its sources, the other sites it cites, and the organic position.",
                "description": "Returns Google's AI Overview at the site's Rank tracker keywords, one item per keyword with an AI Overview reading (its latest measurement): whether Google showed an AI Overview, the site's place among its sources, the other sites it cites, and the organic position. Keywords with an AI Overview come first, then by the site's place, then by keyword. Needs keywords in the Rank tracker.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "site_id": {
                                        "type": "string",
                                        "description": "The site: its id from list_sites, or the id in the app’s address."
                                    }
                                },
                                "required": [
                                    "site_id"
                                ],
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "keyword_id": {
                                                        "description": "The keyword id in the Rank tracker.",
                                                        "type": "string"
                                                    },
                                                    "keyword": {
                                                        "description": "The keyword.",
                                                        "type": "string"
                                                    },
                                                    "country": {
                                                        "description": "Two-letter country code.",
                                                        "type": "string"
                                                    },
                                                    "device": {
                                                        "description": "desktop or mobile.",
                                                        "type": "string"
                                                    },
                                                    "ai_overview": {
                                                        "description": "Whether Google showed an AI Overview.",
                                                        "type": "boolean"
                                                    },
                                                    "position": {
                                                        "description": "The site's place among the AI Overview's sources; null when not cited.",
                                                        "type": [
                                                            "integer",
                                                            "null"
                                                        ]
                                                    },
                                                    "also_cited": {
                                                        "description": "Other domains among its sources, at most 3.",
                                                        "type": "array",
                                                        "items": {
                                                            "type": "string"
                                                        }
                                                    },
                                                    "organic_position": {
                                                        "description": "The site's best organic position in the same measurement; null when not in the measured top.",
                                                        "type": [
                                                            "integer",
                                                            "null"
                                                        ]
                                                    },
                                                    "measured_at": {
                                                        "description": "When it was measured, ISO 8601 UTC.",
                                                        "type": "string"
                                                    }
                                                },
                                                "required": [
                                                    "keyword_id",
                                                    "keyword",
                                                    "country",
                                                    "device",
                                                    "ai_overview",
                                                    "position",
                                                    "also_cited",
                                                    "organic_position",
                                                    "measured_at"
                                                ]
                                            }
                                        },
                                        "meta": {
                                            "type": "object",
                                            "description": "site_id; next_cursor and total for a list; period {from, to, compare_from, compare_to} where the endpoint covers a period."
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "400": {
                        "$ref": "#/components/responses/Error"
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "404": {
                        "$ref": "#/components/responses/Error"
                    },
                    "409": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    },
                    "502": {
                        "$ref": "#/components/responses/Error"
                    }
                }
            }
        },
        "/rest/v1/crux.summary": {
            "post": {
                "operationId": "crux_summary",
                "tags": [
                    "crux"
                ],
                "summary": "Returns the Core Web Vitals of one site next to its competitors, from real Chrome visits (Google's Chrome UX Report, whole site): per domain the latest LCP, INP and CLS (75th percentile over 28 days), the value 28 days earlier, the change, the rating, whether the domain passes, and its rank among the domains.",
                "description": "Returns the Core Web Vitals of one site next to its competitors, from real Chrome visits (Google's Chrome UX Report, whole site): per domain the latest LCP, INP and CLS (75th percentile over 28 days), the value 28 days earlier, the change, the rating, whether the domain passes, and its rank among the domains. The site comes first, then its competitors.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "site_id": {
                                        "type": "string",
                                        "description": "The site: its id from list_sites, or the id in the app’s address."
                                    },
                                    "device": {
                                        "type": "string",
                                        "enum": [
                                            "phone",
                                            "desktop",
                                            "all"
                                        ],
                                        "default": "phone",
                                        "description": "phone, desktop or all (all devices together). Defaults to phone."
                                    }
                                },
                                "required": [
                                    "site_id"
                                ],
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "enabled": {
                                                    "description": "Whether Core Web Vitals is switched on for the site. When false, the other fields are empty.",
                                                    "type": "boolean"
                                                },
                                                "enabled_at": {
                                                    "description": "When it was switched on, ISO 8601 UTC; null when never.",
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "device": {
                                                    "description": "The device the numbers are for: phone, desktop or all.",
                                                    "type": "string"
                                                },
                                                "own_domain": {
                                                    "description": "The domain of the site, without www.",
                                                    "type": "string"
                                                },
                                                "competitors": {
                                                    "description": "The competitor domains of the site (the shared list of the Rank tracker, Core Web Vitals and AI Insights), at most 6.",
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    }
                                                },
                                                "latest_date": {
                                                    "description": "Last day of the newest 28-day window of any domain, YYYY-MM-DD; null without data.",
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "domains": {
                                                    "description": "The site first, then each competitor.",
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "domain": {
                                                                "description": "The domain, without www.",
                                                                "type": "string"
                                                            },
                                                            "own": {
                                                                "description": "Whether this is the site itself.",
                                                                "type": "boolean"
                                                            },
                                                            "origin": {
                                                                "description": "The origin Google has data for (with or without www); null when it has none.",
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "state": {
                                                                "description": "ok, pending (not fetched yet) or no_data (Google has no data for this origin and device).",
                                                                "type": "string"
                                                            },
                                                            "status": {
                                                                "description": "pass when LCP, INP and CLS are all good, fail when one is not; null without LCP or CLS.",
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "partial": {
                                                                "description": "Whether status leaves out INP because Google has no INP value.",
                                                                "type": "boolean"
                                                            },
                                                            "rank": {
                                                                "description": "Place among the domains (1 is best): passing first, then by how many metrics are good and how close the rest is; null without data.",
                                                                "type": [
                                                                    "integer",
                                                                    "null"
                                                                ]
                                                            },
                                                            "lcp_ms": {
                                                                "description": "Largest Contentful Paint in milliseconds; null when Google has no value for it.",
                                                                "type": [
                                                                    "object",
                                                                    "null"
                                                                ],
                                                                "properties": {
                                                                    "value": {
                                                                        "description": "The value (75th percentile of real Chrome visits over the 28 days up to date).",
                                                                        "type": "number"
                                                                    },
                                                                    "date": {
                                                                        "description": "Last day of the 28-day window the value is from, YYYY-MM-DD.",
                                                                        "type": "string"
                                                                    },
                                                                    "stale": {
                                                                        "description": "Whether the value is from an older window than latest_date (Google had no newer value).",
                                                                        "type": "boolean"
                                                                    },
                                                                    "previous": {
                                                                        "description": "The value 28 days before; null when there is none.",
                                                                        "type": [
                                                                            "number",
                                                                            "null"
                                                                        ]
                                                                    },
                                                                    "change_pct": {
                                                                        "description": "Change against previous in percent (negative is faster); null without previous.",
                                                                        "type": [
                                                                            "number",
                                                                            "null"
                                                                        ]
                                                                    },
                                                                    "rating": {
                                                                        "description": "good (up to 2500), needs_improvement (up to 4000) or poor.",
                                                                        "type": "string"
                                                                    }
                                                                },
                                                                "required": [
                                                                    "value",
                                                                    "date",
                                                                    "stale",
                                                                    "previous",
                                                                    "change_pct",
                                                                    "rating"
                                                                ]
                                                            },
                                                            "inp_ms": {
                                                                "description": "Interaction to Next Paint in milliseconds; null when Google has no value for it.",
                                                                "type": [
                                                                    "object",
                                                                    "null"
                                                                ],
                                                                "properties": {
                                                                    "value": {
                                                                        "description": "The value (75th percentile of real Chrome visits over the 28 days up to date).",
                                                                        "type": "number"
                                                                    },
                                                                    "date": {
                                                                        "description": "Last day of the 28-day window the value is from, YYYY-MM-DD.",
                                                                        "type": "string"
                                                                    },
                                                                    "stale": {
                                                                        "description": "Whether the value is from an older window than latest_date (Google had no newer value).",
                                                                        "type": "boolean"
                                                                    },
                                                                    "previous": {
                                                                        "description": "The value 28 days before; null when there is none.",
                                                                        "type": [
                                                                            "number",
                                                                            "null"
                                                                        ]
                                                                    },
                                                                    "change_pct": {
                                                                        "description": "Change against previous in percent (negative is faster); null without previous.",
                                                                        "type": [
                                                                            "number",
                                                                            "null"
                                                                        ]
                                                                    },
                                                                    "rating": {
                                                                        "description": "good (up to 200), needs_improvement (up to 500) or poor.",
                                                                        "type": "string"
                                                                    }
                                                                },
                                                                "required": [
                                                                    "value",
                                                                    "date",
                                                                    "stale",
                                                                    "previous",
                                                                    "change_pct",
                                                                    "rating"
                                                                ]
                                                            },
                                                            "cls": {
                                                                "description": "Cumulative Layout Shift (no unit); null when Google has no value for it.",
                                                                "type": [
                                                                    "object",
                                                                    "null"
                                                                ],
                                                                "properties": {
                                                                    "value": {
                                                                        "description": "The value (75th percentile of real Chrome visits over the 28 days up to date).",
                                                                        "type": "number"
                                                                    },
                                                                    "date": {
                                                                        "description": "Last day of the 28-day window the value is from, YYYY-MM-DD.",
                                                                        "type": "string"
                                                                    },
                                                                    "stale": {
                                                                        "description": "Whether the value is from an older window than latest_date (Google had no newer value).",
                                                                        "type": "boolean"
                                                                    },
                                                                    "previous": {
                                                                        "description": "The value 28 days before; null when there is none.",
                                                                        "type": [
                                                                            "number",
                                                                            "null"
                                                                        ]
                                                                    },
                                                                    "change_pct": {
                                                                        "description": "Change against previous in percent; 0 for a change under 0.015, null when previous is under 0.05 or missing.",
                                                                        "type": [
                                                                            "number",
                                                                            "null"
                                                                        ]
                                                                    },
                                                                    "rating": {
                                                                        "description": "good (up to 0.1), needs_improvement (up to 0.25) or poor.",
                                                                        "type": "string"
                                                                    }
                                                                },
                                                                "required": [
                                                                    "value",
                                                                    "date",
                                                                    "stale",
                                                                    "previous",
                                                                    "change_pct",
                                                                    "rating"
                                                                ]
                                                            }
                                                        },
                                                        "required": [
                                                            "domain",
                                                            "own",
                                                            "origin",
                                                            "state",
                                                            "status",
                                                            "partial",
                                                            "rank",
                                                            "lcp_ms",
                                                            "inp_ms",
                                                            "cls"
                                                        ]
                                                    }
                                                }
                                            },
                                            "required": [
                                                "enabled",
                                                "enabled_at",
                                                "device",
                                                "own_domain",
                                                "competitors",
                                                "latest_date",
                                                "domains"
                                            ]
                                        },
                                        "meta": {
                                            "type": "object",
                                            "description": "site_id; next_cursor and total for a list; period {from, to, compare_from, compare_to} where the endpoint covers a period."
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "400": {
                        "$ref": "#/components/responses/Error"
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "404": {
                        "$ref": "#/components/responses/Error"
                    },
                    "409": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    },
                    "502": {
                        "$ref": "#/components/responses/Error"
                    }
                }
            }
        },
        "/rest/v1/crux.history": {
            "post": {
                "operationId": "crux_history",
                "tags": [
                    "crux"
                ],
                "summary": "Returns LCP, INP and CLS per week for the site and each competitor, oldest week first: one item per domain, the site first.",
                "description": "Returns LCP, INP and CLS per week for the site and each competitor, oldest week first: one item per domain, the site first. Each week is the 75th percentile of real Chrome visits over the 28 days up to its date; a value is null when Google had none that week. All domains share the same weeks.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "site_id": {
                                        "type": "string",
                                        "description": "The site: its id from list_sites, or the id in the app’s address."
                                    },
                                    "device": {
                                        "type": "string",
                                        "enum": [
                                            "phone",
                                            "desktop",
                                            "all"
                                        ],
                                        "default": "phone",
                                        "description": "phone, desktop or all (all devices together). Defaults to phone."
                                    },
                                    "weeks": {
                                        "type": "integer",
                                        "minimum": 1,
                                        "maximum": 104,
                                        "default": 104,
                                        "description": "The newest this many weeks."
                                    }
                                },
                                "required": [
                                    "site_id"
                                ],
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "domain": {
                                                        "description": "The domain, without www.",
                                                        "type": "string"
                                                    },
                                                    "own": {
                                                        "description": "Whether this is the site itself.",
                                                        "type": "boolean"
                                                    },
                                                    "state": {
                                                        "description": "ok, pending (not fetched yet) or no_data (Google has no data for this origin and device).",
                                                        "type": "string"
                                                    },
                                                    "weeks": {
                                                        "description": "Per week, oldest first; empty without data.",
                                                        "type": "array",
                                                        "items": {
                                                            "type": "object",
                                                            "properties": {
                                                                "date": {
                                                                    "description": "Last day of the 28-day window, YYYY-MM-DD.",
                                                                    "type": "string"
                                                                },
                                                                "lcp_ms": {
                                                                    "description": "Largest Contentful Paint in milliseconds.",
                                                                    "type": [
                                                                        "number",
                                                                        "null"
                                                                    ]
                                                                },
                                                                "inp_ms": {
                                                                    "description": "Interaction to Next Paint in milliseconds.",
                                                                    "type": [
                                                                        "number",
                                                                        "null"
                                                                    ]
                                                                },
                                                                "cls": {
                                                                    "description": "Cumulative Layout Shift.",
                                                                    "type": [
                                                                        "number",
                                                                        "null"
                                                                    ]
                                                                }
                                                            },
                                                            "required": [
                                                                "date",
                                                                "lcp_ms",
                                                                "inp_ms",
                                                                "cls"
                                                            ]
                                                        }
                                                    }
                                                },
                                                "required": [
                                                    "domain",
                                                    "own",
                                                    "state",
                                                    "weeks"
                                                ]
                                            }
                                        },
                                        "meta": {
                                            "type": "object",
                                            "description": "site_id; next_cursor and total for a list; period {from, to, compare_from, compare_to} where the endpoint covers a period."
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "400": {
                        "$ref": "#/components/responses/Error"
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "404": {
                        "$ref": "#/components/responses/Error"
                    },
                    "409": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    },
                    "502": {
                        "$ref": "#/components/responses/Error"
                    }
                }
            }
        },
        "/rest/v1/crux.metric": {
            "post": {
                "operationId": "crux_metric",
                "tags": [
                    "crux"
                ],
                "summary": "Returns one Core Web Vital of the site in detail: per week the 75th percentile on the chosen device and on each device, the share of good, needs-improvement and poor visits, and for LCP the four LCP parts; plus each competitor's newest week.",
                "description": "Returns one Core Web Vital of the site in detail: per week the 75th percentile on the chosen device and on each device, the share of good, needs-improvement and poor visits, and for LCP the four LCP parts; plus each competitor's newest week. Values null where Google had none.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "site_id": {
                                        "type": "string",
                                        "description": "The site: its id from list_sites, or the id in the app’s address."
                                    },
                                    "metric": {
                                        "type": "string",
                                        "enum": [
                                            "lcp",
                                            "inp",
                                            "cls"
                                        ],
                                        "default": "lcp",
                                        "description": "lcp, inp or cls. Defaults to lcp."
                                    },
                                    "device": {
                                        "type": "string",
                                        "enum": [
                                            "phone",
                                            "desktop",
                                            "all"
                                        ],
                                        "default": "phone",
                                        "description": "phone, desktop or all (all devices together). Defaults to phone."
                                    }
                                },
                                "required": [
                                    "site_id"
                                ],
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "enabled": {
                                                    "description": "Whether Core Web Vitals is switched on for the site. When false, the other fields are empty.",
                                                    "type": "boolean"
                                                },
                                                "enabled_at": {
                                                    "description": "When it was switched on, ISO 8601 UTC; null when never.",
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "device": {
                                                    "description": "The device the numbers are for: phone, desktop or all.",
                                                    "type": "string"
                                                },
                                                "own_domain": {
                                                    "description": "The domain of the site, without www.",
                                                    "type": "string"
                                                },
                                                "competitors": {
                                                    "description": "The competitor domains of the site (the shared list of the Rank tracker, Core Web Vitals and AI Insights), at most 6.",
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    }
                                                },
                                                "metric": {
                                                    "description": "lcp, inp or cls.",
                                                    "type": "string"
                                                },
                                                "unit": {
                                                    "description": "ms for lcp and inp; null for cls (no unit).",
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "latest_date": {
                                                    "description": "The newest week, YYYY-MM-DD; null without data.",
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "weeks": {
                                                    "description": "Per week of the site, oldest first.",
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "date": {
                                                                "description": "Last day of the 28-day window, YYYY-MM-DD.",
                                                                "type": "string"
                                                            },
                                                            "p75": {
                                                                "description": "The 75th percentile on device, in unit.",
                                                                "type": [
                                                                    "number",
                                                                    "null"
                                                                ]
                                                            },
                                                            "p75_phone": {
                                                                "description": "The 75th percentile on phones.",
                                                                "type": [
                                                                    "number",
                                                                    "null"
                                                                ]
                                                            },
                                                            "p75_desktop": {
                                                                "description": "The 75th percentile on desktops.",
                                                                "type": [
                                                                    "number",
                                                                    "null"
                                                                ]
                                                            },
                                                            "p75_all": {
                                                                "description": "The 75th percentile on all devices together.",
                                                                "type": [
                                                                    "number",
                                                                    "null"
                                                                ]
                                                            },
                                                            "good_pct": {
                                                                "description": "Share of visits with a good value, 0-100, on device.",
                                                                "type": [
                                                                    "number",
                                                                    "null"
                                                                ]
                                                            },
                                                            "needs_improvement_pct": {
                                                                "description": "Share of visits that need improvement, 0-100.",
                                                                "type": [
                                                                    "number",
                                                                    "null"
                                                                ]
                                                            },
                                                            "poor_pct": {
                                                                "description": "Share of visits with a poor value, 0-100.",
                                                                "type": [
                                                                    "number",
                                                                    "null"
                                                                ]
                                                            },
                                                            "lcp_parts": {
                                                                "description": "For lcp only, when the largest element is an image: the 75th percentile of each part in milliseconds (each part is its own percentile, so they do not add up to LCP); null otherwise.",
                                                                "type": [
                                                                    "object",
                                                                    "null"
                                                                ],
                                                                "properties": {
                                                                    "ttfb_ms": {
                                                                        "description": "Time to first byte.",
                                                                        "type": [
                                                                            "number",
                                                                            "null"
                                                                        ]
                                                                    },
                                                                    "load_delay_ms": {
                                                                        "description": "From first byte until the image starts loading.",
                                                                        "type": [
                                                                            "number",
                                                                            "null"
                                                                        ]
                                                                    },
                                                                    "load_duration_ms": {
                                                                        "description": "Loading the image.",
                                                                        "type": [
                                                                            "number",
                                                                            "null"
                                                                        ]
                                                                    },
                                                                    "render_delay_ms": {
                                                                        "description": "From loaded until shown.",
                                                                        "type": [
                                                                            "number",
                                                                            "null"
                                                                        ]
                                                                    }
                                                                },
                                                                "required": [
                                                                    "ttfb_ms",
                                                                    "load_delay_ms",
                                                                    "load_duration_ms",
                                                                    "render_delay_ms"
                                                                ]
                                                            }
                                                        },
                                                        "required": [
                                                            "date",
                                                            "p75",
                                                            "p75_phone",
                                                            "p75_desktop",
                                                            "p75_all",
                                                            "good_pct",
                                                            "needs_improvement_pct",
                                                            "poor_pct",
                                                            "lcp_parts"
                                                        ]
                                                    }
                                                },
                                                "competitor_weeks": {
                                                    "description": "Each competitor's newest week with a value.",
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "domain": {
                                                                "description": "The domain, without www.",
                                                                "type": "string"
                                                            },
                                                            "date": {
                                                                "description": "Last day of that 28-day window, YYYY-MM-DD.",
                                                                "type": "string"
                                                            },
                                                            "p75": {
                                                                "description": "The 75th percentile on device, in unit.",
                                                                "type": [
                                                                    "number",
                                                                    "null"
                                                                ]
                                                            },
                                                            "good_pct": {
                                                                "description": "Share of good visits, 0-100.",
                                                                "type": [
                                                                    "number",
                                                                    "null"
                                                                ]
                                                            },
                                                            "needs_improvement_pct": {
                                                                "description": "Share of visits that need improvement, 0-100.",
                                                                "type": [
                                                                    "number",
                                                                    "null"
                                                                ]
                                                            },
                                                            "poor_pct": {
                                                                "description": "Share of poor visits, 0-100.",
                                                                "type": [
                                                                    "number",
                                                                    "null"
                                                                ]
                                                            }
                                                        },
                                                        "required": [
                                                            "domain",
                                                            "date",
                                                            "p75",
                                                            "good_pct",
                                                            "needs_improvement_pct",
                                                            "poor_pct"
                                                        ]
                                                    }
                                                }
                                            },
                                            "required": [
                                                "enabled",
                                                "enabled_at",
                                                "device",
                                                "own_domain",
                                                "competitors",
                                                "metric",
                                                "unit",
                                                "latest_date",
                                                "weeks",
                                                "competitor_weeks"
                                            ]
                                        },
                                        "meta": {
                                            "type": "object",
                                            "description": "site_id; next_cursor and total for a list; period {from, to, compare_from, compare_to} where the endpoint covers a period."
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "400": {
                        "$ref": "#/components/responses/Error"
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "404": {
                        "$ref": "#/components/responses/Error"
                    },
                    "409": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    },
                    "502": {
                        "$ref": "#/components/responses/Error"
                    }
                }
            }
        },
        "/rest/v1/crux.diagnose": {
            "post": {
                "operationId": "crux_diagnose",
                "tags": [
                    "crux"
                ],
                "summary": "Returns what is behind the numbers, per domain (the site first, then its competitors), each from its newest week with a value: the four LCP parts, how visits arrive (navigation types such as back/forward cache and prerender), the type of the largest element, server and network timing (TTFB, FCP, round trip time) and ads.",
                "description": "Returns what is behind the numbers, per domain (the site first, then its competitors), each from its newest week with a value: the four LCP parts, how visits arrive (navigation types such as back/forward cache and prerender), the type of the largest element, server and network timing (TTFB, FCP, round trip time) and ads. A field is null when Google has no value.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "site_id": {
                                        "type": "string",
                                        "description": "The site: its id from list_sites, or the id in the app’s address."
                                    },
                                    "device": {
                                        "type": "string",
                                        "enum": [
                                            "phone",
                                            "desktop",
                                            "all"
                                        ],
                                        "default": "phone",
                                        "description": "phone, desktop or all (all devices together). Defaults to phone."
                                    }
                                },
                                "required": [
                                    "site_id"
                                ],
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "domain": {
                                                        "description": "The domain, without www.",
                                                        "type": "string"
                                                    },
                                                    "own": {
                                                        "description": "Whether this is the site itself.",
                                                        "type": "boolean"
                                                    },
                                                    "state": {
                                                        "description": "ok, pending (not fetched yet) or no_data (Google has no data for this origin and device).",
                                                        "type": "string"
                                                    },
                                                    "lcp_parts": {
                                                        "description": "The four LCP parts when the largest element is an image, in milliseconds (each its own 75th percentile).",
                                                        "type": [
                                                            "object",
                                                            "null"
                                                        ],
                                                        "properties": {
                                                            "date": {
                                                                "description": "Last day of the 28-day window, YYYY-MM-DD.",
                                                                "type": "string"
                                                            },
                                                            "stale": {
                                                                "description": "Whether this is an older window than the newest one.",
                                                                "type": "boolean"
                                                            },
                                                            "ttfb_ms": {
                                                                "description": "Time to first byte.",
                                                                "type": [
                                                                    "number",
                                                                    "null"
                                                                ]
                                                            },
                                                            "load_delay_ms": {
                                                                "description": "From first byte until the image starts loading.",
                                                                "type": [
                                                                    "number",
                                                                    "null"
                                                                ]
                                                            },
                                                            "load_duration_ms": {
                                                                "description": "Loading the image.",
                                                                "type": [
                                                                    "number",
                                                                    "null"
                                                                ]
                                                            },
                                                            "render_delay_ms": {
                                                                "description": "From loaded until shown.",
                                                                "type": [
                                                                    "number",
                                                                    "null"
                                                                ]
                                                            }
                                                        },
                                                        "required": [
                                                            "date",
                                                            "stale",
                                                            "ttfb_ms",
                                                            "load_delay_ms",
                                                            "load_duration_ms",
                                                            "render_delay_ms"
                                                        ]
                                                    },
                                                    "navigation_types": {
                                                        "description": "How visits arrive.",
                                                        "type": [
                                                            "object",
                                                            "null"
                                                        ],
                                                        "properties": {
                                                            "date": {
                                                                "description": "Last day of the 28-day window, YYYY-MM-DD.",
                                                                "type": "string"
                                                            },
                                                            "stale": {
                                                                "description": "Whether this is an older window than the newest one.",
                                                                "type": "boolean"
                                                            },
                                                            "items": {
                                                                "description": "Largest share first.",
                                                                "type": "array",
                                                                "items": {
                                                                    "type": "object",
                                                                    "properties": {
                                                                        "key": {
                                                                            "description": "navigate, navigate_cache, reload, restore, back_forward, back_forward_cache or prerender.",
                                                                            "type": "string"
                                                                        },
                                                                        "share_pct": {
                                                                            "description": "Share of visits, 0-100.",
                                                                            "type": "number"
                                                                        }
                                                                    },
                                                                    "required": [
                                                                        "key",
                                                                        "share_pct"
                                                                    ]
                                                                }
                                                            }
                                                        },
                                                        "required": [
                                                            "date",
                                                            "stale",
                                                            "items"
                                                        ]
                                                    },
                                                    "lcp_resource_types": {
                                                        "description": "What the largest element is.",
                                                        "type": [
                                                            "object",
                                                            "null"
                                                        ],
                                                        "properties": {
                                                            "date": {
                                                                "description": "Last day of the 28-day window, YYYY-MM-DD.",
                                                                "type": "string"
                                                            },
                                                            "stale": {
                                                                "description": "Whether this is an older window than the newest one.",
                                                                "type": "boolean"
                                                            },
                                                            "items": {
                                                                "description": "Largest share first.",
                                                                "type": "array",
                                                                "items": {
                                                                    "type": "object",
                                                                    "properties": {
                                                                        "key": {
                                                                            "description": "image or text.",
                                                                            "type": "string"
                                                                        },
                                                                        "share_pct": {
                                                                            "description": "Share of visits, 0-100.",
                                                                            "type": "number"
                                                                        }
                                                                    },
                                                                    "required": [
                                                                        "key",
                                                                        "share_pct"
                                                                    ]
                                                                }
                                                            }
                                                        },
                                                        "required": [
                                                            "date",
                                                            "stale",
                                                            "items"
                                                        ]
                                                    },
                                                    "ttfb_ms": {
                                                        "description": "Time to first byte in milliseconds; null when Google has no value for it.",
                                                        "type": [
                                                            "object",
                                                            "null"
                                                        ],
                                                        "properties": {
                                                            "value": {
                                                                "description": "The value (75th percentile of real Chrome visits over the 28 days up to date).",
                                                                "type": "number"
                                                            },
                                                            "date": {
                                                                "description": "Last day of the 28-day window the value is from, YYYY-MM-DD.",
                                                                "type": "string"
                                                            },
                                                            "stale": {
                                                                "description": "Whether the value is from an older window than latest_date (Google had no newer value).",
                                                                "type": "boolean"
                                                            }
                                                        },
                                                        "required": [
                                                            "value",
                                                            "date",
                                                            "stale"
                                                        ]
                                                    },
                                                    "fcp_ms": {
                                                        "description": "First Contentful Paint in milliseconds; null when Google has no value for it.",
                                                        "type": [
                                                            "object",
                                                            "null"
                                                        ],
                                                        "properties": {
                                                            "value": {
                                                                "description": "The value (75th percentile of real Chrome visits over the 28 days up to date).",
                                                                "type": "number"
                                                            },
                                                            "date": {
                                                                "description": "Last day of the 28-day window the value is from, YYYY-MM-DD.",
                                                                "type": "string"
                                                            },
                                                            "stale": {
                                                                "description": "Whether the value is from an older window than latest_date (Google had no newer value).",
                                                                "type": "boolean"
                                                            }
                                                        },
                                                        "required": [
                                                            "value",
                                                            "date",
                                                            "stale"
                                                        ]
                                                    },
                                                    "rtt_ms": {
                                                        "description": "Round trip time of the network in milliseconds; null when Google has no value for it.",
                                                        "type": [
                                                            "object",
                                                            "null"
                                                        ],
                                                        "properties": {
                                                            "value": {
                                                                "description": "The value (75th percentile of real Chrome visits over the 28 days up to date).",
                                                                "type": "number"
                                                            },
                                                            "date": {
                                                                "description": "Last day of the 28-day window the value is from, YYYY-MM-DD.",
                                                                "type": "string"
                                                            },
                                                            "stale": {
                                                                "description": "Whether the value is from an older window than latest_date (Google had no newer value).",
                                                                "type": "boolean"
                                                            }
                                                        },
                                                        "required": [
                                                            "value",
                                                            "date",
                                                            "stale"
                                                        ]
                                                    },
                                                    "ad_density_pct": {
                                                        "description": "Share of the screen taken by ads, 0-100; null when Google has no value for it.",
                                                        "type": [
                                                            "object",
                                                            "null"
                                                        ],
                                                        "properties": {
                                                            "value": {
                                                                "description": "The value (75th percentile of real Chrome visits over the 28 days up to date).",
                                                                "type": "number"
                                                            },
                                                            "date": {
                                                                "description": "Last day of the 28-day window the value is from, YYYY-MM-DD.",
                                                                "type": "string"
                                                            },
                                                            "stale": {
                                                                "description": "Whether the value is from an older window than latest_date (Google had no newer value).",
                                                                "type": "boolean"
                                                            }
                                                        },
                                                        "required": [
                                                            "value",
                                                            "date",
                                                            "stale"
                                                        ]
                                                    },
                                                    "ad_kilobytes": {
                                                        "description": "Kilobytes of ads per page; null when Google has no value for it.",
                                                        "type": [
                                                            "object",
                                                            "null"
                                                        ],
                                                        "properties": {
                                                            "value": {
                                                                "description": "The value (75th percentile of real Chrome visits over the 28 days up to date).",
                                                                "type": "number"
                                                            },
                                                            "date": {
                                                                "description": "Last day of the 28-day window the value is from, YYYY-MM-DD.",
                                                                "type": "string"
                                                            },
                                                            "stale": {
                                                                "description": "Whether the value is from an older window than latest_date (Google had no newer value).",
                                                                "type": "boolean"
                                                            }
                                                        },
                                                        "required": [
                                                            "value",
                                                            "date",
                                                            "stale"
                                                        ]
                                                    },
                                                    "ad_cpu_ms": {
                                                        "description": "Main-thread time spent on ads in milliseconds; null when Google has no value for it.",
                                                        "type": [
                                                            "object",
                                                            "null"
                                                        ],
                                                        "properties": {
                                                            "value": {
                                                                "description": "The value (75th percentile of real Chrome visits over the 28 days up to date).",
                                                                "type": "number"
                                                            },
                                                            "date": {
                                                                "description": "Last day of the 28-day window the value is from, YYYY-MM-DD.",
                                                                "type": "string"
                                                            },
                                                            "stale": {
                                                                "description": "Whether the value is from an older window than latest_date (Google had no newer value).",
                                                                "type": "boolean"
                                                            }
                                                        },
                                                        "required": [
                                                            "value",
                                                            "date",
                                                            "stale"
                                                        ]
                                                    },
                                                    "ad_count": {
                                                        "description": "Ads per page; null when Google has no value for it.",
                                                        "type": [
                                                            "object",
                                                            "null"
                                                        ],
                                                        "properties": {
                                                            "value": {
                                                                "description": "The value (75th percentile of real Chrome visits over the 28 days up to date).",
                                                                "type": "number"
                                                            },
                                                            "date": {
                                                                "description": "Last day of the 28-day window the value is from, YYYY-MM-DD.",
                                                                "type": "string"
                                                            },
                                                            "stale": {
                                                                "description": "Whether the value is from an older window than latest_date (Google had no newer value).",
                                                                "type": "boolean"
                                                            }
                                                        },
                                                        "required": [
                                                            "value",
                                                            "date",
                                                            "stale"
                                                        ]
                                                    }
                                                },
                                                "required": [
                                                    "domain",
                                                    "own",
                                                    "state",
                                                    "lcp_parts",
                                                    "navigation_types",
                                                    "lcp_resource_types",
                                                    "ttfb_ms",
                                                    "fcp_ms",
                                                    "rtt_ms",
                                                    "ad_density_pct",
                                                    "ad_kilobytes",
                                                    "ad_cpu_ms",
                                                    "ad_count"
                                                ]
                                            }
                                        },
                                        "meta": {
                                            "type": "object",
                                            "description": "site_id; next_cursor and total for a list; period {from, to, compare_from, compare_to} where the endpoint covers a period."
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "400": {
                        "$ref": "#/components/responses/Error"
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "404": {
                        "$ref": "#/components/responses/Error"
                    },
                    "409": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    },
                    "502": {
                        "$ref": "#/components/responses/Error"
                    }
                }
            }
        },
        "/rest/v1/crux.visitors": {
            "post": {
                "operationId": "crux_visitors",
                "tags": [
                    "crux"
                ],
                "summary": "Returns the site's own LCP, INP and CLS per week next to its GA4 visits per session over the same 28 days and device (revenue, key event rate, engagement, bounce rate, pages), and per pair of a speed metric and a visit metric how they moved together: the rank correlation of their changes over 28-day blocks and the biggest change in speed.",
                "description": "Returns the site's own LCP, INP and CLS per week next to its GA4 visits per session over the same 28 days and device (revenue, key event rate, engagement, bounce rate, pages), and per pair of a speed metric and a visit metric how they moved together: the rank correlation of their changes over 28-day blocks and the biggest change in speed. Visit values are null without GA4.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "site_id": {
                                        "type": "string",
                                        "description": "The site: its id from list_sites, or the id in the app’s address."
                                    },
                                    "device": {
                                        "type": "string",
                                        "enum": [
                                            "phone",
                                            "desktop",
                                            "all"
                                        ],
                                        "default": "phone",
                                        "description": "phone, desktop or all (all devices together). Defaults to phone."
                                    }
                                },
                                "required": [
                                    "site_id"
                                ],
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "enabled": {
                                                    "description": "Whether Core Web Vitals is switched on for the site. When false, the other fields are empty.",
                                                    "type": "boolean"
                                                },
                                                "enabled_at": {
                                                    "description": "When it was switched on, ISO 8601 UTC; null when never.",
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "device": {
                                                    "description": "The device the numbers are for: phone, desktop or all.",
                                                    "type": "string"
                                                },
                                                "own_domain": {
                                                    "description": "The domain of the site, without www.",
                                                    "type": "string"
                                                },
                                                "competitors": {
                                                    "description": "The competitor domains of the site (the shared list of the Rank tracker, Core Web Vitals and AI Insights), at most 6.",
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    }
                                                },
                                                "latest_date": {
                                                    "description": "The newest week, YYYY-MM-DD; null without data.",
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "ga4": {
                                                    "description": "ok, connect (GA4 not connected) or error (Google returned an error); null when Core Web Vitals is off.",
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "has_revenue": {
                                                    "description": "Whether the site measures revenue in GA4.",
                                                    "type": "boolean"
                                                },
                                                "weeks": {
                                                    "description": "Per week, oldest first.",
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "date": {
                                                                "description": "Last day of the 28-day window, YYYY-MM-DD.",
                                                                "type": "string"
                                                            },
                                                            "lcp_ms": {
                                                                "description": "Largest Contentful Paint in milliseconds.",
                                                                "type": [
                                                                    "number",
                                                                    "null"
                                                                ]
                                                            },
                                                            "inp_ms": {
                                                                "description": "Interaction to Next Paint in milliseconds.",
                                                                "type": [
                                                                    "number",
                                                                    "null"
                                                                ]
                                                            },
                                                            "cls": {
                                                                "description": "Cumulative Layout Shift.",
                                                                "type": [
                                                                    "number",
                                                                    "null"
                                                                ]
                                                            },
                                                            "revenue_per_session": {
                                                                "description": "GA4 revenue per session, in the currency of the GA4 property.",
                                                                "type": [
                                                                    "number",
                                                                    "null"
                                                                ]
                                                            },
                                                            "key_event_rate_pct": {
                                                                "description": "Share of sessions with a key event, 0-100.",
                                                                "type": [
                                                                    "number",
                                                                    "null"
                                                                ]
                                                            },
                                                            "engagement_seconds": {
                                                                "description": "Engaged time per session in seconds.",
                                                                "type": [
                                                                    "integer",
                                                                    "null"
                                                                ]
                                                            },
                                                            "bounce_rate_pct": {
                                                                "description": "Share of sessions that were not engaged, 0-100.",
                                                                "type": [
                                                                    "number",
                                                                    "null"
                                                                ]
                                                            },
                                                            "pages_per_session": {
                                                                "description": "Page views per session.",
                                                                "type": [
                                                                    "number",
                                                                    "null"
                                                                ]
                                                            }
                                                        },
                                                        "required": [
                                                            "date",
                                                            "lcp_ms",
                                                            "inp_ms",
                                                            "cls",
                                                            "revenue_per_session",
                                                            "key_event_rate_pct",
                                                            "engagement_seconds",
                                                            "bounce_rate_pct",
                                                            "pages_per_session"
                                                        ]
                                                    }
                                                },
                                                "relations": {
                                                    "description": "One per speed metric and visit metric; empty without GA4.",
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "speed_metric": {
                                                                "description": "lcp_ms, inp_ms or cls.",
                                                                "type": "string"
                                                            },
                                                            "visit_metric": {
                                                                "description": "revenue_per_session, key_event_rate_pct, engagement_seconds, bounce_rate_pct or pages_per_session.",
                                                                "type": "string"
                                                            },
                                                            "better": {
                                                                "description": "higher or lower: which way the visit metric is better.",
                                                                "type": "string"
                                                            },
                                                            "blocks": {
                                                                "description": "Pairs of 28-day blocks, 28 days apart, with both values.",
                                                                "type": "integer"
                                                            },
                                                            "blocks_moved": {
                                                                "description": "Of those, the blocks where speed changed noticeably.",
                                                                "type": "integer"
                                                            },
                                                            "blocks_with": {
                                                                "description": "Of those, the blocks where the visit metric moved the better way when speed got faster (or the worse way when slower).",
                                                                "type": "integer"
                                                            },
                                                            "rho": {
                                                                "description": "Spearman rank correlation of the changes, -1 to 1; null with too few blocks or no movement.",
                                                                "type": [
                                                                    "number",
                                                                    "null"
                                                                ]
                                                            },
                                                            "strength": {
                                                                "description": "too_few (under 6 blocks), none, some or clear.",
                                                                "type": "string"
                                                            },
                                                            "direction": {
                                                                "description": "expected (faster goes with better visits) or opposite; null without strength.",
                                                                "type": [
                                                                    "string",
                                                                    "null"
                                                                ]
                                                            },
                                                            "biggest_change": {
                                                                "description": "The biggest change in speed between two weeks 28 days apart, with the visit metric before and after; null when there is none.",
                                                                "type": [
                                                                    "object",
                                                                    "null"
                                                                ],
                                                                "properties": {
                                                                    "direction": {
                                                                        "description": "faster or slower.",
                                                                        "type": "string"
                                                                    },
                                                                    "change_pct": {
                                                                        "description": "Change in speed in percent.",
                                                                        "type": "number"
                                                                    },
                                                                    "before": {
                                                                        "description": "The week before.",
                                                                        "type": "object",
                                                                        "properties": {
                                                                            "date": {
                                                                                "description": "YYYY-MM-DD.",
                                                                                "type": "string"
                                                                            },
                                                                            "speed": {
                                                                                "description": "The speed metric.",
                                                                                "type": "number"
                                                                            },
                                                                            "visit": {
                                                                                "description": "The visit metric.",
                                                                                "type": "number"
                                                                            }
                                                                        },
                                                                        "required": [
                                                                            "date",
                                                                            "speed",
                                                                            "visit"
                                                                        ]
                                                                    },
                                                                    "after": {
                                                                        "description": "The week after.",
                                                                        "type": "object",
                                                                        "properties": {
                                                                            "date": {
                                                                                "description": "YYYY-MM-DD.",
                                                                                "type": "string"
                                                                            },
                                                                            "speed": {
                                                                                "description": "The speed metric.",
                                                                                "type": "number"
                                                                            },
                                                                            "visit": {
                                                                                "description": "The visit metric.",
                                                                                "type": "number"
                                                                            }
                                                                        },
                                                                        "required": [
                                                                            "date",
                                                                            "speed",
                                                                            "visit"
                                                                        ]
                                                                    }
                                                                },
                                                                "required": [
                                                                    "direction",
                                                                    "change_pct",
                                                                    "before",
                                                                    "after"
                                                                ]
                                                            }
                                                        },
                                                        "required": [
                                                            "speed_metric",
                                                            "visit_metric",
                                                            "better",
                                                            "blocks",
                                                            "blocks_moved",
                                                            "blocks_with",
                                                            "rho",
                                                            "strength",
                                                            "direction",
                                                            "biggest_change"
                                                        ]
                                                    }
                                                }
                                            },
                                            "required": [
                                                "enabled",
                                                "enabled_at",
                                                "device",
                                                "own_domain",
                                                "competitors",
                                                "latest_date",
                                                "ga4",
                                                "has_revenue",
                                                "weeks",
                                                "relations"
                                            ]
                                        },
                                        "meta": {
                                            "type": "object",
                                            "description": "site_id; next_cursor and total for a list; period {from, to, compare_from, compare_to} where the endpoint covers a period."
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "400": {
                        "$ref": "#/components/responses/Error"
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "404": {
                        "$ref": "#/components/responses/Error"
                    },
                    "409": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    },
                    "502": {
                        "$ref": "#/components/responses/Error"
                    }
                }
            }
        },
        "/rest/v1/uptime.status": {
            "post": {
                "operationId": "uptime_status",
                "tags": [
                    "uptime"
                ],
                "summary": "Returns the uptime monitor of one site: whether it is on, the checked address (the homepage), the current state, since when it is up or down, the last check, when the SSL certificate expires, the share of checks that were not down over 7 and 30 days, the median response time over 7 days and the number of incidents in 30 days.",
                "description": "Returns the uptime monitor of one site: whether it is on, the checked address (the homepage), the current state, since when it is up or down, the last check, when the SSL certificate expires, the share of checks that were not down over 7 and 30 days, the median response time over 7 days and the number of incidents in 30 days. Values are null while the monitor has no checks yet.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "site_id": {
                                        "type": "string",
                                        "description": "The site: its id from list_sites, or the id in the app’s address."
                                    }
                                },
                                "required": [
                                    "site_id"
                                ],
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "enabled": {
                                                    "description": "Whether the monitor is on. When false, the numbers are from before it was switched off, or null.",
                                                    "type": "boolean"
                                                },
                                                "url": {
                                                    "description": "The address that is checked: the homepage of the site. Redirects are followed.",
                                                    "type": "string"
                                                },
                                                "state": {
                                                    "description": "pending (no checks yet), up, failing (one failed round; down only after two in a row), down, blocked (our check is refused by a firewall) or warn.",
                                                    "type": "string"
                                                },
                                                "up_since": {
                                                    "description": "Since when the site is up without a break, ISO 8601 UTC; null when it is not up or not known.",
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "down_since": {
                                                    "description": "Since when the site is down, ISO 8601 UTC; null when it is not down.",
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "last_check_at": {
                                                    "description": "The last check, ISO 8601 UTC; null before the first.",
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "certificate_expires_at": {
                                                    "description": "When the SSL certificate of the address expires, ISO 8601 UTC; null when not known.",
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "uptime_7d_pct": {
                                                    "description": "Share of the checks in the last 7 days that were not down, 0-100 with two decimals; null without checks.",
                                                    "type": [
                                                        "number",
                                                        "null"
                                                    ]
                                                },
                                                "uptime_30d_pct": {
                                                    "description": "The same over the last 30 days.",
                                                    "type": [
                                                        "number",
                                                        "null"
                                                    ]
                                                },
                                                "response_ms_median_7d": {
                                                    "description": "Median time to first byte of the checks in the last 7 days that answered, in milliseconds; null without one.",
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ]
                                                },
                                                "incidents_30d": {
                                                    "description": "Incidents in the last 30 days (see uptime.incidents).",
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "enabled",
                                                "url",
                                                "state",
                                                "up_since",
                                                "down_since",
                                                "last_check_at",
                                                "certificate_expires_at",
                                                "uptime_7d_pct",
                                                "uptime_30d_pct",
                                                "response_ms_median_7d",
                                                "incidents_30d"
                                            ]
                                        },
                                        "meta": {
                                            "type": "object",
                                            "description": "site_id; next_cursor and total for a list; period {from, to, compare_from, compare_to} where the endpoint covers a period."
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "400": {
                        "$ref": "#/components/responses/Error"
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "404": {
                        "$ref": "#/components/responses/Error"
                    },
                    "409": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    },
                    "502": {
                        "$ref": "#/components/responses/Error"
                    }
                }
            }
        },
        "/rest/v1/uptime.incidents": {
            "post": {
                "operationId": "uptime_incidents",
                "tags": [
                    "uptime"
                ],
                "summary": "Returns the incidents of the last 30 days, newest first: each run of checks in a row that were not up, with when it started and ended, how long it took, the worst outcome and the HTTP status or error of that check.",
                "description": "Returns the incidents of the last 30 days, newest first: each run of checks in a row that were not up, with when it started and ended, how long it took, the worst outcome and the HTTP status or error of that check. One failed round already counts here; the site is only marked down (and alerts are sent) after two in a row. An ongoing incident has no end.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "site_id": {
                                        "type": "string",
                                        "description": "The site: its id from list_sites, or the id in the app’s address."
                                    }
                                },
                                "required": [
                                    "site_id"
                                ],
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "started_at": {
                                                        "description": "The first check that was not up, ISO 8601 UTC.",
                                                        "type": "string"
                                                    },
                                                    "ended_at": {
                                                        "description": "The first check that was up again, ISO 8601 UTC; null while it is ongoing.",
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "ongoing": {
                                                        "description": "Whether the incident is still going on.",
                                                        "type": "boolean"
                                                    },
                                                    "minutes": {
                                                        "description": "From started_at to ended_at in minutes; null while it is ongoing.",
                                                        "type": [
                                                            "integer",
                                                            "null"
                                                        ]
                                                    },
                                                    "outcome": {
                                                        "description": "The worst outcome during the incident: up (answered 200), warn (answered with another status, or the address is invalid), blocked (403, 429 or a firewall challenge: our check is refused) or down (no answer, a timeout or a 5xx).",
                                                        "type": "string"
                                                    },
                                                    "rounds": {
                                                        "description": "How many checks in a row were not up.",
                                                        "type": "integer"
                                                    },
                                                    "http_status": {
                                                        "description": "The HTTP status of the check with the worst outcome; null when there was no answer.",
                                                        "type": [
                                                            "integer",
                                                            "null"
                                                        ]
                                                    },
                                                    "error": {
                                                        "description": "Why that check got no answer: dns, connect, connect_timeout, timeout, tls, redirects (more than 5), invalid_url, invalid_ip or network; null when it answered.",
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "firewall": {
                                                        "description": "Whether a firewall or CDN challenge refused a check during the incident.",
                                                        "type": "boolean"
                                                    }
                                                },
                                                "required": [
                                                    "started_at",
                                                    "ended_at",
                                                    "ongoing",
                                                    "minutes",
                                                    "outcome",
                                                    "rounds",
                                                    "http_status",
                                                    "error",
                                                    "firewall"
                                                ]
                                            }
                                        },
                                        "meta": {
                                            "type": "object",
                                            "description": "site_id; next_cursor and total for a list; period {from, to, compare_from, compare_to} where the endpoint covers a period."
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "400": {
                        "$ref": "#/components/responses/Error"
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "404": {
                        "$ref": "#/components/responses/Error"
                    },
                    "409": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    },
                    "502": {
                        "$ref": "#/components/responses/Error"
                    }
                }
            }
        },
        "/rest/v1/uptime.checks": {
            "post": {
                "operationId": "uptime_checks",
                "tags": [
                    "uptime"
                ],
                "summary": "Returns every check of the last 7 days, newest first, with its outcome and response time (time to first byte).",
                "description": "Returns every check of the last 7 days, newest first, with its outcome and response time (time to first byte). The response time is null when the check got no answer.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "site_id": {
                                        "type": "string",
                                        "description": "The site: its id from list_sites, or the id in the app’s address."
                                    }
                                },
                                "required": [
                                    "site_id"
                                ],
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "at": {
                                                        "description": "When the check ran, ISO 8601 UTC.",
                                                        "type": "string"
                                                    },
                                                    "outcome": {
                                                        "description": "up (answered 200), warn (answered with another status, or the address is invalid), blocked (403, 429 or a firewall challenge: our check is refused) or down (no answer, a timeout or a 5xx).",
                                                        "type": "string"
                                                    },
                                                    "response_ms": {
                                                        "description": "Time to first byte in milliseconds; null without an answer.",
                                                        "type": [
                                                            "integer",
                                                            "null"
                                                        ]
                                                    }
                                                },
                                                "required": [
                                                    "at",
                                                    "outcome",
                                                    "response_ms"
                                                ]
                                            }
                                        },
                                        "meta": {
                                            "type": "object",
                                            "description": "site_id; next_cursor and total for a list; period {from, to, compare_from, compare_to} where the endpoint covers a period."
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "400": {
                        "$ref": "#/components/responses/Error"
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "404": {
                        "$ref": "#/components/responses/Error"
                    },
                    "409": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    },
                    "502": {
                        "$ref": "#/components/responses/Error"
                    }
                }
            }
        },
        "/rest/v1/alerts.feed": {
            "post": {
                "operationId": "alerts_feed",
                "tags": [
                    "alerts"
                ],
                "summary": "Returns everything that happened on one site in the last 90 days, newest first, one row per event: outages, SSL and https problems, Core Web Vitals that got worse, and every change the SEO scan found on a page (a new problem, a fixed one, a changed title, H1, meta description or status).",
                "description": "Returns everything that happened on one site in the last 90 days, newest first, one row per event: outages, SSL and https problems, Core Web Vitals that got worse, and every change the SEO scan found on a page (a new problem, a fixed one, a changed title, H1, meta description or status). The same rows as the Meldingen page, independent of who gets which alert by mail or Slack. Page through with cursor.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "site_id": {
                                        "type": "string",
                                        "description": "The site: its id from list_sites, or the id in the app’s address."
                                    },
                                    "kind": {
                                        "type": "string",
                                        "enum": [
                                            "uptime",
                                            "sitecheck",
                                            "seo",
                                            "cwv"
                                        ],
                                        "description": "Only this kind: uptime, sitecheck, seo or cwv. Omit for all."
                                    },
                                    "problems_only": {
                                        "type": "boolean",
                                        "default": false,
                                        "description": "Only rows labelled problem, down or worse."
                                    },
                                    "q": {
                                        "type": "string",
                                        "maxLength": 100,
                                        "description": "Only rows whose page address (seo) or text (the other kinds) contains this."
                                    },
                                    "lang": {
                                        "type": "string",
                                        "enum": [
                                            "en",
                                            "nl"
                                        ],
                                        "default": "en",
                                        "description": "Language of text: en or nl. Defaults to en."
                                    },
                                    "limit": {
                                        "type": "integer",
                                        "minimum": 1,
                                        "maximum": 100,
                                        "default": 50,
                                        "description": "Rows per page, 1-100. Defaults to 50."
                                    },
                                    "cursor": {
                                        "type": "string",
                                        "description": "meta.next_cursor of the previous call, for the next page."
                                    }
                                },
                                "required": [
                                    "site_id"
                                ],
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "description": "The id of the event.",
                                                        "type": "string"
                                                    },
                                                    "at": {
                                                        "description": "When it happened, ISO 8601 UTC. For seo: when the scan saw it.",
                                                        "type": "string"
                                                    },
                                                    "kind": {
                                                        "description": "uptime (site down or our check blocked), sitecheck (SSL certificate invalid or expiring, http not redirecting to https), seo (a change or problem the SEO scan found on a page) or cwv (a Core Web Vital of the site got a worse rating than the week before).",
                                                        "type": "string"
                                                    },
                                                    "type": {
                                                        "description": "What happened: uptime_down, uptime_blocked, ssl_invalid, ssl_expiry, https_redirect, cwv_worse, or seo for a change from the SEO scan.",
                                                        "type": "string"
                                                    },
                                                    "rule": {
                                                        "description": "For seo: the scan rule or change (for example indexable, title_change, status_change); null for the other kinds.",
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "label": {
                                                        "description": "down (outage), problem, worse, fixed or changed.",
                                                        "type": "string"
                                                    },
                                                    "text": {
                                                        "description": "The event in one sentence, in lang.",
                                                        "type": "string"
                                                    },
                                                    "url": {
                                                        "description": "For seo: the page; null for the other kinds (they are about the whole site).",
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "open": {
                                                        "description": "Whether it is still going on (an outage that has not ended, a certificate that is still invalid). Always false for seo.",
                                                        "type": "boolean"
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "at",
                                                    "kind",
                                                    "type",
                                                    "rule",
                                                    "label",
                                                    "text",
                                                    "url",
                                                    "open"
                                                ]
                                            }
                                        },
                                        "meta": {
                                            "type": "object",
                                            "description": "site_id; next_cursor and total for a list; period {from, to, compare_from, compare_to} where the endpoint covers a period."
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "400": {
                        "$ref": "#/components/responses/Error"
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "404": {
                        "$ref": "#/components/responses/Error"
                    },
                    "409": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    },
                    "502": {
                        "$ref": "#/components/responses/Error"
                    }
                }
            }
        },
        "/rest/v1/alerts.summary": {
            "post": {
                "operationId": "alerts_summary",
                "tags": [
                    "alerts"
                ],
                "summary": "Returns how many events the site had per kind in the last 90 days (the rows of alerts.feed) and what is still going on now: an outage, a blocked check, an SSL or https problem, at most 5, newest first.",
                "description": "Returns how many events the site had per kind in the last 90 days (the rows of alerts.feed) and what is still going on now: an outage, a blocked check, an SSL or https problem, at most 5, newest first.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "site_id": {
                                        "type": "string",
                                        "description": "The site: its id from list_sites, or the id in the app’s address."
                                    },
                                    "lang": {
                                        "type": "string",
                                        "enum": [
                                            "en",
                                            "nl"
                                        ],
                                        "default": "en",
                                        "description": "Language of text: en or nl. Defaults to en."
                                    }
                                },
                                "required": [
                                    "site_id"
                                ],
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "days": {
                                                    "description": "The period counted, in days (90).",
                                                    "type": "integer"
                                                },
                                                "total": {
                                                    "description": "Events of all kinds together.",
                                                    "type": "integer"
                                                },
                                                "by_kind": {
                                                    "description": "Events per kind.",
                                                    "type": "object",
                                                    "properties": {
                                                        "uptime": {
                                                            "description": "Outages and blocked checks.",
                                                            "type": "integer"
                                                        },
                                                        "sitecheck": {
                                                            "description": "SSL and https problems.",
                                                            "type": "integer"
                                                        },
                                                        "seo": {
                                                            "description": "Changes the SEO scan found.",
                                                            "type": "integer"
                                                        },
                                                        "cwv": {
                                                            "description": "Core Web Vitals that got worse.",
                                                            "type": "integer"
                                                        }
                                                    },
                                                    "required": [
                                                        "uptime",
                                                        "sitecheck",
                                                        "seo",
                                                        "cwv"
                                                    ]
                                                },
                                                "open": {
                                                    "description": "What is still going on, newest first; empty when nothing is.",
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "kind": {
                                                                "description": "uptime or sitecheck (a Core Web Vitals change is an event, never open).",
                                                                "type": "string"
                                                            },
                                                            "type": {
                                                                "description": "uptime_down, uptime_blocked, ssl_invalid, ssl_expiry or https_redirect.",
                                                                "type": "string"
                                                            },
                                                            "text": {
                                                                "description": "In one sentence, in lang.",
                                                                "type": "string"
                                                            },
                                                            "since": {
                                                                "description": "When it started, ISO 8601 UTC.",
                                                                "type": "string"
                                                            }
                                                        },
                                                        "required": [
                                                            "kind",
                                                            "type",
                                                            "text",
                                                            "since"
                                                        ]
                                                    }
                                                }
                                            },
                                            "required": [
                                                "days",
                                                "total",
                                                "by_kind",
                                                "open"
                                            ]
                                        },
                                        "meta": {
                                            "type": "object",
                                            "description": "site_id; next_cursor and total for a list; period {from, to, compare_from, compare_to} where the endpoint covers a period."
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "400": {
                        "$ref": "#/components/responses/Error"
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "404": {
                        "$ref": "#/components/responses/Error"
                    },
                    "409": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    },
                    "502": {
                        "$ref": "#/components/responses/Error"
                    }
                }
            }
        },
        "/rest/v1/analytics.summary": {
            "post": {
                "operationId": "analytics_summary",
                "tags": [
                    "analytics"
                ],
                "summary": "Returns the Google Analytics 4 totals of one site for the period against the previous period: sessions, engaged sessions, engagement rate, users, new users, page views, views per session, average session duration, conversions (key events) and revenue, each as value, previous, change and change in percent; plus per day the sessions, engaged sessions, users and conversions of both periods.",
                "description": "Returns the Google Analytics 4 totals of one site for the period against the previous period: sessions, engaged sessions, engagement rate, users, new users, page views, views per session, average session duration, conversions (key events) and revenue, each as value, previous, change and change in percent; plus per day the sessions, engaged sessions, users and conversions of both periods. The period runs up to yesterday at the latest. The filters narrow everything down (all at once); meta.period gives the period and the previous period. Fails with 409 not_connected when Google Analytics 4 is not connected for the site.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "site_id": {
                                        "type": "string",
                                        "description": "The site: its id from list_sites, or the id in the app’s address."
                                    },
                                    "from": {
                                        "type": "string",
                                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                                        "description": "First day of the period, YYYY-MM-DD; give it together with to."
                                    },
                                    "to": {
                                        "type": "string",
                                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                                        "description": "Last day of the period, YYYY-MM-DD (yesterday at the latest); give it together with from. At most 366 days."
                                    },
                                    "days": {
                                        "type": "integer",
                                        "minimum": 1,
                                        "maximum": 366,
                                        "default": 28,
                                        "description": "Without from and to: the last this many days up to yesterday. Defaults to 28."
                                    },
                                    "compare": {
                                        "type": "string",
                                        "enum": [
                                            "previous_period",
                                            "previous_year"
                                        ],
                                        "default": "previous_period",
                                        "description": "What the previous figures are: previous_period (the same number of days just before) or previous_year (the same days 52 weeks earlier, same weekdays; for periods up to 364 days). Defaults to previous_period."
                                    },
                                    "channel": {
                                        "type": "string",
                                        "maxLength": 300,
                                        "description": "Only sessions from this channel, as Google Analytics names it (Organic Search, Direct, Referral, Organic Social, Paid Search, Email, AI Assistant, …)."
                                    },
                                    "source_medium": {
                                        "type": "string",
                                        "maxLength": 300,
                                        "description": "Only sessions from this source / medium, exactly as in analytics.sources (google / organic)."
                                    },
                                    "landing_page": {
                                        "type": "string",
                                        "maxLength": 300,
                                        "description": "Only sessions that started on this page: its path, exactly as in analytics.landing_pages (/blog/post)."
                                    },
                                    "path_prefix": {
                                        "type": "string",
                                        "maxLength": 300,
                                        "description": "Only sessions that started on a page whose path begins with this (/blog/)."
                                    },
                                    "country": {
                                        "type": "string",
                                        "maxLength": 300,
                                        "description": "Only sessions from this country, in English as in analytics.audience (Netherlands)."
                                    },
                                    "device": {
                                        "type": "string",
                                        "enum": [
                                            "desktop",
                                            "mobile",
                                            "tablet",
                                            "smart tv"
                                        ],
                                        "description": "Only sessions on this kind of device."
                                    }
                                },
                                "required": [
                                    "site_id"
                                ],
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "compare": {
                                                    "description": "previous_period or previous_year: what the previous figures are.",
                                                    "type": "string"
                                                },
                                                "sessions": {
                                                    "description": "Sessions in the period, against the previous period.",
                                                    "type": "object",
                                                    "properties": {
                                                        "value": {
                                                            "description": "This period; null when it does not apply (no sessions).",
                                                            "type": [
                                                                "number",
                                                                "null"
                                                            ]
                                                        },
                                                        "previous": {
                                                            "description": "The previous period; null when it does not apply.",
                                                            "type": [
                                                                "number",
                                                                "null"
                                                            ]
                                                        },
                                                        "change": {
                                                            "description": "value minus previous.",
                                                            "type": [
                                                                "number",
                                                                "null"
                                                            ]
                                                        },
                                                        "change_pct": {
                                                            "description": "The change in percent of previous; null when previous is 0 or null.",
                                                            "type": [
                                                                "number",
                                                                "null"
                                                            ]
                                                        }
                                                    },
                                                    "required": [
                                                        "value",
                                                        "previous",
                                                        "change",
                                                        "change_pct"
                                                    ]
                                                },
                                                "engaged_sessions": {
                                                    "description": "Engaged sessions in the period, against the previous period.",
                                                    "type": "object",
                                                    "properties": {
                                                        "value": {
                                                            "description": "This period; null when it does not apply (no sessions).",
                                                            "type": [
                                                                "number",
                                                                "null"
                                                            ]
                                                        },
                                                        "previous": {
                                                            "description": "The previous period; null when it does not apply.",
                                                            "type": [
                                                                "number",
                                                                "null"
                                                            ]
                                                        },
                                                        "change": {
                                                            "description": "value minus previous.",
                                                            "type": [
                                                                "number",
                                                                "null"
                                                            ]
                                                        },
                                                        "change_pct": {
                                                            "description": "The change in percent of previous; null when previous is 0 or null.",
                                                            "type": [
                                                                "number",
                                                                "null"
                                                            ]
                                                        }
                                                    },
                                                    "required": [
                                                        "value",
                                                        "previous",
                                                        "change",
                                                        "change_pct"
                                                    ]
                                                },
                                                "engagement_rate_pct": {
                                                    "description": "Engagement rate, 0-100, in the period, against the previous period.",
                                                    "type": "object",
                                                    "properties": {
                                                        "value": {
                                                            "description": "This period; null when it does not apply (no sessions).",
                                                            "type": [
                                                                "number",
                                                                "null"
                                                            ]
                                                        },
                                                        "previous": {
                                                            "description": "The previous period; null when it does not apply.",
                                                            "type": [
                                                                "number",
                                                                "null"
                                                            ]
                                                        },
                                                        "change": {
                                                            "description": "value minus previous, in percentage points.",
                                                            "type": [
                                                                "number",
                                                                "null"
                                                            ]
                                                        },
                                                        "change_pct": {
                                                            "description": "The change in percent of previous; null when previous is 0 or null.",
                                                            "type": [
                                                                "number",
                                                                "null"
                                                            ]
                                                        }
                                                    },
                                                    "required": [
                                                        "value",
                                                        "previous",
                                                        "change",
                                                        "change_pct"
                                                    ]
                                                },
                                                "users": {
                                                    "description": "Users in the period, against the previous period.",
                                                    "type": "object",
                                                    "properties": {
                                                        "value": {
                                                            "description": "This period; null when it does not apply (no sessions).",
                                                            "type": [
                                                                "number",
                                                                "null"
                                                            ]
                                                        },
                                                        "previous": {
                                                            "description": "The previous period; null when it does not apply.",
                                                            "type": [
                                                                "number",
                                                                "null"
                                                            ]
                                                        },
                                                        "change": {
                                                            "description": "value minus previous.",
                                                            "type": [
                                                                "number",
                                                                "null"
                                                            ]
                                                        },
                                                        "change_pct": {
                                                            "description": "The change in percent of previous; null when previous is 0 or null.",
                                                            "type": [
                                                                "number",
                                                                "null"
                                                            ]
                                                        }
                                                    },
                                                    "required": [
                                                        "value",
                                                        "previous",
                                                        "change",
                                                        "change_pct"
                                                    ]
                                                },
                                                "new_users": {
                                                    "description": "New users in the period, against the previous period.",
                                                    "type": "object",
                                                    "properties": {
                                                        "value": {
                                                            "description": "This period; null when it does not apply (no sessions).",
                                                            "type": [
                                                                "number",
                                                                "null"
                                                            ]
                                                        },
                                                        "previous": {
                                                            "description": "The previous period; null when it does not apply.",
                                                            "type": [
                                                                "number",
                                                                "null"
                                                            ]
                                                        },
                                                        "change": {
                                                            "description": "value minus previous.",
                                                            "type": [
                                                                "number",
                                                                "null"
                                                            ]
                                                        },
                                                        "change_pct": {
                                                            "description": "The change in percent of previous; null when previous is 0 or null.",
                                                            "type": [
                                                                "number",
                                                                "null"
                                                            ]
                                                        }
                                                    },
                                                    "required": [
                                                        "value",
                                                        "previous",
                                                        "change",
                                                        "change_pct"
                                                    ]
                                                },
                                                "views": {
                                                    "description": "Page views in the period, against the previous period.",
                                                    "type": "object",
                                                    "properties": {
                                                        "value": {
                                                            "description": "This period; null when it does not apply (no sessions).",
                                                            "type": [
                                                                "number",
                                                                "null"
                                                            ]
                                                        },
                                                        "previous": {
                                                            "description": "The previous period; null when it does not apply.",
                                                            "type": [
                                                                "number",
                                                                "null"
                                                            ]
                                                        },
                                                        "change": {
                                                            "description": "value minus previous.",
                                                            "type": [
                                                                "number",
                                                                "null"
                                                            ]
                                                        },
                                                        "change_pct": {
                                                            "description": "The change in percent of previous; null when previous is 0 or null.",
                                                            "type": [
                                                                "number",
                                                                "null"
                                                            ]
                                                        }
                                                    },
                                                    "required": [
                                                        "value",
                                                        "previous",
                                                        "change",
                                                        "change_pct"
                                                    ]
                                                },
                                                "views_per_session": {
                                                    "description": "Page views per session in the period, against the previous period.",
                                                    "type": "object",
                                                    "properties": {
                                                        "value": {
                                                            "description": "This period; null when it does not apply (no sessions).",
                                                            "type": [
                                                                "number",
                                                                "null"
                                                            ]
                                                        },
                                                        "previous": {
                                                            "description": "The previous period; null when it does not apply.",
                                                            "type": [
                                                                "number",
                                                                "null"
                                                            ]
                                                        },
                                                        "change": {
                                                            "description": "value minus previous.",
                                                            "type": [
                                                                "number",
                                                                "null"
                                                            ]
                                                        },
                                                        "change_pct": {
                                                            "description": "The change in percent of previous; null when previous is 0 or null.",
                                                            "type": [
                                                                "number",
                                                                "null"
                                                            ]
                                                        }
                                                    },
                                                    "required": [
                                                        "value",
                                                        "previous",
                                                        "change",
                                                        "change_pct"
                                                    ]
                                                },
                                                "avg_session_duration_seconds": {
                                                    "description": "Average session duration in seconds in the period, against the previous period.",
                                                    "type": "object",
                                                    "properties": {
                                                        "value": {
                                                            "description": "This period; null when it does not apply (no sessions).",
                                                            "type": [
                                                                "number",
                                                                "null"
                                                            ]
                                                        },
                                                        "previous": {
                                                            "description": "The previous period; null when it does not apply.",
                                                            "type": [
                                                                "number",
                                                                "null"
                                                            ]
                                                        },
                                                        "change": {
                                                            "description": "value minus previous.",
                                                            "type": [
                                                                "number",
                                                                "null"
                                                            ]
                                                        },
                                                        "change_pct": {
                                                            "description": "The change in percent of previous; null when previous is 0 or null.",
                                                            "type": [
                                                                "number",
                                                                "null"
                                                            ]
                                                        }
                                                    },
                                                    "required": [
                                                        "value",
                                                        "previous",
                                                        "change",
                                                        "change_pct"
                                                    ]
                                                },
                                                "conversions": {
                                                    "description": "Conversions (key events) in the period, against the previous period.",
                                                    "type": "object",
                                                    "properties": {
                                                        "value": {
                                                            "description": "This period; null when it does not apply (no sessions).",
                                                            "type": [
                                                                "number",
                                                                "null"
                                                            ]
                                                        },
                                                        "previous": {
                                                            "description": "The previous period; null when it does not apply.",
                                                            "type": [
                                                                "number",
                                                                "null"
                                                            ]
                                                        },
                                                        "change": {
                                                            "description": "value minus previous.",
                                                            "type": [
                                                                "number",
                                                                "null"
                                                            ]
                                                        },
                                                        "change_pct": {
                                                            "description": "The change in percent of previous; null when previous is 0 or null.",
                                                            "type": [
                                                                "number",
                                                                "null"
                                                            ]
                                                        }
                                                    },
                                                    "required": [
                                                        "value",
                                                        "previous",
                                                        "change",
                                                        "change_pct"
                                                    ]
                                                },
                                                "revenue_eur": {
                                                    "description": "Revenue in the period, against the previous period.",
                                                    "type": "object",
                                                    "properties": {
                                                        "value": {
                                                            "description": "This period; null when it does not apply (no sessions).",
                                                            "type": [
                                                                "number",
                                                                "null"
                                                            ]
                                                        },
                                                        "previous": {
                                                            "description": "The previous period; null when it does not apply.",
                                                            "type": [
                                                                "number",
                                                                "null"
                                                            ]
                                                        },
                                                        "change": {
                                                            "description": "value minus previous.",
                                                            "type": [
                                                                "number",
                                                                "null"
                                                            ]
                                                        },
                                                        "change_pct": {
                                                            "description": "The change in percent of previous; null when previous is 0 or null.",
                                                            "type": [
                                                                "number",
                                                                "null"
                                                            ]
                                                        }
                                                    },
                                                    "required": [
                                                        "value",
                                                        "previous",
                                                        "change",
                                                        "change_pct"
                                                    ]
                                                },
                                                "daily": {
                                                    "description": "Per day of the period, oldest first, next to the matching day of the previous period.",
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "date": {
                                                                "description": "The day, YYYY-MM-DD.",
                                                                "type": "string"
                                                            },
                                                            "sessions": {
                                                                "description": "Sessions.",
                                                                "type": "integer"
                                                            },
                                                            "engaged_sessions": {
                                                                "description": "Engaged sessions.",
                                                                "type": "integer"
                                                            },
                                                            "users": {
                                                                "description": "Users.",
                                                                "type": "integer"
                                                            },
                                                            "conversions": {
                                                                "description": "Conversions (key events).",
                                                                "type": "integer"
                                                            },
                                                            "previous_date": {
                                                                "description": "The matching day of the previous period, YYYY-MM-DD.",
                                                                "type": "string"
                                                            },
                                                            "previous_sessions": {
                                                                "description": "Sessions on previous_date.",
                                                                "type": "integer"
                                                            },
                                                            "previous_engaged_sessions": {
                                                                "description": "Engaged sessions on previous_date.",
                                                                "type": "integer"
                                                            },
                                                            "previous_users": {
                                                                "description": "Users on previous_date.",
                                                                "type": "integer"
                                                            },
                                                            "previous_conversions": {
                                                                "description": "Conversions on previous_date.",
                                                                "type": "integer"
                                                            }
                                                        },
                                                        "required": [
                                                            "date",
                                                            "sessions",
                                                            "engaged_sessions",
                                                            "users",
                                                            "conversions",
                                                            "previous_date",
                                                            "previous_sessions",
                                                            "previous_engaged_sessions",
                                                            "previous_users",
                                                            "previous_conversions"
                                                        ]
                                                    }
                                                }
                                            },
                                            "required": [
                                                "compare",
                                                "sessions",
                                                "engaged_sessions",
                                                "engagement_rate_pct",
                                                "users",
                                                "new_users",
                                                "views",
                                                "views_per_session",
                                                "avg_session_duration_seconds",
                                                "conversions",
                                                "revenue_eur",
                                                "daily"
                                            ]
                                        },
                                        "meta": {
                                            "type": "object",
                                            "description": "site_id; next_cursor and total for a list; period {from, to, compare_from, compare_to} where the endpoint covers a period."
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "400": {
                        "$ref": "#/components/responses/Error"
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "404": {
                        "$ref": "#/components/responses/Error"
                    },
                    "409": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    },
                    "502": {
                        "$ref": "#/components/responses/Error"
                    }
                }
            }
        },
        "/rest/v1/analytics.channels": {
            "post": {
                "operationId": "analytics_channels",
                "tags": [
                    "analytics"
                ],
                "summary": "Returns the sessions of one site per channel (Organic Search, Direct, Referral, AI Assistant, …) in the period, most sessions first: all metrics, the share of all sessions and the same figures in the previous period.",
                "description": "Returns the sessions of one site per channel (Organic Search, Direct, Referral, AI Assistant, …) in the period, most sessions first: all metrics, the share of all sessions and the same figures in the previous period. Always lists every channel; the channel filter does not apply here. The filters narrow everything down (all at once); meta.period gives the period and the previous period. Fails with 409 not_connected when Google Analytics 4 is not connected for the site.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "site_id": {
                                        "type": "string",
                                        "description": "The site: its id from list_sites, or the id in the app’s address."
                                    },
                                    "from": {
                                        "type": "string",
                                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                                        "description": "First day of the period, YYYY-MM-DD; give it together with to."
                                    },
                                    "to": {
                                        "type": "string",
                                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                                        "description": "Last day of the period, YYYY-MM-DD (yesterday at the latest); give it together with from. At most 366 days."
                                    },
                                    "days": {
                                        "type": "integer",
                                        "minimum": 1,
                                        "maximum": 366,
                                        "default": 28,
                                        "description": "Without from and to: the last this many days up to yesterday. Defaults to 28."
                                    },
                                    "compare": {
                                        "type": "string",
                                        "enum": [
                                            "previous_period",
                                            "previous_year"
                                        ],
                                        "default": "previous_period",
                                        "description": "What the previous figures are: previous_period (the same number of days just before) or previous_year (the same days 52 weeks earlier, same weekdays; for periods up to 364 days). Defaults to previous_period."
                                    },
                                    "channel": {
                                        "type": "string",
                                        "maxLength": 300,
                                        "description": "Only sessions from this channel, as Google Analytics names it (Organic Search, Direct, Referral, Organic Social, Paid Search, Email, AI Assistant, …)."
                                    },
                                    "source_medium": {
                                        "type": "string",
                                        "maxLength": 300,
                                        "description": "Only sessions from this source / medium, exactly as in analytics.sources (google / organic)."
                                    },
                                    "landing_page": {
                                        "type": "string",
                                        "maxLength": 300,
                                        "description": "Only sessions that started on this page: its path, exactly as in analytics.landing_pages (/blog/post)."
                                    },
                                    "path_prefix": {
                                        "type": "string",
                                        "maxLength": 300,
                                        "description": "Only sessions that started on a page whose path begins with this (/blog/)."
                                    },
                                    "country": {
                                        "type": "string",
                                        "maxLength": 300,
                                        "description": "Only sessions from this country, in English as in analytics.audience (Netherlands)."
                                    },
                                    "device": {
                                        "type": "string",
                                        "enum": [
                                            "desktop",
                                            "mobile",
                                            "tablet",
                                            "smart tv"
                                        ],
                                        "description": "Only sessions on this kind of device."
                                    },
                                    "limit": {
                                        "type": "integer",
                                        "minimum": 1,
                                        "maximum": 500,
                                        "default": 100,
                                        "description": "Items per call."
                                    },
                                    "cursor": {
                                        "type": "string",
                                        "description": "meta.next_cursor of the previous call, for the next page."
                                    }
                                },
                                "required": [
                                    "site_id"
                                ],
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "channel": {
                                                        "description": "The channel, as Google Analytics names it.",
                                                        "type": "string"
                                                    },
                                                    "sessions": {
                                                        "description": "Sessions.",
                                                        "type": "integer"
                                                    },
                                                    "engaged_sessions": {
                                                        "description": "Engaged sessions: longer than 10 seconds, two or more page views, or a conversion.",
                                                        "type": "integer"
                                                    },
                                                    "engagement_rate_pct": {
                                                        "description": "Engaged sessions as a share of sessions, 0-100; null without sessions.",
                                                        "type": [
                                                            "number",
                                                            "null"
                                                        ]
                                                    },
                                                    "users": {
                                                        "description": "Users (active users, as Google Analytics counts them).",
                                                        "type": "integer"
                                                    },
                                                    "new_users": {
                                                        "description": "Users who came for the first time.",
                                                        "type": "integer"
                                                    },
                                                    "views": {
                                                        "description": "Page views.",
                                                        "type": "integer"
                                                    },
                                                    "views_per_session": {
                                                        "description": "Page views per session; null without sessions.",
                                                        "type": [
                                                            "number",
                                                            "null"
                                                        ]
                                                    },
                                                    "avg_session_duration_seconds": {
                                                        "description": "Average session duration in seconds; null without sessions.",
                                                        "type": [
                                                            "number",
                                                            "null"
                                                        ]
                                                    },
                                                    "conversions": {
                                                        "description": "Key events (conversions as set up in Google Analytics).",
                                                        "type": "integer"
                                                    },
                                                    "revenue_eur": {
                                                        "description": "Revenue, in the currency of the Google Analytics property (usually euro).",
                                                        "type": "number"
                                                    },
                                                    "share_pct": {
                                                        "description": "Share of the sessions of the whole list, 0-100.",
                                                        "type": [
                                                            "number",
                                                            "null"
                                                        ]
                                                    },
                                                    "previous": {
                                                        "description": "The same figures in the previous period; null when it did not occur then.",
                                                        "type": [
                                                            "object",
                                                            "null"
                                                        ],
                                                        "properties": {
                                                            "sessions": {
                                                                "description": "Sessions.",
                                                                "type": "integer"
                                                            },
                                                            "engaged_sessions": {
                                                                "description": "Engaged sessions: longer than 10 seconds, two or more page views, or a conversion.",
                                                                "type": "integer"
                                                            },
                                                            "engagement_rate_pct": {
                                                                "description": "Engaged sessions as a share of sessions, 0-100; null without sessions.",
                                                                "type": [
                                                                    "number",
                                                                    "null"
                                                                ]
                                                            },
                                                            "users": {
                                                                "description": "Users (active users, as Google Analytics counts them).",
                                                                "type": "integer"
                                                            },
                                                            "new_users": {
                                                                "description": "Users who came for the first time.",
                                                                "type": "integer"
                                                            },
                                                            "views": {
                                                                "description": "Page views.",
                                                                "type": "integer"
                                                            },
                                                            "views_per_session": {
                                                                "description": "Page views per session; null without sessions.",
                                                                "type": [
                                                                    "number",
                                                                    "null"
                                                                ]
                                                            },
                                                            "avg_session_duration_seconds": {
                                                                "description": "Average session duration in seconds; null without sessions.",
                                                                "type": [
                                                                    "number",
                                                                    "null"
                                                                ]
                                                            },
                                                            "conversions": {
                                                                "description": "Key events (conversions as set up in Google Analytics).",
                                                                "type": "integer"
                                                            },
                                                            "revenue_eur": {
                                                                "description": "Revenue, in the currency of the Google Analytics property (usually euro).",
                                                                "type": "number"
                                                            }
                                                        },
                                                        "required": [
                                                            "sessions",
                                                            "engaged_sessions",
                                                            "engagement_rate_pct",
                                                            "users",
                                                            "new_users",
                                                            "views",
                                                            "views_per_session",
                                                            "avg_session_duration_seconds",
                                                            "conversions",
                                                            "revenue_eur"
                                                        ]
                                                    }
                                                },
                                                "required": [
                                                    "channel",
                                                    "sessions",
                                                    "engaged_sessions",
                                                    "engagement_rate_pct",
                                                    "users",
                                                    "new_users",
                                                    "views",
                                                    "views_per_session",
                                                    "avg_session_duration_seconds",
                                                    "conversions",
                                                    "revenue_eur",
                                                    "share_pct",
                                                    "previous"
                                                ]
                                            }
                                        },
                                        "meta": {
                                            "type": "object",
                                            "description": "site_id; next_cursor and total for a list; period {from, to, compare_from, compare_to} where the endpoint covers a period."
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "400": {
                        "$ref": "#/components/responses/Error"
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "404": {
                        "$ref": "#/components/responses/Error"
                    },
                    "409": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    },
                    "502": {
                        "$ref": "#/components/responses/Error"
                    }
                }
            }
        },
        "/rest/v1/analytics.sources": {
            "post": {
                "operationId": "analytics_sources",
                "tags": [
                    "analytics"
                ],
                "summary": "Returns the sessions of one site per source / medium (google / organic, chatgpt.com / referral, (direct) / (none)) in the period, most sessions first: all metrics, the share of the sessions in the list and the same figures in the previous period.",
                "description": "Returns the sessions of one site per source / medium (google / organic, chatgpt.com / referral, (direct) / (none)) in the period, most sessions first: all metrics, the share of the sessions in the list and the same figures in the previous period. Use channel to see the sources of one channel. The filters narrow everything down (all at once); meta.period gives the period and the previous period. Fails with 409 not_connected when Google Analytics 4 is not connected for the site.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "site_id": {
                                        "type": "string",
                                        "description": "The site: its id from list_sites, or the id in the app’s address."
                                    },
                                    "from": {
                                        "type": "string",
                                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                                        "description": "First day of the period, YYYY-MM-DD; give it together with to."
                                    },
                                    "to": {
                                        "type": "string",
                                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                                        "description": "Last day of the period, YYYY-MM-DD (yesterday at the latest); give it together with from. At most 366 days."
                                    },
                                    "days": {
                                        "type": "integer",
                                        "minimum": 1,
                                        "maximum": 366,
                                        "default": 28,
                                        "description": "Without from and to: the last this many days up to yesterday. Defaults to 28."
                                    },
                                    "compare": {
                                        "type": "string",
                                        "enum": [
                                            "previous_period",
                                            "previous_year"
                                        ],
                                        "default": "previous_period",
                                        "description": "What the previous figures are: previous_period (the same number of days just before) or previous_year (the same days 52 weeks earlier, same weekdays; for periods up to 364 days). Defaults to previous_period."
                                    },
                                    "channel": {
                                        "type": "string",
                                        "maxLength": 300,
                                        "description": "Only sessions from this channel, as Google Analytics names it (Organic Search, Direct, Referral, Organic Social, Paid Search, Email, AI Assistant, …)."
                                    },
                                    "source_medium": {
                                        "type": "string",
                                        "maxLength": 300,
                                        "description": "Only sessions from this source / medium, exactly as in analytics.sources (google / organic)."
                                    },
                                    "landing_page": {
                                        "type": "string",
                                        "maxLength": 300,
                                        "description": "Only sessions that started on this page: its path, exactly as in analytics.landing_pages (/blog/post)."
                                    },
                                    "path_prefix": {
                                        "type": "string",
                                        "maxLength": 300,
                                        "description": "Only sessions that started on a page whose path begins with this (/blog/)."
                                    },
                                    "country": {
                                        "type": "string",
                                        "maxLength": 300,
                                        "description": "Only sessions from this country, in English as in analytics.audience (Netherlands)."
                                    },
                                    "device": {
                                        "type": "string",
                                        "enum": [
                                            "desktop",
                                            "mobile",
                                            "tablet",
                                            "smart tv"
                                        ],
                                        "description": "Only sessions on this kind of device."
                                    },
                                    "limit": {
                                        "type": "integer",
                                        "minimum": 1,
                                        "maximum": 500,
                                        "default": 100,
                                        "description": "Items per call."
                                    },
                                    "cursor": {
                                        "type": "string",
                                        "description": "meta.next_cursor of the previous call, for the next page."
                                    }
                                },
                                "required": [
                                    "site_id"
                                ],
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "source_medium": {
                                                        "description": "Source / medium, as Google Analytics gives it; use it as the source_medium filter.",
                                                        "type": "string"
                                                    },
                                                    "source": {
                                                        "description": "The source (google, chatgpt.com, (direct)).",
                                                        "type": "string"
                                                    },
                                                    "medium": {
                                                        "description": "The medium (organic, referral, cpc, (none)); null when Google Analytics gives none.",
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "sessions": {
                                                        "description": "Sessions.",
                                                        "type": "integer"
                                                    },
                                                    "engaged_sessions": {
                                                        "description": "Engaged sessions: longer than 10 seconds, two or more page views, or a conversion.",
                                                        "type": "integer"
                                                    },
                                                    "engagement_rate_pct": {
                                                        "description": "Engaged sessions as a share of sessions, 0-100; null without sessions.",
                                                        "type": [
                                                            "number",
                                                            "null"
                                                        ]
                                                    },
                                                    "users": {
                                                        "description": "Users (active users, as Google Analytics counts them).",
                                                        "type": "integer"
                                                    },
                                                    "new_users": {
                                                        "description": "Users who came for the first time.",
                                                        "type": "integer"
                                                    },
                                                    "views": {
                                                        "description": "Page views.",
                                                        "type": "integer"
                                                    },
                                                    "views_per_session": {
                                                        "description": "Page views per session; null without sessions.",
                                                        "type": [
                                                            "number",
                                                            "null"
                                                        ]
                                                    },
                                                    "avg_session_duration_seconds": {
                                                        "description": "Average session duration in seconds; null without sessions.",
                                                        "type": [
                                                            "number",
                                                            "null"
                                                        ]
                                                    },
                                                    "conversions": {
                                                        "description": "Key events (conversions as set up in Google Analytics).",
                                                        "type": "integer"
                                                    },
                                                    "revenue_eur": {
                                                        "description": "Revenue, in the currency of the Google Analytics property (usually euro).",
                                                        "type": "number"
                                                    },
                                                    "share_pct": {
                                                        "description": "Share of the sessions of the whole list, 0-100.",
                                                        "type": [
                                                            "number",
                                                            "null"
                                                        ]
                                                    },
                                                    "previous": {
                                                        "description": "The same figures in the previous period; null when it did not occur then.",
                                                        "type": [
                                                            "object",
                                                            "null"
                                                        ],
                                                        "properties": {
                                                            "sessions": {
                                                                "description": "Sessions.",
                                                                "type": "integer"
                                                            },
                                                            "engaged_sessions": {
                                                                "description": "Engaged sessions: longer than 10 seconds, two or more page views, or a conversion.",
                                                                "type": "integer"
                                                            },
                                                            "engagement_rate_pct": {
                                                                "description": "Engaged sessions as a share of sessions, 0-100; null without sessions.",
                                                                "type": [
                                                                    "number",
                                                                    "null"
                                                                ]
                                                            },
                                                            "users": {
                                                                "description": "Users (active users, as Google Analytics counts them).",
                                                                "type": "integer"
                                                            },
                                                            "new_users": {
                                                                "description": "Users who came for the first time.",
                                                                "type": "integer"
                                                            },
                                                            "views": {
                                                                "description": "Page views.",
                                                                "type": "integer"
                                                            },
                                                            "views_per_session": {
                                                                "description": "Page views per session; null without sessions.",
                                                                "type": [
                                                                    "number",
                                                                    "null"
                                                                ]
                                                            },
                                                            "avg_session_duration_seconds": {
                                                                "description": "Average session duration in seconds; null without sessions.",
                                                                "type": [
                                                                    "number",
                                                                    "null"
                                                                ]
                                                            },
                                                            "conversions": {
                                                                "description": "Key events (conversions as set up in Google Analytics).",
                                                                "type": "integer"
                                                            },
                                                            "revenue_eur": {
                                                                "description": "Revenue, in the currency of the Google Analytics property (usually euro).",
                                                                "type": "number"
                                                            }
                                                        },
                                                        "required": [
                                                            "sessions",
                                                            "engaged_sessions",
                                                            "engagement_rate_pct",
                                                            "users",
                                                            "new_users",
                                                            "views",
                                                            "views_per_session",
                                                            "avg_session_duration_seconds",
                                                            "conversions",
                                                            "revenue_eur"
                                                        ]
                                                    }
                                                },
                                                "required": [
                                                    "source_medium",
                                                    "source",
                                                    "medium",
                                                    "sessions",
                                                    "engaged_sessions",
                                                    "engagement_rate_pct",
                                                    "users",
                                                    "new_users",
                                                    "views",
                                                    "views_per_session",
                                                    "avg_session_duration_seconds",
                                                    "conversions",
                                                    "revenue_eur",
                                                    "share_pct",
                                                    "previous"
                                                ]
                                            }
                                        },
                                        "meta": {
                                            "type": "object",
                                            "description": "site_id; next_cursor and total for a list; period {from, to, compare_from, compare_to} where the endpoint covers a period."
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "400": {
                        "$ref": "#/components/responses/Error"
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "404": {
                        "$ref": "#/components/responses/Error"
                    },
                    "409": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    },
                    "502": {
                        "$ref": "#/components/responses/Error"
                    }
                }
            }
        },
        "/rest/v1/analytics.landing_pages": {
            "post": {
                "operationId": "analytics_landing_pages",
                "tags": [
                    "analytics"
                ],
                "summary": "Returns the sessions of one site per landing page (the first page of a session) in the period, most sessions first: all metrics, the share of the sessions in the list and the same figures in the previous period.",
                "description": "Returns the sessions of one site per landing page (the first page of a session) in the period, most sessions first: all metrics, the share of the sessions in the list and the same figures in the previous period. Combine with channel or source_medium to see where a channel lands. The filters narrow everything down (all at once); meta.period gives the period and the previous period. Fails with 409 not_connected when Google Analytics 4 is not connected for the site.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "site_id": {
                                        "type": "string",
                                        "description": "The site: its id from list_sites, or the id in the app’s address."
                                    },
                                    "from": {
                                        "type": "string",
                                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                                        "description": "First day of the period, YYYY-MM-DD; give it together with to."
                                    },
                                    "to": {
                                        "type": "string",
                                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                                        "description": "Last day of the period, YYYY-MM-DD (yesterday at the latest); give it together with from. At most 366 days."
                                    },
                                    "days": {
                                        "type": "integer",
                                        "minimum": 1,
                                        "maximum": 366,
                                        "default": 28,
                                        "description": "Without from and to: the last this many days up to yesterday. Defaults to 28."
                                    },
                                    "compare": {
                                        "type": "string",
                                        "enum": [
                                            "previous_period",
                                            "previous_year"
                                        ],
                                        "default": "previous_period",
                                        "description": "What the previous figures are: previous_period (the same number of days just before) or previous_year (the same days 52 weeks earlier, same weekdays; for periods up to 364 days). Defaults to previous_period."
                                    },
                                    "channel": {
                                        "type": "string",
                                        "maxLength": 300,
                                        "description": "Only sessions from this channel, as Google Analytics names it (Organic Search, Direct, Referral, Organic Social, Paid Search, Email, AI Assistant, …)."
                                    },
                                    "source_medium": {
                                        "type": "string",
                                        "maxLength": 300,
                                        "description": "Only sessions from this source / medium, exactly as in analytics.sources (google / organic)."
                                    },
                                    "landing_page": {
                                        "type": "string",
                                        "maxLength": 300,
                                        "description": "Only sessions that started on this page: its path, exactly as in analytics.landing_pages (/blog/post)."
                                    },
                                    "path_prefix": {
                                        "type": "string",
                                        "maxLength": 300,
                                        "description": "Only sessions that started on a page whose path begins with this (/blog/)."
                                    },
                                    "country": {
                                        "type": "string",
                                        "maxLength": 300,
                                        "description": "Only sessions from this country, in English as in analytics.audience (Netherlands)."
                                    },
                                    "device": {
                                        "type": "string",
                                        "enum": [
                                            "desktop",
                                            "mobile",
                                            "tablet",
                                            "smart tv"
                                        ],
                                        "description": "Only sessions on this kind of device."
                                    },
                                    "limit": {
                                        "type": "integer",
                                        "minimum": 1,
                                        "maximum": 500,
                                        "default": 100,
                                        "description": "Items per call."
                                    },
                                    "cursor": {
                                        "type": "string",
                                        "description": "meta.next_cursor of the previous call, for the next page."
                                    }
                                },
                                "required": [
                                    "site_id"
                                ],
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "path": {
                                                        "description": "The path of the landing page, as Google Analytics gives it; (not set) when unknown.",
                                                        "type": "string"
                                                    },
                                                    "url": {
                                                        "description": "The full address of the page; null for (not set).",
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "sessions": {
                                                        "description": "Sessions.",
                                                        "type": "integer"
                                                    },
                                                    "engaged_sessions": {
                                                        "description": "Engaged sessions: longer than 10 seconds, two or more page views, or a conversion.",
                                                        "type": "integer"
                                                    },
                                                    "engagement_rate_pct": {
                                                        "description": "Engaged sessions as a share of sessions, 0-100; null without sessions.",
                                                        "type": [
                                                            "number",
                                                            "null"
                                                        ]
                                                    },
                                                    "users": {
                                                        "description": "Users (active users, as Google Analytics counts them).",
                                                        "type": "integer"
                                                    },
                                                    "new_users": {
                                                        "description": "Users who came for the first time.",
                                                        "type": "integer"
                                                    },
                                                    "views": {
                                                        "description": "Page views.",
                                                        "type": "integer"
                                                    },
                                                    "views_per_session": {
                                                        "description": "Page views per session; null without sessions.",
                                                        "type": [
                                                            "number",
                                                            "null"
                                                        ]
                                                    },
                                                    "avg_session_duration_seconds": {
                                                        "description": "Average session duration in seconds; null without sessions.",
                                                        "type": [
                                                            "number",
                                                            "null"
                                                        ]
                                                    },
                                                    "conversions": {
                                                        "description": "Key events (conversions as set up in Google Analytics).",
                                                        "type": "integer"
                                                    },
                                                    "revenue_eur": {
                                                        "description": "Revenue, in the currency of the Google Analytics property (usually euro).",
                                                        "type": "number"
                                                    },
                                                    "share_pct": {
                                                        "description": "Share of the sessions of the whole list, 0-100.",
                                                        "type": [
                                                            "number",
                                                            "null"
                                                        ]
                                                    },
                                                    "previous": {
                                                        "description": "The same figures in the previous period; null when it did not occur then.",
                                                        "type": [
                                                            "object",
                                                            "null"
                                                        ],
                                                        "properties": {
                                                            "sessions": {
                                                                "description": "Sessions.",
                                                                "type": "integer"
                                                            },
                                                            "engaged_sessions": {
                                                                "description": "Engaged sessions: longer than 10 seconds, two or more page views, or a conversion.",
                                                                "type": "integer"
                                                            },
                                                            "engagement_rate_pct": {
                                                                "description": "Engaged sessions as a share of sessions, 0-100; null without sessions.",
                                                                "type": [
                                                                    "number",
                                                                    "null"
                                                                ]
                                                            },
                                                            "users": {
                                                                "description": "Users (active users, as Google Analytics counts them).",
                                                                "type": "integer"
                                                            },
                                                            "new_users": {
                                                                "description": "Users who came for the first time.",
                                                                "type": "integer"
                                                            },
                                                            "views": {
                                                                "description": "Page views.",
                                                                "type": "integer"
                                                            },
                                                            "views_per_session": {
                                                                "description": "Page views per session; null without sessions.",
                                                                "type": [
                                                                    "number",
                                                                    "null"
                                                                ]
                                                            },
                                                            "avg_session_duration_seconds": {
                                                                "description": "Average session duration in seconds; null without sessions.",
                                                                "type": [
                                                                    "number",
                                                                    "null"
                                                                ]
                                                            },
                                                            "conversions": {
                                                                "description": "Key events (conversions as set up in Google Analytics).",
                                                                "type": "integer"
                                                            },
                                                            "revenue_eur": {
                                                                "description": "Revenue, in the currency of the Google Analytics property (usually euro).",
                                                                "type": "number"
                                                            }
                                                        },
                                                        "required": [
                                                            "sessions",
                                                            "engaged_sessions",
                                                            "engagement_rate_pct",
                                                            "users",
                                                            "new_users",
                                                            "views",
                                                            "views_per_session",
                                                            "avg_session_duration_seconds",
                                                            "conversions",
                                                            "revenue_eur"
                                                        ]
                                                    }
                                                },
                                                "required": [
                                                    "path",
                                                    "url",
                                                    "sessions",
                                                    "engaged_sessions",
                                                    "engagement_rate_pct",
                                                    "users",
                                                    "new_users",
                                                    "views",
                                                    "views_per_session",
                                                    "avg_session_duration_seconds",
                                                    "conversions",
                                                    "revenue_eur",
                                                    "share_pct",
                                                    "previous"
                                                ]
                                            }
                                        },
                                        "meta": {
                                            "type": "object",
                                            "description": "site_id; next_cursor and total for a list; period {from, to, compare_from, compare_to} where the endpoint covers a period."
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "400": {
                        "$ref": "#/components/responses/Error"
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "404": {
                        "$ref": "#/components/responses/Error"
                    },
                    "409": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    },
                    "502": {
                        "$ref": "#/components/responses/Error"
                    }
                }
            }
        },
        "/rest/v1/analytics.pages": {
            "post": {
                "operationId": "analytics_pages",
                "tags": [
                    "analytics"
                ],
                "summary": "Returns the page views of one site per page (every viewed page, not only landing pages) in the period, most views first: views, the sessions and users that viewed the page, engagement and duration of those sessions, the share of all views and the same figures in the previous period.",
                "description": "Returns the page views of one site per page (every viewed page, not only landing pages) in the period, most views first: views, the sessions and users that viewed the page, engagement and duration of those sessions, the share of all views and the same figures in the previous period. The filters narrow everything down (all at once); meta.period gives the period and the previous period. Fails with 409 not_connected when Google Analytics 4 is not connected for the site.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "site_id": {
                                        "type": "string",
                                        "description": "The site: its id from list_sites, or the id in the app’s address."
                                    },
                                    "from": {
                                        "type": "string",
                                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                                        "description": "First day of the period, YYYY-MM-DD; give it together with to."
                                    },
                                    "to": {
                                        "type": "string",
                                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                                        "description": "Last day of the period, YYYY-MM-DD (yesterday at the latest); give it together with from. At most 366 days."
                                    },
                                    "days": {
                                        "type": "integer",
                                        "minimum": 1,
                                        "maximum": 366,
                                        "default": 28,
                                        "description": "Without from and to: the last this many days up to yesterday. Defaults to 28."
                                    },
                                    "compare": {
                                        "type": "string",
                                        "enum": [
                                            "previous_period",
                                            "previous_year"
                                        ],
                                        "default": "previous_period",
                                        "description": "What the previous figures are: previous_period (the same number of days just before) or previous_year (the same days 52 weeks earlier, same weekdays; for periods up to 364 days). Defaults to previous_period."
                                    },
                                    "channel": {
                                        "type": "string",
                                        "maxLength": 300,
                                        "description": "Only sessions from this channel, as Google Analytics names it (Organic Search, Direct, Referral, Organic Social, Paid Search, Email, AI Assistant, …)."
                                    },
                                    "source_medium": {
                                        "type": "string",
                                        "maxLength": 300,
                                        "description": "Only sessions from this source / medium, exactly as in analytics.sources (google / organic)."
                                    },
                                    "landing_page": {
                                        "type": "string",
                                        "maxLength": 300,
                                        "description": "Only sessions that started on this page: its path, exactly as in analytics.landing_pages (/blog/post)."
                                    },
                                    "path_prefix": {
                                        "type": "string",
                                        "maxLength": 300,
                                        "description": "Only sessions that started on a page whose path begins with this (/blog/)."
                                    },
                                    "country": {
                                        "type": "string",
                                        "maxLength": 300,
                                        "description": "Only sessions from this country, in English as in analytics.audience (Netherlands)."
                                    },
                                    "device": {
                                        "type": "string",
                                        "enum": [
                                            "desktop",
                                            "mobile",
                                            "tablet",
                                            "smart tv"
                                        ],
                                        "description": "Only sessions on this kind of device."
                                    },
                                    "limit": {
                                        "type": "integer",
                                        "minimum": 1,
                                        "maximum": 500,
                                        "default": 100,
                                        "description": "Items per call."
                                    },
                                    "cursor": {
                                        "type": "string",
                                        "description": "meta.next_cursor of the previous call, for the next page."
                                    }
                                },
                                "required": [
                                    "site_id"
                                ],
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "path": {
                                                        "description": "The path of the page, as Google Analytics gives it.",
                                                        "type": "string"
                                                    },
                                                    "url": {
                                                        "description": "The full address of the page; null for (not set).",
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "views": {
                                                        "description": "Page views.",
                                                        "type": "integer"
                                                    },
                                                    "sessions": {
                                                        "description": "Sessions in which the page was viewed.",
                                                        "type": "integer"
                                                    },
                                                    "users": {
                                                        "description": "Users who viewed the page.",
                                                        "type": "integer"
                                                    },
                                                    "engagement_rate_pct": {
                                                        "description": "Engagement rate of those sessions, 0-100; null without sessions.",
                                                        "type": [
                                                            "number",
                                                            "null"
                                                        ]
                                                    },
                                                    "avg_session_duration_seconds": {
                                                        "description": "Average duration of those sessions in seconds; null without sessions.",
                                                        "type": [
                                                            "number",
                                                            "null"
                                                        ]
                                                    },
                                                    "share_pct": {
                                                        "description": "Share of the views of the whole list, 0-100.",
                                                        "type": [
                                                            "number",
                                                            "null"
                                                        ]
                                                    },
                                                    "previous": {
                                                        "description": "The same figures in the previous period; null when the page had no views then.",
                                                        "type": [
                                                            "object",
                                                            "null"
                                                        ],
                                                        "properties": {
                                                            "views": {
                                                                "description": "Page views.",
                                                                "type": "integer"
                                                            },
                                                            "sessions": {
                                                                "description": "Sessions in which the page was viewed.",
                                                                "type": "integer"
                                                            },
                                                            "users": {
                                                                "description": "Users who viewed the page.",
                                                                "type": "integer"
                                                            },
                                                            "engagement_rate_pct": {
                                                                "description": "Engagement rate, 0-100.",
                                                                "type": [
                                                                    "number",
                                                                    "null"
                                                                ]
                                                            },
                                                            "avg_session_duration_seconds": {
                                                                "description": "Average session duration in seconds.",
                                                                "type": [
                                                                    "number",
                                                                    "null"
                                                                ]
                                                            }
                                                        },
                                                        "required": [
                                                            "views",
                                                            "sessions",
                                                            "users",
                                                            "engagement_rate_pct",
                                                            "avg_session_duration_seconds"
                                                        ]
                                                    }
                                                },
                                                "required": [
                                                    "path",
                                                    "url",
                                                    "views",
                                                    "sessions",
                                                    "users",
                                                    "engagement_rate_pct",
                                                    "avg_session_duration_seconds",
                                                    "share_pct",
                                                    "previous"
                                                ]
                                            }
                                        },
                                        "meta": {
                                            "type": "object",
                                            "description": "site_id; next_cursor and total for a list; period {from, to, compare_from, compare_to} where the endpoint covers a period."
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "400": {
                        "$ref": "#/components/responses/Error"
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "404": {
                        "$ref": "#/components/responses/Error"
                    },
                    "409": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    },
                    "502": {
                        "$ref": "#/components/responses/Error"
                    }
                }
            }
        },
        "/rest/v1/analytics.audience": {
            "post": {
                "operationId": "analytics_audience",
                "tags": [
                    "analytics"
                ],
                "summary": "Returns the sessions of one site per country, city, device, browser, language or new versus returning (by) in the period, most sessions first: all metrics, the share of the sessions in the list and the same figures in the previous period.",
                "description": "Returns the sessions of one site per country, city, device, browser, language or new versus returning (by) in the period, most sessions first: all metrics, the share of the sessions in the list and the same figures in the previous period. The filters narrow everything down (all at once); meta.period gives the period and the previous period. Fails with 409 not_connected when Google Analytics 4 is not connected for the site.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "site_id": {
                                        "type": "string",
                                        "description": "The site: its id from list_sites, or the id in the app’s address."
                                    },
                                    "by": {
                                        "type": "string",
                                        "enum": [
                                            "country",
                                            "city",
                                            "device",
                                            "browser",
                                            "language",
                                            "new_vs_returning"
                                        ],
                                        "default": "country",
                                        "description": "country, city, device (desktop, mobile, tablet), browser, language or new_vs_returning (new, returning). Defaults to country."
                                    },
                                    "from": {
                                        "type": "string",
                                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                                        "description": "First day of the period, YYYY-MM-DD; give it together with to."
                                    },
                                    "to": {
                                        "type": "string",
                                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                                        "description": "Last day of the period, YYYY-MM-DD (yesterday at the latest); give it together with from. At most 366 days."
                                    },
                                    "days": {
                                        "type": "integer",
                                        "minimum": 1,
                                        "maximum": 366,
                                        "default": 28,
                                        "description": "Without from and to: the last this many days up to yesterday. Defaults to 28."
                                    },
                                    "compare": {
                                        "type": "string",
                                        "enum": [
                                            "previous_period",
                                            "previous_year"
                                        ],
                                        "default": "previous_period",
                                        "description": "What the previous figures are: previous_period (the same number of days just before) or previous_year (the same days 52 weeks earlier, same weekdays; for periods up to 364 days). Defaults to previous_period."
                                    },
                                    "channel": {
                                        "type": "string",
                                        "maxLength": 300,
                                        "description": "Only sessions from this channel, as Google Analytics names it (Organic Search, Direct, Referral, Organic Social, Paid Search, Email, AI Assistant, …)."
                                    },
                                    "source_medium": {
                                        "type": "string",
                                        "maxLength": 300,
                                        "description": "Only sessions from this source / medium, exactly as in analytics.sources (google / organic)."
                                    },
                                    "landing_page": {
                                        "type": "string",
                                        "maxLength": 300,
                                        "description": "Only sessions that started on this page: its path, exactly as in analytics.landing_pages (/blog/post)."
                                    },
                                    "path_prefix": {
                                        "type": "string",
                                        "maxLength": 300,
                                        "description": "Only sessions that started on a page whose path begins with this (/blog/)."
                                    },
                                    "country": {
                                        "type": "string",
                                        "maxLength": 300,
                                        "description": "Only sessions from this country, in English as in analytics.audience (Netherlands)."
                                    },
                                    "device": {
                                        "type": "string",
                                        "enum": [
                                            "desktop",
                                            "mobile",
                                            "tablet",
                                            "smart tv"
                                        ],
                                        "description": "Only sessions on this kind of device."
                                    },
                                    "limit": {
                                        "type": "integer",
                                        "minimum": 1,
                                        "maximum": 500,
                                        "default": 100,
                                        "description": "Items per call."
                                    },
                                    "cursor": {
                                        "type": "string",
                                        "description": "meta.next_cursor of the previous call, for the next page."
                                    }
                                },
                                "required": [
                                    "site_id"
                                ],
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "key": {
                                                        "description": "The country, city, device, browser, language or new / returning, as Google Analytics gives it (English names).",
                                                        "type": "string"
                                                    },
                                                    "sessions": {
                                                        "description": "Sessions.",
                                                        "type": "integer"
                                                    },
                                                    "engaged_sessions": {
                                                        "description": "Engaged sessions: longer than 10 seconds, two or more page views, or a conversion.",
                                                        "type": "integer"
                                                    },
                                                    "engagement_rate_pct": {
                                                        "description": "Engaged sessions as a share of sessions, 0-100; null without sessions.",
                                                        "type": [
                                                            "number",
                                                            "null"
                                                        ]
                                                    },
                                                    "users": {
                                                        "description": "Users (active users, as Google Analytics counts them).",
                                                        "type": "integer"
                                                    },
                                                    "new_users": {
                                                        "description": "Users who came for the first time.",
                                                        "type": "integer"
                                                    },
                                                    "views": {
                                                        "description": "Page views.",
                                                        "type": "integer"
                                                    },
                                                    "views_per_session": {
                                                        "description": "Page views per session; null without sessions.",
                                                        "type": [
                                                            "number",
                                                            "null"
                                                        ]
                                                    },
                                                    "avg_session_duration_seconds": {
                                                        "description": "Average session duration in seconds; null without sessions.",
                                                        "type": [
                                                            "number",
                                                            "null"
                                                        ]
                                                    },
                                                    "conversions": {
                                                        "description": "Key events (conversions as set up in Google Analytics).",
                                                        "type": "integer"
                                                    },
                                                    "revenue_eur": {
                                                        "description": "Revenue, in the currency of the Google Analytics property (usually euro).",
                                                        "type": "number"
                                                    },
                                                    "share_pct": {
                                                        "description": "Share of the sessions of the whole list, 0-100.",
                                                        "type": [
                                                            "number",
                                                            "null"
                                                        ]
                                                    },
                                                    "previous": {
                                                        "description": "The same figures in the previous period; null when it did not occur then.",
                                                        "type": [
                                                            "object",
                                                            "null"
                                                        ],
                                                        "properties": {
                                                            "sessions": {
                                                                "description": "Sessions.",
                                                                "type": "integer"
                                                            },
                                                            "engaged_sessions": {
                                                                "description": "Engaged sessions: longer than 10 seconds, two or more page views, or a conversion.",
                                                                "type": "integer"
                                                            },
                                                            "engagement_rate_pct": {
                                                                "description": "Engaged sessions as a share of sessions, 0-100; null without sessions.",
                                                                "type": [
                                                                    "number",
                                                                    "null"
                                                                ]
                                                            },
                                                            "users": {
                                                                "description": "Users (active users, as Google Analytics counts them).",
                                                                "type": "integer"
                                                            },
                                                            "new_users": {
                                                                "description": "Users who came for the first time.",
                                                                "type": "integer"
                                                            },
                                                            "views": {
                                                                "description": "Page views.",
                                                                "type": "integer"
                                                            },
                                                            "views_per_session": {
                                                                "description": "Page views per session; null without sessions.",
                                                                "type": [
                                                                    "number",
                                                                    "null"
                                                                ]
                                                            },
                                                            "avg_session_duration_seconds": {
                                                                "description": "Average session duration in seconds; null without sessions.",
                                                                "type": [
                                                                    "number",
                                                                    "null"
                                                                ]
                                                            },
                                                            "conversions": {
                                                                "description": "Key events (conversions as set up in Google Analytics).",
                                                                "type": "integer"
                                                            },
                                                            "revenue_eur": {
                                                                "description": "Revenue, in the currency of the Google Analytics property (usually euro).",
                                                                "type": "number"
                                                            }
                                                        },
                                                        "required": [
                                                            "sessions",
                                                            "engaged_sessions",
                                                            "engagement_rate_pct",
                                                            "users",
                                                            "new_users",
                                                            "views",
                                                            "views_per_session",
                                                            "avg_session_duration_seconds",
                                                            "conversions",
                                                            "revenue_eur"
                                                        ]
                                                    }
                                                },
                                                "required": [
                                                    "key",
                                                    "sessions",
                                                    "engaged_sessions",
                                                    "engagement_rate_pct",
                                                    "users",
                                                    "new_users",
                                                    "views",
                                                    "views_per_session",
                                                    "avg_session_duration_seconds",
                                                    "conversions",
                                                    "revenue_eur",
                                                    "share_pct",
                                                    "previous"
                                                ]
                                            }
                                        },
                                        "meta": {
                                            "type": "object",
                                            "description": "site_id; next_cursor and total for a list; period {from, to, compare_from, compare_to} where the endpoint covers a period."
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "400": {
                        "$ref": "#/components/responses/Error"
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "404": {
                        "$ref": "#/components/responses/Error"
                    },
                    "409": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    },
                    "502": {
                        "$ref": "#/components/responses/Error"
                    }
                }
            }
        },
        "/rest/v1/analytics.events": {
            "post": {
                "operationId": "analytics_events",
                "tags": [
                    "analytics"
                ],
                "summary": "Returns the events of one site per event name (page_view, scroll, purchase, form_submit, …) in the period, most first: how often, how many of them count as conversions (key events), the users and the revenue, and the same in the previous period.",
                "description": "Returns the events of one site per event name (page_view, scroll, purchase, form_submit, …) in the period, most first: how often, how many of them count as conversions (key events), the users and the revenue, and the same in the previous period. The filters narrow everything down (all at once); meta.period gives the period and the previous period. Fails with 409 not_connected when Google Analytics 4 is not connected for the site.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "site_id": {
                                        "type": "string",
                                        "description": "The site: its id from list_sites, or the id in the app’s address."
                                    },
                                    "from": {
                                        "type": "string",
                                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                                        "description": "First day of the period, YYYY-MM-DD; give it together with to."
                                    },
                                    "to": {
                                        "type": "string",
                                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                                        "description": "Last day of the period, YYYY-MM-DD (yesterday at the latest); give it together with from. At most 366 days."
                                    },
                                    "days": {
                                        "type": "integer",
                                        "minimum": 1,
                                        "maximum": 366,
                                        "default": 28,
                                        "description": "Without from and to: the last this many days up to yesterday. Defaults to 28."
                                    },
                                    "compare": {
                                        "type": "string",
                                        "enum": [
                                            "previous_period",
                                            "previous_year"
                                        ],
                                        "default": "previous_period",
                                        "description": "What the previous figures are: previous_period (the same number of days just before) or previous_year (the same days 52 weeks earlier, same weekdays; for periods up to 364 days). Defaults to previous_period."
                                    },
                                    "channel": {
                                        "type": "string",
                                        "maxLength": 300,
                                        "description": "Only sessions from this channel, as Google Analytics names it (Organic Search, Direct, Referral, Organic Social, Paid Search, Email, AI Assistant, …)."
                                    },
                                    "source_medium": {
                                        "type": "string",
                                        "maxLength": 300,
                                        "description": "Only sessions from this source / medium, exactly as in analytics.sources (google / organic)."
                                    },
                                    "landing_page": {
                                        "type": "string",
                                        "maxLength": 300,
                                        "description": "Only sessions that started on this page: its path, exactly as in analytics.landing_pages (/blog/post)."
                                    },
                                    "path_prefix": {
                                        "type": "string",
                                        "maxLength": 300,
                                        "description": "Only sessions that started on a page whose path begins with this (/blog/)."
                                    },
                                    "country": {
                                        "type": "string",
                                        "maxLength": 300,
                                        "description": "Only sessions from this country, in English as in analytics.audience (Netherlands)."
                                    },
                                    "device": {
                                        "type": "string",
                                        "enum": [
                                            "desktop",
                                            "mobile",
                                            "tablet",
                                            "smart tv"
                                        ],
                                        "description": "Only sessions on this kind of device."
                                    },
                                    "limit": {
                                        "type": "integer",
                                        "minimum": 1,
                                        "maximum": 500,
                                        "default": 100,
                                        "description": "Items per call."
                                    },
                                    "cursor": {
                                        "type": "string",
                                        "description": "meta.next_cursor of the previous call, for the next page."
                                    }
                                },
                                "required": [
                                    "site_id"
                                ],
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "event": {
                                                        "description": "The event name.",
                                                        "type": "string"
                                                    },
                                                    "count": {
                                                        "description": "How often the event happened.",
                                                        "type": "integer"
                                                    },
                                                    "conversions": {
                                                        "description": "How many of them are key events (0 when the event is not a key event).",
                                                        "type": "integer"
                                                    },
                                                    "users": {
                                                        "description": "Users with the event.",
                                                        "type": "integer"
                                                    },
                                                    "revenue_eur": {
                                                        "description": "Revenue with the event, in the currency of the property.",
                                                        "type": "number"
                                                    },
                                                    "previous": {
                                                        "description": "The same in the previous period; null when the event did not occur then.",
                                                        "type": [
                                                            "object",
                                                            "null"
                                                        ],
                                                        "properties": {
                                                            "count": {
                                                                "description": "How often.",
                                                                "type": "integer"
                                                            },
                                                            "conversions": {
                                                                "description": "Key events.",
                                                                "type": "integer"
                                                            },
                                                            "users": {
                                                                "description": "Users.",
                                                                "type": "integer"
                                                            },
                                                            "revenue_eur": {
                                                                "description": "Revenue.",
                                                                "type": "number"
                                                            }
                                                        },
                                                        "required": [
                                                            "count",
                                                            "conversions",
                                                            "users",
                                                            "revenue_eur"
                                                        ]
                                                    }
                                                },
                                                "required": [
                                                    "event",
                                                    "count",
                                                    "conversions",
                                                    "users",
                                                    "revenue_eur",
                                                    "previous"
                                                ]
                                            }
                                        },
                                        "meta": {
                                            "type": "object",
                                            "description": "site_id; next_cursor and total for a list; period {from, to, compare_from, compare_to} where the endpoint covers a period."
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "400": {
                        "$ref": "#/components/responses/Error"
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "404": {
                        "$ref": "#/components/responses/Error"
                    },
                    "409": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    },
                    "502": {
                        "$ref": "#/components/responses/Error"
                    }
                }
            }
        },
        "/rest/v1/analytics.products": {
            "post": {
                "operationId": "analytics_products",
                "tags": [
                    "analytics"
                ],
                "summary": "Returns the e-commerce products of one site in the period, most revenue first: revenue, items bought and items viewed, and the same in the previous period.",
                "description": "Returns the e-commerce products of one site in the period, most revenue first: revenue, items bought and items viewed, and the same in the previous period. Empty when the site sends no e-commerce data to Google Analytics. The filters do not apply here (product data has no sessions). Fails with 409 not_connected when Google Analytics 4 is not connected for the site.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "site_id": {
                                        "type": "string",
                                        "description": "The site: its id from list_sites, or the id in the app’s address."
                                    },
                                    "from": {
                                        "type": "string",
                                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                                        "description": "First day of the period, YYYY-MM-DD; give it together with to."
                                    },
                                    "to": {
                                        "type": "string",
                                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                                        "description": "Last day of the period, YYYY-MM-DD (yesterday at the latest); give it together with from. At most 366 days."
                                    },
                                    "days": {
                                        "type": "integer",
                                        "minimum": 1,
                                        "maximum": 366,
                                        "default": 28,
                                        "description": "Without from and to: the last this many days up to yesterday. Defaults to 28."
                                    },
                                    "compare": {
                                        "type": "string",
                                        "enum": [
                                            "previous_period",
                                            "previous_year"
                                        ],
                                        "default": "previous_period",
                                        "description": "What the previous figures are: previous_period (the same number of days just before) or previous_year (the same days 52 weeks earlier, same weekdays; for periods up to 364 days). Defaults to previous_period."
                                    },
                                    "limit": {
                                        "type": "integer",
                                        "minimum": 1,
                                        "maximum": 500,
                                        "default": 100,
                                        "description": "Items per call."
                                    },
                                    "cursor": {
                                        "type": "string",
                                        "description": "meta.next_cursor of the previous call, for the next page."
                                    }
                                },
                                "required": [
                                    "site_id"
                                ],
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "product": {
                                                        "description": "The product name (item name).",
                                                        "type": "string"
                                                    },
                                                    "revenue_eur": {
                                                        "description": "Revenue from the product, in the currency of the property.",
                                                        "type": "number"
                                                    },
                                                    "purchased": {
                                                        "description": "Items bought.",
                                                        "type": "integer"
                                                    },
                                                    "viewed": {
                                                        "description": "Times the item was viewed.",
                                                        "type": "integer"
                                                    },
                                                    "previous": {
                                                        "description": "The same in the previous period; null when the product did not occur then.",
                                                        "type": [
                                                            "object",
                                                            "null"
                                                        ],
                                                        "properties": {
                                                            "revenue_eur": {
                                                                "description": "Revenue.",
                                                                "type": "number"
                                                            },
                                                            "purchased": {
                                                                "description": "Items bought.",
                                                                "type": "integer"
                                                            },
                                                            "viewed": {
                                                                "description": "Times viewed.",
                                                                "type": "integer"
                                                            }
                                                        },
                                                        "required": [
                                                            "revenue_eur",
                                                            "purchased",
                                                            "viewed"
                                                        ]
                                                    }
                                                },
                                                "required": [
                                                    "product",
                                                    "revenue_eur",
                                                    "purchased",
                                                    "viewed",
                                                    "previous"
                                                ]
                                            }
                                        },
                                        "meta": {
                                            "type": "object",
                                            "description": "site_id; next_cursor and total for a list; period {from, to, compare_from, compare_to} where the endpoint covers a period."
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "400": {
                        "$ref": "#/components/responses/Error"
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "404": {
                        "$ref": "#/components/responses/Error"
                    },
                    "409": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    },
                    "502": {
                        "$ref": "#/components/responses/Error"
                    }
                }
            }
        },
        "/rest/v1/analytics.referrers": {
            "post": {
                "operationId": "analytics_referrers",
                "tags": [
                    "analytics"
                ],
                "summary": "Returns the pages on other sites that sent visitors to one site in the period, per referring page and landing page, most sessions first: sessions, engaged sessions and page views, and the same in the previous period.",
                "description": "Returns the pages on other sites that sent visitors to one site in the period, per referring page and landing page, most sessions first: sessions, engaged sessions and page views, and the same in the previous period. Search engines and the site itself are left out. Browsers often pass only the domain of the referring site, not the page; then referrer_url is the domain and domain_only is true. Combine with source_medium (chatgpt.com / referral) for one source. The filters narrow everything down (all at once); meta.period gives the period and the previous period. Fails with 409 not_connected when Google Analytics 4 is not connected for the site.",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "site_id": {
                                        "type": "string",
                                        "description": "The site: its id from list_sites, or the id in the app’s address."
                                    },
                                    "from": {
                                        "type": "string",
                                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                                        "description": "First day of the period, YYYY-MM-DD; give it together with to."
                                    },
                                    "to": {
                                        "type": "string",
                                        "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
                                        "description": "Last day of the period, YYYY-MM-DD (yesterday at the latest); give it together with from. At most 366 days."
                                    },
                                    "days": {
                                        "type": "integer",
                                        "minimum": 1,
                                        "maximum": 366,
                                        "default": 28,
                                        "description": "Without from and to: the last this many days up to yesterday. Defaults to 28."
                                    },
                                    "compare": {
                                        "type": "string",
                                        "enum": [
                                            "previous_period",
                                            "previous_year"
                                        ],
                                        "default": "previous_period",
                                        "description": "What the previous figures are: previous_period (the same number of days just before) or previous_year (the same days 52 weeks earlier, same weekdays; for periods up to 364 days). Defaults to previous_period."
                                    },
                                    "channel": {
                                        "type": "string",
                                        "maxLength": 300,
                                        "description": "Only sessions from this channel, as Google Analytics names it (Organic Search, Direct, Referral, Organic Social, Paid Search, Email, AI Assistant, …)."
                                    },
                                    "source_medium": {
                                        "type": "string",
                                        "maxLength": 300,
                                        "description": "Only sessions from this source / medium, exactly as in analytics.sources (google / organic)."
                                    },
                                    "landing_page": {
                                        "type": "string",
                                        "maxLength": 300,
                                        "description": "Only sessions that started on this page: its path, exactly as in analytics.landing_pages (/blog/post)."
                                    },
                                    "path_prefix": {
                                        "type": "string",
                                        "maxLength": 300,
                                        "description": "Only sessions that started on a page whose path begins with this (/blog/)."
                                    },
                                    "country": {
                                        "type": "string",
                                        "maxLength": 300,
                                        "description": "Only sessions from this country, in English as in analytics.audience (Netherlands)."
                                    },
                                    "device": {
                                        "type": "string",
                                        "enum": [
                                            "desktop",
                                            "mobile",
                                            "tablet",
                                            "smart tv"
                                        ],
                                        "description": "Only sessions on this kind of device."
                                    },
                                    "limit": {
                                        "type": "integer",
                                        "minimum": 1,
                                        "maximum": 500,
                                        "default": 100,
                                        "description": "Items per call."
                                    },
                                    "cursor": {
                                        "type": "string",
                                        "description": "meta.next_cursor of the previous call, for the next page."
                                    }
                                },
                                "required": [
                                    "site_id"
                                ],
                                "additionalProperties": false
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "referrer_url": {
                                                        "description": "The referring page without query string; only https://domain when the browser passed no more.",
                                                        "type": "string"
                                                    },
                                                    "referrer_domain": {
                                                        "description": "The domain of the referring site, without www.",
                                                        "type": "string"
                                                    },
                                                    "domain_only": {
                                                        "description": "Whether only the domain of the referring page is known.",
                                                        "type": "boolean"
                                                    },
                                                    "landing_page": {
                                                        "description": "The path of the page the visitor arrived on.",
                                                        "type": "string"
                                                    },
                                                    "landing_url": {
                                                        "description": "The full address of that page; null when unknown.",
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "sessions": {
                                                        "description": "Sessions.",
                                                        "type": "integer"
                                                    },
                                                    "engaged_sessions": {
                                                        "description": "Engaged sessions.",
                                                        "type": "integer"
                                                    },
                                                    "views": {
                                                        "description": "Page views.",
                                                        "type": "integer"
                                                    },
                                                    "previous": {
                                                        "description": "The same in the previous period; null when it did not occur then.",
                                                        "type": [
                                                            "object",
                                                            "null"
                                                        ],
                                                        "properties": {
                                                            "sessions": {
                                                                "description": "Sessions.",
                                                                "type": "integer"
                                                            },
                                                            "engaged_sessions": {
                                                                "description": "Engaged sessions.",
                                                                "type": "integer"
                                                            },
                                                            "views": {
                                                                "description": "Page views.",
                                                                "type": "integer"
                                                            }
                                                        },
                                                        "required": [
                                                            "sessions",
                                                            "engaged_sessions",
                                                            "views"
                                                        ]
                                                    }
                                                },
                                                "required": [
                                                    "referrer_url",
                                                    "referrer_domain",
                                                    "domain_only",
                                                    "landing_page",
                                                    "landing_url",
                                                    "sessions",
                                                    "engaged_sessions",
                                                    "views",
                                                    "previous"
                                                ]
                                            }
                                        },
                                        "meta": {
                                            "type": "object",
                                            "description": "site_id; next_cursor and total for a list; period {from, to, compare_from, compare_to} where the endpoint covers a period."
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ]
                                }
                            }
                        }
                    },
                    "400": {
                        "$ref": "#/components/responses/Error"
                    },
                    "401": {
                        "$ref": "#/components/responses/Error"
                    },
                    "403": {
                        "$ref": "#/components/responses/Error"
                    },
                    "404": {
                        "$ref": "#/components/responses/Error"
                    },
                    "409": {
                        "$ref": "#/components/responses/Error"
                    },
                    "429": {
                        "$ref": "#/components/responses/Error"
                    },
                    "502": {
                        "$ref": "#/components/responses/Error"
                    }
                }
            }
        }
    },
    "components": {
        "securitySchemes": {
            "bearer": {
                "type": "http",
                "scheme": "bearer",
                "description": "Your personal API key, shown on the MCP page in the app (/mcp)."
            }
        },
        "responses": {
            "Error": {
                "description": "Error",
                "content": {
                    "application/json": {
                        "schema": {
                            "type": "object",
                            "properties": {
                                "error": {
                                    "type": "object",
                                    "properties": {
                                        "code": {
                                            "type": "string"
                                        },
                                        "message": {
                                            "type": "string"
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}