{"info":{"title":"Highseat Stats API","version":"1.0.0","description":"The same figures the dashboard shows, and the changes an admin makes there. A read key answers every GET route; a write key also answers the routes that change data.\n\nAuthentication, write keys, idempotency, limits and the shape of every response: https://highseat.com/docs/api.","license":{"name":"Proprietary"}},"servers":[{"url":"https://api.highseat.com/v1"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable and machine-readable: BAD_REQUEST, INVALID_FILTER, INVALID_CURSOR, UNAUTHORIZED, FORBIDDEN, KEY_READ_ONLY, NOT_FOUND, METHOD_NOT_ALLOWED, CONFLICT, IDEMPOTENCY_KEY_IN_USE, PAYLOAD_TOO_LARGE, IDEMPOTENCY_KEY_REUSED, QUERY_TIMEOUT, RATE_LIMITED, TOO_MANY_CONCURRENT_REQUESTS, SERVICE_UNAVAILABLE or INTERNAL_SERVER_ERROR. A write may answer a code of its own: a conflict (GOAL_EXISTS, DOMAIN_TAKEN) or a limit (GOAL_LIMIT_REACHED, FUNNEL_LIMIT_REACHED, SHARE_LINK_LIMIT_REACHED). Codes are added, never renamed."},"message":{"type":"string","description":"What went wrong, written for a person."},"id":{"type":"string","description":"On a conflict, the existing row's id, so a client can update it instead."},"issues":{"type":"array","items":{"type":"object","properties":{"path":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"number"}]},"description":"The parameter at fault, e.g. ['filter', 1] for the second filter."},"message":{"type":"string"}},"required":["path","message"]},"description":"One entry per invalid parameter."},"requestId":{"type":"string","description":"Names this request. Quote it to support, who can find the request from it."}},"required":["code","message","requestId"]}},"required":["error"]}},"headers":{"RateLimit-Limit":{"description":"Calls the credential may make in the window.","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Calls left in the current window.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the window reopens.","schema":{"type":"integer"}},"RateLimit-Policy":{"description":"The quota and window, as the IETF draft writes it: \"hourly\";q=600;w=3600.","schema":{"type":"string"}},"RateLimit":{"description":"The remaining budget, as the IETF draft writes it: \"hourly\";r=599;t=3540.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before the next call.","schema":{"type":"integer"}}},"responses":{"Error400":{"description":"The request is malformed: BAD_REQUEST, INVALID_FILTER or INVALID_CURSOR.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Error401":{"description":"No API key or OAuth token, or one that is not valid: UNAUTHORIZED.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Error403":{"description":"The workspace's reports are closed until it pays: FORBIDDEN.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Error404":{"description":"The site, the row the path names or the route does not exist: NOT_FOUND.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Error422":{"description":"The report ran into the time cap; try a shorter range: QUERY_TIMEOUT.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Error429":{"description":"The credential has used its hourly budget (RATE_LIMITED), or its workspace already runs as many calls at once as it may (TOO_MANY_CONCURRENT_REQUESTS).","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Error503":{"description":"The server is busy; retry in a moment: SERVICE_UNAVAILABLE.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"WriteError400":{"description":"The request is malformed, or its Idempotency-Key is not 1 to 255 characters: BAD_REQUEST.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"WriteError403":{"description":"The credential can only read (KEY_READ_ONLY), or the workspace is closed until it pays and takes no changes (FORBIDDEN).","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"WriteError409":{"description":"The change conflicts with a row that exists (CONFLICT, or the write's own code, which carries the row's `id`), or a request with the same Idempotency-Key still runs (IDEMPOTENCY_KEY_IN_USE).","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"WriteError413":{"description":"The body is over 1 MB: PAYLOAD_TOO_LARGE.","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"WriteError422":{"description":"The Idempotency-Key was sent with another request in the last 24 hours (IDEMPOTENCY_KEY_REUSED), or the site already has as many rows of this kind as it may save (the write's own code, such as GOAL_LIMIT_REACHED).","headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"openapi":"3.1.1","paths":{"/credential":{"get":{"operationId":"getCredential","summary":"Describe the credential","description":"The API key or OAuth connection the request was made with: its workspace, what it may do, and the sites it reaches. One limited to some sites lists them; one that reaches every site says so with `allSites`, and reaches sites added later too.","tags":["Credential"],"parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"kind":{"enum":["apiKey","oauth"],"type":"string","description":"`apiKey` for an API key, `oauth` for an app a person connected."},"name":{"type":"string","description":"The key's name, or the connected app's."},"hint":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A key's last four characters. Null for OAuth."},"access":{"enum":["read","write"],"type":"string","description":"`read` answers every GET route; `write` also answers the routes that change data."},"workspace":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"allSites":{"type":"boolean","description":"Whether the credential reaches every site of the workspace."},"sites":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"domain":{"type":"string","description":"The site's hostname, which also names it in a path."}},"required":["id","domain"]},"description":"The sites the credential reaches today, by id and domain."}},"required":["kind","name","hint","access","workspace","allSites","sites"]}},"required":["data"]}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"422":{"$ref":"#/components/responses/Error422"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}}}},"/sites":{"get":{"operationId":"listSites","summary":"List sites","description":"Every site the credential reaches, by its id, name, domain and timezone, in the order the connected person set in the dashboard, oldest first without one. `getSite` answers a site's settings.","tags":["Sites"],"parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"domain":{"type":"string","description":"The site's hostname, which also names it in a path."},"timezone":{"type":"string","description":"IANA timezone every day boundary falls in."}},"required":["id","name","domain","timezone"]}},"nextCursor":{"type":"null"}},"required":["data","nextCursor"]}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"422":{"$ref":"#/components/responses/Error422"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}}},"post":{"operationId":"createSite","summary":"Create a site","description":"Adds a site to the key's workspace, as the dashboard does. A key limited to some sites answers 403 FORBIDDEN, since it could not read the site it made.","tags":["Sites"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"domain":{"type":"string","minLength":3,"maxLength":253,"pattern":"^((\\*\\.)|((?!-)[a-z0-9-]{0,63}[a-z0-9]\\.))+[a-z]{2,63}$"},"timezone":{"type":"string","description":"IANA timezone every day boundary falls in, such as Europe/Warsaw. Default UTC."},"reportingCurrency":{"type":"string","description":"ISO 4217 code every amount is reported in. Default USD."}},"required":["name","domain"]}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string up to 255 characters, such as a UUID. A retry with the same key and body within 24 hours answers what the first call did, without writing again.","schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"domain":{"type":"string","description":"The site's hostname, which also names it in a path."},"timezone":{"type":"string","description":"IANA timezone every day boundary falls in."},"reportingCurrency":{"type":"string","description":"ISO 4217 code every amount is reported in. It changes in the dashboard's Revenue settings, which convert the past sales to it."},"attributionModel":{"enum":["last","first","linear"],"type":"string","description":"Which pageview before a sale takes its credit in revenue split by page, source or campaign: the last, the first, or every one equally (`linear`). Applied when a report runs, so a change re-credits every past sale."},"attributionLookback":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Days before a sale a pageview may lie and still earn credit: 7, 14, 30 or 90. Applied when a report runs, so a change re-credits every past sale."},"thankYouPaths":{"type":"array","items":{"type":"string"},"description":"Paths attribution never credits as a touch, `*` wildcards allowed: the page a checkout returns to. Applied when a report runs, so a change re-credits every past sale."},"excludedIps":{"type":"array","items":{"type":"string"},"description":"IP addresses and CIDR ranges whose events ingest drops. Left out of a read key's answer, since an address is personal data."},"excludedPaths":{"type":"array","items":{"type":"string"},"description":"Paths whose events ingest drops, `*` wildcards allowed. A change reaches new events only."},"extraHostnames":{"type":"array","items":{"type":"string"},"description":"Hostnames ingest counts besides the domain and its subdomains: an exact name, or `*.example.com` for that domain and its subdomains. A change reaches new events only."},"proxyPath":{"type":"string","description":"The path the site's first-party proxy serves the script and takes events on, such as /3f9a1c2b7e."},"secretHint":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The last four characters of the site secret a proxy or backend sends. Null while the site has none: Installation settings in the dashboard creates it."},"firstEventAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}],"description":"ISO 8601 in UTC: the site's earliest event. Null before the first one."},"createdAt":{"type":"string","format":"date-time","x-native-type":"date","description":"ISO 8601 in UTC: when the site was added."}},"required":["id","name","domain","timezone","reportingCurrency","attributionModel","attributionLookback","thankYouPaths","excludedPaths","extraHostnames","proxyPath","secretHint","firstEventAt","createdAt"]}},"required":["data"]}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"}}},"400":{"$ref":"#/components/responses/WriteError400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/WriteError403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/WriteError409"},"413":{"$ref":"#/components/responses/WriteError413"},"422":{"$ref":"#/components/responses/WriteError422"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}}}},"/sites/overview":{"get":{"operationId":"listSiteOverviews","summary":"List every site's recent traffic","description":"Every site the credential reaches, in the order the connected person set in the dashboard, oldest first without one, with its visitors over the last 24 hours, the 24 hours before and the last 5 minutes. One call instead of one per site.","tags":["Sites"],"parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"domain":{"type":"string","description":"The site's hostname, which also names it in a path."},"timezone":{"type":"string","description":"IANA timezone every day boundary falls in."},"visitors":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Distinct visitors in the rolling last 24 hours."},"previousVisitors":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Distinct visitors in the 24 hours before those."},"online":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Distinct visitors in the last 5 minutes."}},"required":["id","name","domain","timezone","visitors","previousVisitors","online"]}},"nextCursor":{"type":"null"}},"required":["data","nextCursor"]}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"422":{"$ref":"#/components/responses/Error422"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}}}},"/sites/{site}":{"get":{"operationId":"getSite","summary":"Get a site","description":"One site with every setting, by its domain or its id.","tags":["Sites"],"parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string","description":"The site: its domain as registered (example.com), or its site id."}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"domain":{"type":"string","description":"The site's hostname, which also names it in a path."},"timezone":{"type":"string","description":"IANA timezone every day boundary falls in."},"reportingCurrency":{"type":"string","description":"ISO 4217 code every amount is reported in. It changes in the dashboard's Revenue settings, which convert the past sales to it."},"attributionModel":{"enum":["last","first","linear"],"type":"string","description":"Which pageview before a sale takes its credit in revenue split by page, source or campaign: the last, the first, or every one equally (`linear`). Applied when a report runs, so a change re-credits every past sale."},"attributionLookback":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Days before a sale a pageview may lie and still earn credit: 7, 14, 30 or 90. Applied when a report runs, so a change re-credits every past sale."},"thankYouPaths":{"type":"array","items":{"type":"string"},"description":"Paths attribution never credits as a touch, `*` wildcards allowed: the page a checkout returns to. Applied when a report runs, so a change re-credits every past sale."},"excludedIps":{"type":"array","items":{"type":"string"},"description":"IP addresses and CIDR ranges whose events ingest drops. Left out of a read key's answer, since an address is personal data."},"excludedPaths":{"type":"array","items":{"type":"string"},"description":"Paths whose events ingest drops, `*` wildcards allowed. A change reaches new events only."},"extraHostnames":{"type":"array","items":{"type":"string"},"description":"Hostnames ingest counts besides the domain and its subdomains: an exact name, or `*.example.com` for that domain and its subdomains. A change reaches new events only."},"proxyPath":{"type":"string","description":"The path the site's first-party proxy serves the script and takes events on, such as /3f9a1c2b7e."},"secretHint":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The last four characters of the site secret a proxy or backend sends. Null while the site has none: Installation settings in the dashboard creates it."},"firstEventAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}],"description":"ISO 8601 in UTC: the site's earliest event. Null before the first one."},"createdAt":{"type":"string","format":"date-time","x-native-type":"date","description":"ISO 8601 in UTC: when the site was added."}},"required":["id","name","domain","timezone","reportingCurrency","attributionModel","attributionLookback","thankYouPaths","excludedPaths","extraHostnames","proxyPath","secretHint","firstEventAt","createdAt"]}},"required":["data"]}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"422":{"$ref":"#/components/responses/Error422"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}}},"patch":{"operationId":"updateSite","summary":"Update a site","description":"Changes the settings sent and leaves the rest, as the dashboard does. A list sent replaces the whole list, and each setting says when it takes effect.","tags":["Sites"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100,"description":"The site's name, as the dashboard shows it."},"domain":{"type":"string","minLength":3,"maxLength":253,"pattern":"^((\\*\\.)|((?!-)[a-z0-9-]{0,63}[a-z0-9]\\.))+[a-z]{2,63}$","description":"The site's hostname, subdomains included. A domain another site of the workspace holds answers 409 DOMAIN_TAKEN."},"timezone":{"type":"string","description":"IANA timezone every day boundary falls in, such as Europe/Warsaw."},"attributionModel":{"enum":["last","first","linear"],"type":"string","description":"Which pageview before a sale takes its credit in revenue split by page, source or campaign: the last, the first, or every one equally (`linear`). Applied when a report runs, so a change re-credits every past sale."},"attributionLookback":{"enum":[7,14,30,90],"description":"Days before a sale a pageview may lie and still earn credit: 7, 14, 30 or 90. Applied when a report runs, so a change re-credits every past sale."},"thankYouPaths":{"type":"array","maxItems":100,"items":{"type":"string","minLength":1,"maxLength":500,"pattern":"^\\/.*"},"description":"Paths attribution never credits as a touch, `*` wildcards allowed: the page a checkout returns to. Applied when a report runs, so a change re-credits every past sale."},"excludedIps":{"type":"array","maxItems":100,"items":{"type":"string","minLength":1,"maxLength":64},"description":"IP addresses and CIDR ranges whose events ingest drops. No visitor IP is stored, so a change reaches new events only."},"excludedPaths":{"type":"array","maxItems":100,"items":{"type":"string","minLength":1,"maxLength":500,"pattern":"^\\/.*"},"description":"Paths whose events ingest drops, `*` wildcards allowed. A change reaches new events only."},"extraHostnames":{"type":"array","maxItems":20,"items":{"type":"string","minLength":1,"maxLength":253,"pattern":"^(?:\\*\\.)?(?:(?!-)[a-z0-9-]{0,62}[a-z0-9]\\.)+[a-z]{2,63}$"},"description":"Hostnames ingest counts besides the domain and its subdomains: an exact name, or `*.example.com` for that domain and its subdomains. A change reaches new events only."}}}}}},"parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string","description":"The site: its domain as registered (example.com), or its site id."}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"domain":{"type":"string","description":"The site's hostname, which also names it in a path."},"timezone":{"type":"string","description":"IANA timezone every day boundary falls in."},"reportingCurrency":{"type":"string","description":"ISO 4217 code every amount is reported in. It changes in the dashboard's Revenue settings, which convert the past sales to it."},"attributionModel":{"enum":["last","first","linear"],"type":"string","description":"Which pageview before a sale takes its credit in revenue split by page, source or campaign: the last, the first, or every one equally (`linear`). Applied when a report runs, so a change re-credits every past sale."},"attributionLookback":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Days before a sale a pageview may lie and still earn credit: 7, 14, 30 or 90. Applied when a report runs, so a change re-credits every past sale."},"thankYouPaths":{"type":"array","items":{"type":"string"},"description":"Paths attribution never credits as a touch, `*` wildcards allowed: the page a checkout returns to. Applied when a report runs, so a change re-credits every past sale."},"excludedIps":{"type":"array","items":{"type":"string"},"description":"IP addresses and CIDR ranges whose events ingest drops. Left out of a read key's answer, since an address is personal data."},"excludedPaths":{"type":"array","items":{"type":"string"},"description":"Paths whose events ingest drops, `*` wildcards allowed. A change reaches new events only."},"extraHostnames":{"type":"array","items":{"type":"string"},"description":"Hostnames ingest counts besides the domain and its subdomains: an exact name, or `*.example.com` for that domain and its subdomains. A change reaches new events only."},"proxyPath":{"type":"string","description":"The path the site's first-party proxy serves the script and takes events on, such as /3f9a1c2b7e."},"secretHint":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The last four characters of the site secret a proxy or backend sends. Null while the site has none: Installation settings in the dashboard creates it."},"firstEventAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}],"description":"ISO 8601 in UTC: the site's earliest event. Null before the first one."},"createdAt":{"type":"string","format":"date-time","x-native-type":"date","description":"ISO 8601 in UTC: when the site was added."}},"required":["id","name","domain","timezone","reportingCurrency","attributionModel","attributionLookback","thankYouPaths","excludedPaths","extraHostnames","proxyPath","secretHint","firstEventAt","createdAt"]}},"required":["data"]}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"}}},"400":{"$ref":"#/components/responses/WriteError400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/WriteError403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/WriteError409"},"413":{"$ref":"#/components/responses/WriteError413"},"422":{"$ref":"#/components/responses/WriteError422"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}}}},"/sites/{site}/install":{"get":{"operationId":"getInstallStatus","summary":"Get the install status","description":"Whether the site's snippet works: when its first event arrived, when its last one did, and what ingest refused on the way. The figures are the Installation settings card's. A site with no first event, refused hosts or filtered events usually runs the snippet on a host the site does not count, or behind a proxy without its secret.","tags":["Sites"],"parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string","description":"The site: its domain as registered (example.com), or its site id."}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"installed":{"type":"boolean","description":"Whether the site has ever received an event."},"firstEventAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}],"description":"ISO 8601 in UTC: when the first event arrived. Null before it."},"lastSeen":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}],"description":"ISO 8601 in UTC: when the last browsing event arrived. Null before the first."},"proxyEventAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}],"description":"ISO 8601 in UTC: when the first event arrived through the site's proxy path. Null before it."},"filtered":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Events ingest left out of the stats in the last 24 hours: bots, spam, excluded IPs."},"proxyHits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Events a proxy sent without the site's secret in the last hour, which were refused. Above 0, the proxy's secret is missing or wrong."},"rejected":{"anyOf":[{"type":"object","properties":{"hostname":{"type":"string"},"hits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Events refused from the host in the last 24 hours."},"isParent":{"type":"boolean","description":"Whether the site's domain sits under the host, as www.example.com under example.com."},"allowable":{"type":"boolean","description":"Whether the site's extra hostnames would accept the host."}},"required":["hostname","hits","isParent","allowable"]},{"type":"null"}],"description":"The host that sent the most refused events in the last 24 hours: one the site does not count. Null when there is none."},"local":{"anyOf":[{"type":"object","properties":{"hostname":{"type":"string"},"hits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Events refused from the host in the last 24 hours."}},"required":["hostname","hits"]},{"type":"null"}],"description":"A local development host (localhost, 127.0.0.1) the site refused events from. Null when there is none."}},"required":["installed","firstEventAt","lastSeen","proxyEventAt","filtered","proxyHits","rejected","local"]}},"required":["data"]}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"422":{"$ref":"#/components/responses/Error422"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}}}},"/sites/{site}/filter-values/{dimension}":{"get":{"operationId":"getFilterValues","summary":"Get a dimension's values","description":"The values a filter dimension takes in the range, most visitors first, as the dashboard's filter picker offers them. Each `value` goes straight into a `filter` parameter. Every other `filter` still narrows the list; one on the listed dimension is ignored. `dimension=property` lists the property keys, or one key's values with `key`. A list: `{ data, nextCursor, meta }`. Walk it by passing `nextCursor` as `cursor`; the last page answers `nextCursor: null`. Reuse a cursor only with the same parameters.","tags":["Discovery"],"parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string","description":"The site: its domain as registered (example.com), or its site id."}},{"name":"dimension","in":"path","required":true,"schema":{"enum":["page_path","entry_page","exit_page","hostname","country","region","city","browser","os","device_type","referrer_source","referrer_domain","referrer_channel","utm_source","utm_medium","utm_campaign","utm_content","utm_term","event_name","property"],"type":"string","description":"The filter dimension to list. A goal's values are the goals report's."}},{"name":"period","in":"query","schema":{"anyOf":[{"enum":["day","week","month","year","all","custom"],"type":"string"},{"type":"string","pattern":"^([1-9]\\d{0,3})(mo|m|h|d|w)$"}],"default":"7d","description":"The range: a calendar unit (day, week, month, year) positioned by `date`; a window ending now as a count and unit, m h d w mo (30m, 24h, 7d, 2w, 3mo); all; or custom, which reads `from` and `to`. Defaults to 7d."},"allowEmptyValue":true,"allowReserved":true},{"name":"date","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Which day/week/month/year a unit preset refers to, YYYY-MM-DD in the site's timezone. Omitted means the current one."},"allowEmptyValue":true,"allowReserved":true},{"name":"from","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"First day of a custom range, YYYY-MM-DD, inclusive."},"allowEmptyValue":true,"allowReserved":true},{"name":"to","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Last day of a custom range, YYYY-MM-DD, inclusive."},"allowEmptyValue":true,"allowReserved":true},{"name":"filter","in":"query","schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"default":[],"description":"Repeatable filter, written dimension[.key]:operator:value. Only the first two colons separate, so values may contain them. Dimensions: page_path, entry_page, exit_page, hostname, country, region, city, browser, os, device_type, referrer_source, referrer_domain, referrer_channel, utm_source, utm_medium, utm_campaign, utm_content, utm_term, event_name, goal, property (property and goal take a key). Operators: is, is_not, contains; country, region, goal take is and is_not only. A region takes the name the locations report gives it, an ISO 3166-2 code (region:is:DE-BY). Examples: filter=country:is:DE, filter=property.plan:is:pro. Repeat the parameter to combine up to 20 filters; they all have to match."},"allowEmptyValue":true,"allowReserved":true},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":500,"default":20,"description":"Page size, largest first. 1–500, default 20. Not a cap on the whole list."},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","schema":{"type":"string","minLength":1,"maxLength":8192,"description":"Opaque cursor from the previous page's `nextCursor`. Omit for the first page (largest rows). Reuse it only with the same site, range, filters and tab/dimension. The last page answers `nextCursor: null`."},"allowEmptyValue":true,"allowReserved":true},{"name":"key","in":"query","schema":{"type":"string","minLength":1,"maxLength":200,"description":"A property key, for `dimension=property`: list its values."},"allowEmptyValue":true,"allowReserved":true},{"name":"search","in":"query","schema":{"type":"string","minLength":1,"maxLength":200,"description":"Keep the values containing this text, any case."},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string","description":"A value the dimension takes, written as a filter takes it. With `dimension=property` and no `key`, a property key. For referrer_source and referrer_domain an empty string is direct traffic."},"visitors":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Distinct visitors carrying the value in the range."}},"required":["value","visitors"]}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Pass as `cursor` for the next page. Null on the last page."},"meta":{"type":"object","properties":{"timezone":{"type":"string","description":"The site's timezone, which every day boundary falls in."},"currency":{"type":"string","description":"ISO 4217 code of every amount in the response."},"range":{"anyOf":[{"type":"object","properties":{"from":{"type":"string","description":"ISO 8601, inclusive."},"to":{"type":"string","description":"ISO 8601, exclusive."}},"required":["from","to"]},{"type":"null"}],"description":"The instants the period resolved to."},"compare":{"anyOf":[{"type":"object","properties":{"from":{"type":"string","description":"ISO 8601, inclusive."},"to":{"type":"string","description":"ISO 8601, exclusive."}},"required":["from","to"]},{"type":"null"}],"description":"The comparison range, when one was asked for."}},"required":["timezone","currency","range","compare"]}},"required":["data","nextCursor","meta"]}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"422":{"$ref":"#/components/responses/Error422"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}}}},"/sites/{site}/catalog/{kind}":{"get":{"operationId":"getCatalog","summary":"Get the pages or events ever sent","description":"Every page path (`page`) or custom event name (`event`) the site has sent over its whole history, the most sent first: the names a goal or a funnel step can match. It reads no range. A list: `{ data, nextCursor }`. Walk it by passing `nextCursor` as `cursor`; the last page answers `nextCursor: null`. Reuse a cursor only with the same parameters.","tags":["Discovery"],"parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string","description":"The site: its domain as registered (example.com), or its site id."}},{"name":"kind","in":"path","required":true,"schema":{"enum":["page","event"],"type":"string","description":"Page paths or custom event names."}},{"name":"search","in":"query","schema":{"type":"string","minLength":1,"maxLength":200,"description":"Keep the names containing this text, any case."},"allowEmptyValue":true,"allowReserved":true},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":500,"default":20,"description":"Page size, largest first. 1–500, default 20. Not a cap on the whole list."},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","schema":{"type":"string","minLength":1,"maxLength":8192,"description":"Opaque cursor from the previous page's `nextCursor`. Omit for the first page (largest rows). Reuse it only with the same site, range, filters and tab/dimension. The last page answers `nextCursor: null`."},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"The page path or the custom event name."},"firstSeen":{"type":"string","format":"date-time","x-native-type":"date","description":"ISO 8601 in UTC: when the site first sent it."},"lastSeen":{"type":"string","format":"date-time","x-native-type":"date","description":"ISO 8601 in UTC: when the site last sent it."},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many times the site has sent it."}},"required":["name","firstSeen","lastSeen","count"]}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Pass as `cursor` for the next page. Null on the last page."}},"required":["data","nextCursor"]}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"422":{"$ref":"#/components/responses/Error422"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}}}},"/sites/{site}/realtime":{"get":{"operationId":"getRealtime","summary":"Visitors online now","description":"Visitors active in the last five minutes.","tags":["Stats"],"parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string","description":"The site: its domain as registered (example.com), or its site id."}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"visitors":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Visitors active in the last five minutes."}},"required":["visitors"]},"meta":{"type":"object","properties":{"timezone":{"type":"string","description":"The site's timezone, which every day boundary falls in."},"currency":{"type":"string","description":"ISO 4217 code of every amount in the response."},"range":{"anyOf":[{"type":"object","properties":{"from":{"type":"string","description":"ISO 8601, inclusive."},"to":{"type":"string","description":"ISO 8601, exclusive."}},"required":["from","to"]},{"type":"null"}],"description":"The instants the period resolved to."},"compare":{"anyOf":[{"type":"object","properties":{"from":{"type":"string","description":"ISO 8601, inclusive."},"to":{"type":"string","description":"ISO 8601, exclusive."}},"required":["from","to"]},{"type":"null"}],"description":"The comparison range, when one was asked for."}},"required":["timezone","currency","range","compare"]}},"required":["data","meta"]}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"422":{"$ref":"#/components/responses/Error422"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}}}},"/sites/{site}/overview":{"get":{"operationId":"getOverview","summary":"Headline figures","description":"Visitors, sessions, pageviews, bounce rate, session duration, custom events and revenue for the range, and the comparison range's beside them when one is asked for.","tags":["Stats"],"parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string","description":"The site: its domain as registered (example.com), or its site id."}},{"name":"period","in":"query","schema":{"anyOf":[{"enum":["day","week","month","year","all","custom"],"type":"string"},{"type":"string","pattern":"^([1-9]\\d{0,3})(mo|m|h|d|w)$"}],"default":"7d","description":"The range: a calendar unit (day, week, month, year) positioned by `date`; a window ending now as a count and unit, m h d w mo (30m, 24h, 7d, 2w, 3mo); all; or custom, which reads `from` and `to`. Defaults to 7d."},"allowEmptyValue":true,"allowReserved":true},{"name":"date","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Which day/week/month/year a unit preset refers to, YYYY-MM-DD in the site's timezone. Omitted means the current one."},"allowEmptyValue":true,"allowReserved":true},{"name":"from","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"First day of a custom range, YYYY-MM-DD, inclusive."},"allowEmptyValue":true,"allowReserved":true},{"name":"to","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Last day of a custom range, YYYY-MM-DD, inclusive."},"allowEmptyValue":true,"allowReserved":true},{"name":"filter","in":"query","schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"default":[],"description":"Repeatable filter, written dimension[.key]:operator:value. Only the first two colons separate, so values may contain them. Dimensions: page_path, entry_page, exit_page, hostname, country, region, city, browser, os, device_type, referrer_source, referrer_domain, referrer_channel, utm_source, utm_medium, utm_campaign, utm_content, utm_term, event_name, goal, property (property and goal take a key). Operators: is, is_not, contains; country, region, goal take is and is_not only. A region takes the name the locations report gives it, an ISO 3166-2 code (region:is:DE-BY). Examples: filter=country:is:DE, filter=property.plan:is:pro. Repeat the parameter to combine up to 20 filters; they all have to match."},"allowEmptyValue":true,"allowReserved":true},{"name":"compare","in":"query","schema":{"enum":["off","previous","year","custom"],"type":"string","default":"off","description":"Comparison period, always the range's own length moved: off, previous (the range immediately before), year (the same range a year earlier), or custom (starting on compareFrom). Defaults to off."},"allowEmptyValue":true,"allowReserved":true},{"name":"compareFrom","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"First day of a custom comparison, YYYY-MM-DD; it runs for the range's length."},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"pageviews":{"type":"integer","minimum":0,"maximum":9007199254740991},"visitors":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Distinct visitors."},"sessions":{"type":"integer","minimum":0,"maximum":9007199254740991},"bounceRate":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Percent, 0 to 100. Sessions that bounced, to one decimal. Null when no session in the range counts."},"avgDuration":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Seconds. Engaged time per session, to one decimal. Null when no session in the range counts."},"events":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Custom events fired in the range, system events excluded."},"revenue":{"type":"number","description":"Integer, minor units of the site's reporting currency (cents for USD). Every sale in the range, refunds netted."},"buyers":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Distinct visitors with a sale in the range."},"purchaserRate":{"type":"number","description":"Percent, 0 to 100. Buyers among the visitors."},"revenuePerVisitor":{"type":"number","description":"Minor units of the site's reporting currency (cents for USD), unrounded, so it may carry a fraction. Revenue per visitor."},"importedExcluded":{"type":"boolean","description":"True when the range holds days imported from another tool that these figures leave out: a filter or a breakdown the imported daily totals cannot answer."},"importedPartial":{"type":"boolean","description":"True when days imported from another tool count only visitors under this filter, so the sessions and pageviews leave those days out."},"hasRevenue":{"type":"boolean","description":"Whether the site has ever recorded a sale."},"previous":{"type":"object","properties":{"pageviews":{"type":"integer","minimum":0,"maximum":9007199254740991},"visitors":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Distinct visitors."},"sessions":{"type":"integer","minimum":0,"maximum":9007199254740991},"bounceRate":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Percent, 0 to 100. Sessions that bounced, to one decimal. Null when no session in the range counts."},"avgDuration":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Seconds. Engaged time per session, to one decimal. Null when no session in the range counts."},"events":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Custom events fired in the range, system events excluded."},"revenue":{"type":"number","description":"Integer, minor units of the site's reporting currency (cents for USD). Every sale in the range, refunds netted."},"buyers":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Distinct visitors with a sale in the range."},"purchaserRate":{"type":"number","description":"Percent, 0 to 100. Buyers among the visitors."},"revenuePerVisitor":{"type":"number","description":"Minor units of the site's reporting currency (cents for USD), unrounded, so it may carry a fraction. Revenue per visitor."},"importedExcluded":{"type":"boolean","description":"True when the range holds days imported from another tool that these figures leave out: a filter or a breakdown the imported daily totals cannot answer."},"importedPartial":{"type":"boolean","description":"True when days imported from another tool count only visitors under this filter, so the sessions and pageviews leave those days out."}},"required":["pageviews","visitors","sessions","bounceRate","avgDuration","events","revenue"],"description":"The comparison range's figures, when asked for."}},"required":["pageviews","visitors","sessions","bounceRate","avgDuration","events","revenue","hasRevenue"]},"meta":{"type":"object","properties":{"timezone":{"type":"string","description":"The site's timezone, which every day boundary falls in."},"currency":{"type":"string","description":"ISO 4217 code of every amount in the response."},"range":{"anyOf":[{"type":"object","properties":{"from":{"type":"string","description":"ISO 8601, inclusive."},"to":{"type":"string","description":"ISO 8601, exclusive."}},"required":["from","to"]},{"type":"null"}],"description":"The instants the period resolved to."},"compare":{"anyOf":[{"type":"object","properties":{"from":{"type":"string","description":"ISO 8601, inclusive."},"to":{"type":"string","description":"ISO 8601, exclusive."}},"required":["from","to"]},{"type":"null"}],"description":"The comparison range, when one was asked for."}},"required":["timezone","currency","range","compare"]}},"required":["data","meta"]}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"422":{"$ref":"#/components/responses/Error422"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}}}},"/sites/{site}/timeseries":{"get":{"operationId":"getTimeseries","summary":"Figures per time bucket","description":"The headline figures per bucket, every bucket of the range included, empty ones as zeros. The bucket size comes back as `granularity`.","tags":["Stats"],"parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string","description":"The site: its domain as registered (example.com), or its site id."}},{"name":"period","in":"query","schema":{"anyOf":[{"enum":["day","week","month","year","all","custom"],"type":"string"},{"type":"string","pattern":"^([1-9]\\d{0,3})(mo|m|h|d|w)$"}],"default":"7d","description":"The range: a calendar unit (day, week, month, year) positioned by `date`; a window ending now as a count and unit, m h d w mo (30m, 24h, 7d, 2w, 3mo); all; or custom, which reads `from` and `to`. Defaults to 7d."},"allowEmptyValue":true,"allowReserved":true},{"name":"date","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Which day/week/month/year a unit preset refers to, YYYY-MM-DD in the site's timezone. Omitted means the current one."},"allowEmptyValue":true,"allowReserved":true},{"name":"from","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"First day of a custom range, YYYY-MM-DD, inclusive."},"allowEmptyValue":true,"allowReserved":true},{"name":"to","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Last day of a custom range, YYYY-MM-DD, inclusive."},"allowEmptyValue":true,"allowReserved":true},{"name":"filter","in":"query","schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"default":[],"description":"Repeatable filter, written dimension[.key]:operator:value. Only the first two colons separate, so values may contain them. Dimensions: page_path, entry_page, exit_page, hostname, country, region, city, browser, os, device_type, referrer_source, referrer_domain, referrer_channel, utm_source, utm_medium, utm_campaign, utm_content, utm_term, event_name, goal, property (property and goal take a key). Operators: is, is_not, contains; country, region, goal take is and is_not only. A region takes the name the locations report gives it, an ISO 3166-2 code (region:is:DE-BY). Examples: filter=country:is:DE, filter=property.plan:is:pro. Repeat the parameter to combine up to 20 filters; they all have to match."},"allowEmptyValue":true,"allowReserved":true},{"name":"compare","in":"query","schema":{"enum":["off","previous","year","custom"],"type":"string","default":"off","description":"Comparison period, always the range's own length moved: off, previous (the range immediately before), year (the same range a year earlier), or custom (starting on compareFrom). Defaults to off."},"allowEmptyValue":true,"allowReserved":true},{"name":"compareFrom","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"First day of a custom comparison, YYYY-MM-DD; it runs for the range's length."},"allowEmptyValue":true,"allowReserved":true},{"name":"event","in":"query","schema":{"type":"string","maxLength":200,"description":"Count this custom event per bucket instead of pageviews."},"allowEmptyValue":true,"allowReserved":true},{"name":"granularity","in":"query","schema":{"enum":["hour","day","week","month"],"type":"string","description":"The bucket size. Absent, it follows the range's length. A size is on offer when the range holds 3 to 400 of its buckets (hours only over days that were not imported); one that is not falls back to the range's own size."},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"granularity":{"enum":["minute","hour","day","week","month"],"type":"string","description":"The bucket size."},"rows":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string","description":"The bucket's start, in the site's timezone."},"pageviews":{"type":"integer","minimum":0,"maximum":9007199254740991},"visitors":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Distinct visitors."},"sessions":{"type":"integer","minimum":0,"maximum":9007199254740991},"bounceRate":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Percent, 0 to 100. Sessions that bounced, to one decimal. Null when no session in the range counts."},"avgDuration":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Seconds. Engaged time per session, to one decimal. Null when no session in the range counts."},"revenue":{"type":"number","description":"Integer, minor units of the site's reporting currency (cents for USD). Sales in the bucket, refunds netted."},"refunded":{"type":"number","description":"Integer, minor units of the site's reporting currency (cents for USD). Refunds in the bucket, already netted."},"paidOrders":{"type":"integer","minimum":0,"maximum":9007199254740991},"averageOrder":{"type":"number","description":"Minor units of the site's reporting currency (cents for USD), unrounded, so it may carry a fraction. Revenue per paid order."},"revenuePerVisitor":{"type":"number","description":"Minor units of the site's reporting currency (cents for USD), unrounded, so it may carry a fraction. Revenue per visitor."},"buyers":{"type":"integer","minimum":0,"maximum":9007199254740991},"purchaserRate":{"type":"number","description":"Percent, 0 to 100. Buyers among the visitors."},"previous":{"type":"object","properties":{"date":{"type":"string","description":"The bucket's start, in the site's timezone."},"pageviews":{"type":"integer","minimum":0,"maximum":9007199254740991},"visitors":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Distinct visitors."},"sessions":{"type":"integer","minimum":0,"maximum":9007199254740991},"bounceRate":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Percent, 0 to 100. Sessions that bounced, to one decimal. Null when no session in the range counts."},"avgDuration":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Seconds. Engaged time per session, to one decimal. Null when no session in the range counts."},"revenue":{"type":"number","description":"Integer, minor units of the site's reporting currency (cents for USD). Sales in the bucket, refunds netted."},"refunded":{"type":"number","description":"Integer, minor units of the site's reporting currency (cents for USD). Refunds in the bucket, already netted."},"paidOrders":{"type":"integer","minimum":0,"maximum":9007199254740991},"averageOrder":{"type":"number","description":"Minor units of the site's reporting currency (cents for USD), unrounded, so it may carry a fraction. Revenue per paid order."},"revenuePerVisitor":{"type":"number","description":"Minor units of the site's reporting currency (cents for USD), unrounded, so it may carry a fraction. Revenue per visitor."},"buyers":{"type":"integer","minimum":0,"maximum":9007199254740991},"purchaserRate":{"type":"number","description":"Percent, 0 to 100. Buyers among the visitors."}},"required":["date","pageviews","visitors","sessions","bounceRate","avgDuration","revenue","refunded","paidOrders","averageOrder","revenuePerVisitor"],"description":"The comparison range's bucket at the same position, when asked for."}},"required":["date","pageviews","visitors","sessions","bounceRate","avgDuration","revenue","refunded","paidOrders","averageOrder","revenuePerVisitor"]}},"importedExcluded":{"type":"boolean","description":"True when the range holds days imported from another tool that these figures leave out: a filter or a breakdown the imported daily totals cannot answer."}},"required":["granularity","rows"]},"meta":{"type":"object","properties":{"timezone":{"type":"string","description":"The site's timezone, which every day boundary falls in."},"currency":{"type":"string","description":"ISO 4217 code of every amount in the response."},"range":{"anyOf":[{"type":"object","properties":{"from":{"type":"string","description":"ISO 8601, inclusive."},"to":{"type":"string","description":"ISO 8601, exclusive."}},"required":["from","to"]},{"type":"null"}],"description":"The instants the period resolved to."},"compare":{"anyOf":[{"type":"object","properties":{"from":{"type":"string","description":"ISO 8601, inclusive."},"to":{"type":"string","description":"ISO 8601, exclusive."}},"required":["from","to"]},{"type":"null"}],"description":"The comparison range, when one was asked for."}},"required":["timezone","currency","range","compare"]}},"required":["data","meta"]}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"422":{"$ref":"#/components/responses/Error422"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}}}},"/sites/{site}/pages":{"get":{"operationId":"getPages","summary":"Pages","description":"Pages in the range, largest first. A list: `{ data, nextCursor, meta }`. Walk it by passing `nextCursor` as `cursor`; the last page answers `nextCursor: null`. `limit` is the page size (1–500, default 20), not a cap on the whole list. Reuse a cursor only with the same site, range, filters and view. Row `revenue` is attributed by the site's attribution model and lookback, with its thank-you pages excluded, the same as the dashboard's. A direct visit earns credit only when every visit before the sale was direct.","tags":["Stats"],"parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string","description":"The site: its domain as registered (example.com), or its site id."}},{"name":"period","in":"query","schema":{"anyOf":[{"enum":["day","week","month","year","all","custom"],"type":"string"},{"type":"string","pattern":"^([1-9]\\d{0,3})(mo|m|h|d|w)$"}],"default":"7d","description":"The range: a calendar unit (day, week, month, year) positioned by `date`; a window ending now as a count and unit, m h d w mo (30m, 24h, 7d, 2w, 3mo); all; or custom, which reads `from` and `to`. Defaults to 7d."},"allowEmptyValue":true,"allowReserved":true},{"name":"date","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Which day/week/month/year a unit preset refers to, YYYY-MM-DD in the site's timezone. Omitted means the current one."},"allowEmptyValue":true,"allowReserved":true},{"name":"from","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"First day of a custom range, YYYY-MM-DD, inclusive."},"allowEmptyValue":true,"allowReserved":true},{"name":"to","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Last day of a custom range, YYYY-MM-DD, inclusive."},"allowEmptyValue":true,"allowReserved":true},{"name":"filter","in":"query","schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"default":[],"description":"Repeatable filter, written dimension[.key]:operator:value. Only the first two colons separate, so values may contain them. Dimensions: page_path, entry_page, exit_page, hostname, country, region, city, browser, os, device_type, referrer_source, referrer_domain, referrer_channel, utm_source, utm_medium, utm_campaign, utm_content, utm_term, event_name, goal, property (property and goal take a key). Operators: is, is_not, contains; country, region, goal take is and is_not only. A region takes the name the locations report gives it, an ISO 3166-2 code (region:is:DE-BY). Examples: filter=country:is:DE, filter=property.plan:is:pro. Repeat the parameter to combine up to 20 filters; they all have to match."},"allowEmptyValue":true,"allowReserved":true},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":500,"default":20,"description":"Page size, largest first. 1–500, default 20. Not a cap on the whole list."},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","schema":{"type":"string","minLength":1,"maxLength":8192,"description":"Opaque cursor from the previous page's `nextCursor`. Omit for the first page (largest rows). Reuse it only with the same site, range, filters and tab/dimension. The last page answers `nextCursor: null`."},"allowEmptyValue":true,"allowReserved":true},{"name":"tab","in":"query","schema":{"enum":["top","entry","exit","not_found","hostnames"],"type":"string","default":"top","description":"Which page list: top (every pageview), entry or exit (the session's first or last page), not_found (404s), hostnames (the tracked host each pageview hit)."},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"The page path, or the hostname on the hostnames tab."},"visitors":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Distinct visitors."},"count":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Pageviews (top, hostnames), entrances (entry), exits (exit) or hits (not_found)."},"exitRate":{"type":"number","description":"Percent, 0 to 100. Exit tab only: exits per pageview."},"avgDuration":{"type":"number","description":"Seconds. Top tab only: engaged time per view."},"linkedFrom":{"type":"string","description":"not_found tab only: the page that most often linked here, or an empty string."},"conversionRate":{"type":"number","description":"Percent, 0 to 100. Visitors of the row that converted. Only under a goal filter: a saved goal, an event name or a property."},"revenue":{"type":"number","description":"Integer, minor units of the site's reporting currency (cents for USD)."},"orders":{"type":"number","description":"Orders credited to the row by the attribution weights, to two decimals."}},"required":["path","visitors","count","revenue","orders"]}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Null on the last page."},"importedExcluded":{"type":"boolean","description":"True when the range holds days imported from another tool that these figures leave out: a filter or a breakdown the imported daily totals cannot answer."},"meta":{"type":"object","properties":{"timezone":{"type":"string","description":"The site's timezone, which every day boundary falls in."},"currency":{"type":"string","description":"ISO 4217 code of every amount in the response."},"range":{"anyOf":[{"type":"object","properties":{"from":{"type":"string","description":"ISO 8601, inclusive."},"to":{"type":"string","description":"ISO 8601, exclusive."}},"required":["from","to"]},{"type":"null"}],"description":"The instants the period resolved to."},"compare":{"anyOf":[{"type":"object","properties":{"from":{"type":"string","description":"ISO 8601, inclusive."},"to":{"type":"string","description":"ISO 8601, exclusive."}},"required":["from","to"]},{"type":"null"}],"description":"The comparison range, when one was asked for."}},"required":["timezone","currency","range","compare"]}},"required":["data","nextCursor","meta"]}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"422":{"$ref":"#/components/responses/Error422"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}}}},"/sites/{site}/sources":{"get":{"operationId":"getSources","summary":"Traffic sources","description":"Traffic sources in the range, largest first. A list: `{ data, nextCursor, meta }`. Walk it by passing `nextCursor` as `cursor`; the last page answers `nextCursor: null`. `limit` is the page size (1–500, default 20), not a cap on the whole list. Reuse a cursor only with the same site, range, filters and view. Row `revenue` is attributed by the site's attribution model and lookback, with its thank-you pages excluded, the same as the dashboard's. A direct visit earns credit only when every visit before the sale was direct.","tags":["Stats"],"parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string","description":"The site: its domain as registered (example.com), or its site id."}},{"name":"period","in":"query","schema":{"anyOf":[{"enum":["day","week","month","year","all","custom"],"type":"string"},{"type":"string","pattern":"^([1-9]\\d{0,3})(mo|m|h|d|w)$"}],"default":"7d","description":"The range: a calendar unit (day, week, month, year) positioned by `date`; a window ending now as a count and unit, m h d w mo (30m, 24h, 7d, 2w, 3mo); all; or custom, which reads `from` and `to`. Defaults to 7d."},"allowEmptyValue":true,"allowReserved":true},{"name":"date","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Which day/week/month/year a unit preset refers to, YYYY-MM-DD in the site's timezone. Omitted means the current one."},"allowEmptyValue":true,"allowReserved":true},{"name":"from","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"First day of a custom range, YYYY-MM-DD, inclusive."},"allowEmptyValue":true,"allowReserved":true},{"name":"to","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Last day of a custom range, YYYY-MM-DD, inclusive."},"allowEmptyValue":true,"allowReserved":true},{"name":"filter","in":"query","schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"default":[],"description":"Repeatable filter, written dimension[.key]:operator:value. Only the first two colons separate, so values may contain them. Dimensions: page_path, entry_page, exit_page, hostname, country, region, city, browser, os, device_type, referrer_source, referrer_domain, referrer_channel, utm_source, utm_medium, utm_campaign, utm_content, utm_term, event_name, goal, property (property and goal take a key). Operators: is, is_not, contains; country, region, goal take is and is_not only. A region takes the name the locations report gives it, an ISO 3166-2 code (region:is:DE-BY). Examples: filter=country:is:DE, filter=property.plan:is:pro. Repeat the parameter to combine up to 20 filters; they all have to match."},"allowEmptyValue":true,"allowReserved":true},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":500,"default":20,"description":"Page size, largest first. 1–500, default 20. Not a cap on the whole list."},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","schema":{"type":"string","minLength":1,"maxLength":8192,"description":"Opaque cursor from the previous page's `nextCursor`. Omit for the first page (largest rows). Reuse it only with the same site, range, filters and tab/dimension. The last page answers `nextCursor: null`."},"allowEmptyValue":true,"allowReserved":true},{"name":"tab","in":"query","schema":{"enum":["referrers","channels"],"type":"string","default":"referrers","description":"Which grouping: referrers (the source itself) or channels (search, social, AI, …)."},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"The referrer source. An empty string is direct traffic: visits with no referrer, or with a page of the site itself as the referrer. The channels tab names that row Direct."},"visitors":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Distinct visitors."},"conversionRate":{"type":"number","description":"Percent, 0 to 100. Visitors of the row that converted. Only under a goal filter: a saved goal, an event name or a property."},"bounceRate":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Percent, 0 to 100. Sessions that bounced, to one decimal. Null when no session in the range counts."},"avgDuration":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Seconds. Engaged time per session, to one decimal. Null when no session in the range counts."},"revenue":{"type":"number","description":"Integer, minor units of the site's reporting currency (cents for USD)."},"orders":{"type":"number","description":"Orders credited to the row by the attribution weights, to two decimals."},"domain":{"type":"string","description":"A host for the source's favicon, or an empty string. On the direct row it is often the site's own host."},"pageviews":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["name","visitors","bounceRate","avgDuration","revenue","orders","domain","pageviews"]}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Null on the last page."},"importedExcluded":{"type":"boolean","description":"True when the range holds days imported from another tool that these figures leave out: a filter or a breakdown the imported daily totals cannot answer."},"meta":{"type":"object","properties":{"timezone":{"type":"string","description":"The site's timezone, which every day boundary falls in."},"currency":{"type":"string","description":"ISO 4217 code of every amount in the response."},"range":{"anyOf":[{"type":"object","properties":{"from":{"type":"string","description":"ISO 8601, inclusive."},"to":{"type":"string","description":"ISO 8601, exclusive."}},"required":["from","to"]},{"type":"null"}],"description":"The instants the period resolved to."},"compare":{"anyOf":[{"type":"object","properties":{"from":{"type":"string","description":"ISO 8601, inclusive."},"to":{"type":"string","description":"ISO 8601, exclusive."}},"required":["from","to"]},{"type":"null"}],"description":"The comparison range, when one was asked for."}},"required":["timezone","currency","range","compare"]}},"required":["data","nextCursor","meta"]}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"422":{"$ref":"#/components/responses/Error422"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}}}},"/sites/{site}/devices":{"get":{"operationId":"getDevices","summary":"Browsers, operating systems and device types","description":"The device breakdown, largest first. A list: `{ data, nextCursor, meta }`. Walk it by passing `nextCursor` as `cursor`; the last page answers `nextCursor: null`. `limit` is the page size (1–500, default 20), not a cap on the whole list. Reuse a cursor only with the same site, range, filters and view. Row `revenue` is attributed by the site's attribution model and lookback, with its thank-you pages excluded, the same as the dashboard's. A direct visit earns credit only when every visit before the sale was direct.","tags":["Stats"],"parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string","description":"The site: its domain as registered (example.com), or its site id."}},{"name":"period","in":"query","schema":{"anyOf":[{"enum":["day","week","month","year","all","custom"],"type":"string"},{"type":"string","pattern":"^([1-9]\\d{0,3})(mo|m|h|d|w)$"}],"default":"7d","description":"The range: a calendar unit (day, week, month, year) positioned by `date`; a window ending now as a count and unit, m h d w mo (30m, 24h, 7d, 2w, 3mo); all; or custom, which reads `from` and `to`. Defaults to 7d."},"allowEmptyValue":true,"allowReserved":true},{"name":"date","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Which day/week/month/year a unit preset refers to, YYYY-MM-DD in the site's timezone. Omitted means the current one."},"allowEmptyValue":true,"allowReserved":true},{"name":"from","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"First day of a custom range, YYYY-MM-DD, inclusive."},"allowEmptyValue":true,"allowReserved":true},{"name":"to","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Last day of a custom range, YYYY-MM-DD, inclusive."},"allowEmptyValue":true,"allowReserved":true},{"name":"filter","in":"query","schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"default":[],"description":"Repeatable filter, written dimension[.key]:operator:value. Only the first two colons separate, so values may contain them. Dimensions: page_path, entry_page, exit_page, hostname, country, region, city, browser, os, device_type, referrer_source, referrer_domain, referrer_channel, utm_source, utm_medium, utm_campaign, utm_content, utm_term, event_name, goal, property (property and goal take a key). Operators: is, is_not, contains; country, region, goal take is and is_not only. A region takes the name the locations report gives it, an ISO 3166-2 code (region:is:DE-BY). Examples: filter=country:is:DE, filter=property.plan:is:pro. Repeat the parameter to combine up to 20 filters; they all have to match."},"allowEmptyValue":true,"allowReserved":true},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":500,"default":20,"description":"Page size, largest first. 1–500, default 20. Not a cap on the whole list."},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","schema":{"type":"string","minLength":1,"maxLength":8192,"description":"Opaque cursor from the previous page's `nextCursor`. Omit for the first page (largest rows). Reuse it only with the same site, range, filters and tab/dimension. The last page answers `nextCursor: null`."},"allowEmptyValue":true,"allowReserved":true},{"name":"dimension","in":"query","schema":{"enum":["browser","os","device_type"],"type":"string","default":"browser","description":"Which device dimension to break down by."},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"The browser, operating system or device type. An empty string is one that could not be recognised."},"visitors":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Distinct visitors."},"conversionRate":{"type":"number","description":"Percent, 0 to 100. Visitors of the row that converted. Only under a goal filter: a saved goal, an event name or a property."},"bounceRate":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Percent, 0 to 100. Sessions that bounced, to one decimal. Null when no session in the range counts."},"avgDuration":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Seconds. Engaged time per session, to one decimal. Null when no session in the range counts."},"revenue":{"type":"number","description":"Integer, minor units of the site's reporting currency (cents for USD)."},"orders":{"type":"number","description":"Orders credited to the row by the attribution weights, to two decimals."}},"required":["name","visitors","bounceRate","avgDuration","revenue","orders"]}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Null on the last page."},"importedExcluded":{"type":"boolean","description":"True when the range holds days imported from another tool that these figures leave out: a filter or a breakdown the imported daily totals cannot answer."},"meta":{"type":"object","properties":{"timezone":{"type":"string","description":"The site's timezone, which every day boundary falls in."},"currency":{"type":"string","description":"ISO 4217 code of every amount in the response."},"range":{"anyOf":[{"type":"object","properties":{"from":{"type":"string","description":"ISO 8601, inclusive."},"to":{"type":"string","description":"ISO 8601, exclusive."}},"required":["from","to"]},{"type":"null"}],"description":"The instants the period resolved to."},"compare":{"anyOf":[{"type":"object","properties":{"from":{"type":"string","description":"ISO 8601, inclusive."},"to":{"type":"string","description":"ISO 8601, exclusive."}},"required":["from","to"]},{"type":"null"}],"description":"The comparison range, when one was asked for."}},"required":["timezone","currency","range","compare"]}},"required":["data","nextCursor","meta"]}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"422":{"$ref":"#/components/responses/Error422"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}}}},"/sites/{site}/locations":{"get":{"operationId":"getLocations","summary":"Countries, regions and cities","description":"The location breakdown, largest first. A list: `{ data, nextCursor, meta }`. Walk it by passing `nextCursor` as `cursor`; the last page answers `nextCursor: null`. `limit` is the page size (1–500, default 20), not a cap on the whole list. Reuse a cursor only with the same site, range, filters and view. Row `revenue` is attributed by the site's attribution model and lookback, with its thank-you pages excluded, the same as the dashboard's. A direct visit earns credit only when every visit before the sale was direct.","tags":["Stats"],"parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string","description":"The site: its domain as registered (example.com), or its site id."}},{"name":"period","in":"query","schema":{"anyOf":[{"enum":["day","week","month","year","all","custom"],"type":"string"},{"type":"string","pattern":"^([1-9]\\d{0,3})(mo|m|h|d|w)$"}],"default":"7d","description":"The range: a calendar unit (day, week, month, year) positioned by `date`; a window ending now as a count and unit, m h d w mo (30m, 24h, 7d, 2w, 3mo); all; or custom, which reads `from` and `to`. Defaults to 7d."},"allowEmptyValue":true,"allowReserved":true},{"name":"date","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Which day/week/month/year a unit preset refers to, YYYY-MM-DD in the site's timezone. Omitted means the current one."},"allowEmptyValue":true,"allowReserved":true},{"name":"from","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"First day of a custom range, YYYY-MM-DD, inclusive."},"allowEmptyValue":true,"allowReserved":true},{"name":"to","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Last day of a custom range, YYYY-MM-DD, inclusive."},"allowEmptyValue":true,"allowReserved":true},{"name":"filter","in":"query","schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"default":[],"description":"Repeatable filter, written dimension[.key]:operator:value. Only the first two colons separate, so values may contain them. Dimensions: page_path, entry_page, exit_page, hostname, country, region, city, browser, os, device_type, referrer_source, referrer_domain, referrer_channel, utm_source, utm_medium, utm_campaign, utm_content, utm_term, event_name, goal, property (property and goal take a key). Operators: is, is_not, contains; country, region, goal take is and is_not only. A region takes the name the locations report gives it, an ISO 3166-2 code (region:is:DE-BY). Examples: filter=country:is:DE, filter=property.plan:is:pro. Repeat the parameter to combine up to 20 filters; they all have to match."},"allowEmptyValue":true,"allowReserved":true},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":500,"default":20,"description":"Page size, largest first. 1–500, default 20. Not a cap on the whole list."},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","schema":{"type":"string","minLength":1,"maxLength":8192,"description":"Opaque cursor from the previous page's `nextCursor`. Omit for the first page (largest rows). Reuse it only with the same site, range, filters and tab/dimension. The last page answers `nextCursor: null`."},"allowEmptyValue":true,"allowReserved":true},{"name":"dimension","in":"query","schema":{"enum":["country","region","city"],"type":"string","default":"country","description":"Which location dimension to break down by."},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"A country code, an ISO 3166-2 region code, or a city name. An empty string is a place that could not be recognised."},"visitors":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Distinct visitors."},"conversionRate":{"type":"number","description":"Percent, 0 to 100. Visitors of the row that converted. Only under a goal filter: a saved goal, an event name or a property."},"bounceRate":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Percent, 0 to 100. Sessions that bounced, to one decimal. Null when no session in the range counts."},"avgDuration":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Seconds. Engaged time per session, to one decimal. Null when no session in the range counts."},"revenue":{"type":"number","description":"Integer, minor units of the site's reporting currency (cents for USD)."},"orders":{"type":"number","description":"Orders credited to the row by the attribution weights, to two decimals."},"countryCode":{"type":"string","description":"The row's ISO 3166-1 country code."}},"required":["name","visitors","bounceRate","avgDuration","revenue","orders","countryCode"]}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Null on the last page."},"importedExcluded":{"type":"boolean","description":"True when the range holds days imported from another tool that these figures leave out: a filter or a breakdown the imported daily totals cannot answer."},"meta":{"type":"object","properties":{"timezone":{"type":"string","description":"The site's timezone, which every day boundary falls in."},"currency":{"type":"string","description":"ISO 4217 code of every amount in the response."},"range":{"anyOf":[{"type":"object","properties":{"from":{"type":"string","description":"ISO 8601, inclusive."},"to":{"type":"string","description":"ISO 8601, exclusive."}},"required":["from","to"]},{"type":"null"}],"description":"The instants the period resolved to."},"compare":{"anyOf":[{"type":"object","properties":{"from":{"type":"string","description":"ISO 8601, inclusive."},"to":{"type":"string","description":"ISO 8601, exclusive."}},"required":["from","to"]},{"type":"null"}],"description":"The comparison range, when one was asked for."}},"required":["timezone","currency","range","compare"]}},"required":["data","nextCursor","meta"]}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"422":{"$ref":"#/components/responses/Error422"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}}}},"/sites/{site}/campaigns":{"get":{"operationId":"getCampaigns","summary":"UTM campaigns","description":"The sessions tagged with one utm_* dimension, by tag, largest first. A list: `{ data, nextCursor, meta }`. Walk it by passing `nextCursor` as `cursor`; the last page answers `nextCursor: null`. `limit` is the page size (1–500, default 20), not a cap on the whole list. Reuse a cursor only with the same site, range, filters and view. Row `revenue` is attributed by the site's attribution model and lookback, with its thank-you pages excluded, the same as the dashboard's. A direct visit earns credit only when every visit before the sale was direct.","tags":["Stats"],"parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string","description":"The site: its domain as registered (example.com), or its site id."}},{"name":"period","in":"query","schema":{"anyOf":[{"enum":["day","week","month","year","all","custom"],"type":"string"},{"type":"string","pattern":"^([1-9]\\d{0,3})(mo|m|h|d|w)$"}],"default":"7d","description":"The range: a calendar unit (day, week, month, year) positioned by `date`; a window ending now as a count and unit, m h d w mo (30m, 24h, 7d, 2w, 3mo); all; or custom, which reads `from` and `to`. Defaults to 7d."},"allowEmptyValue":true,"allowReserved":true},{"name":"date","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Which day/week/month/year a unit preset refers to, YYYY-MM-DD in the site's timezone. Omitted means the current one."},"allowEmptyValue":true,"allowReserved":true},{"name":"from","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"First day of a custom range, YYYY-MM-DD, inclusive."},"allowEmptyValue":true,"allowReserved":true},{"name":"to","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Last day of a custom range, YYYY-MM-DD, inclusive."},"allowEmptyValue":true,"allowReserved":true},{"name":"filter","in":"query","schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"default":[],"description":"Repeatable filter, written dimension[.key]:operator:value. Only the first two colons separate, so values may contain them. Dimensions: page_path, entry_page, exit_page, hostname, country, region, city, browser, os, device_type, referrer_source, referrer_domain, referrer_channel, utm_source, utm_medium, utm_campaign, utm_content, utm_term, event_name, goal, property (property and goal take a key). Operators: is, is_not, contains; country, region, goal take is and is_not only. A region takes the name the locations report gives it, an ISO 3166-2 code (region:is:DE-BY). Examples: filter=country:is:DE, filter=property.plan:is:pro. Repeat the parameter to combine up to 20 filters; they all have to match."},"allowEmptyValue":true,"allowReserved":true},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":500,"default":20,"description":"Page size, largest first. 1–500, default 20. Not a cap on the whole list."},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","schema":{"type":"string","minLength":1,"maxLength":8192,"description":"Opaque cursor from the previous page's `nextCursor`. Omit for the first page (largest rows). Reuse it only with the same site, range, filters and tab/dimension. The last page answers `nextCursor: null`."},"allowEmptyValue":true,"allowReserved":true},{"name":"dimension","in":"query","schema":{"enum":["utm_campaign","utm_source","utm_medium","utm_content","utm_term"],"type":"string","default":"utm_campaign","description":"Which utm_* dimension to break down by."},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"visitors":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Distinct visitors."},"conversionRate":{"type":"number","description":"Percent, 0 to 100. Visitors of the row that converted. Only under a goal filter: a saved goal, an event name or a property."},"bounceRate":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Percent, 0 to 100. Sessions that bounced, to one decimal. Null when no session in the range counts."},"avgDuration":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Seconds. Engaged time per session, to one decimal. Null when no session in the range counts."},"revenue":{"type":"number","description":"Integer, minor units of the site's reporting currency (cents for USD)."},"orders":{"type":"number","description":"Orders credited to the row by the attribution weights, to two decimals."},"pageviews":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["name","visitors","bounceRate","avgDuration","revenue","orders","pageviews"]}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Null on the last page."},"importedExcluded":{"type":"boolean","description":"True when the range holds days imported from another tool that these figures leave out: a filter or a breakdown the imported daily totals cannot answer."},"meta":{"type":"object","properties":{"timezone":{"type":"string","description":"The site's timezone, which every day boundary falls in."},"currency":{"type":"string","description":"ISO 4217 code of every amount in the response."},"range":{"anyOf":[{"type":"object","properties":{"from":{"type":"string","description":"ISO 8601, inclusive."},"to":{"type":"string","description":"ISO 8601, exclusive."}},"required":["from","to"]},{"type":"null"}],"description":"The instants the period resolved to."},"compare":{"anyOf":[{"type":"object","properties":{"from":{"type":"string","description":"ISO 8601, inclusive."},"to":{"type":"string","description":"ISO 8601, exclusive."}},"required":["from","to"]},{"type":"null"}],"description":"The comparison range, when one was asked for."}},"required":["timezone","currency","range","compare"]}},"required":["data","nextCursor","meta"]}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"422":{"$ref":"#/components/responses/Error422"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}}}},"/sites/{site}/events":{"get":{"operationId":"getEvents","summary":"Custom events","description":"Each custom event with its count, visitors and revenue. A list: `{ data, nextCursor, meta }`. Walk it by passing `nextCursor` as `cursor`; the last page answers `nextCursor: null`. `limit` is the page size (1–500, default 20), not a cap on the whole list. Reuse a cursor only with the same site, range, filters and view.","tags":["Stats"],"parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string","description":"The site: its domain as registered (example.com), or its site id."}},{"name":"period","in":"query","schema":{"anyOf":[{"enum":["day","week","month","year","all","custom"],"type":"string"},{"type":"string","pattern":"^([1-9]\\d{0,3})(mo|m|h|d|w)$"}],"default":"7d","description":"The range: a calendar unit (day, week, month, year) positioned by `date`; a window ending now as a count and unit, m h d w mo (30m, 24h, 7d, 2w, 3mo); all; or custom, which reads `from` and `to`. Defaults to 7d."},"allowEmptyValue":true,"allowReserved":true},{"name":"date","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Which day/week/month/year a unit preset refers to, YYYY-MM-DD in the site's timezone. Omitted means the current one."},"allowEmptyValue":true,"allowReserved":true},{"name":"from","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"First day of a custom range, YYYY-MM-DD, inclusive."},"allowEmptyValue":true,"allowReserved":true},{"name":"to","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Last day of a custom range, YYYY-MM-DD, inclusive."},"allowEmptyValue":true,"allowReserved":true},{"name":"filter","in":"query","schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"default":[],"description":"Repeatable filter, written dimension[.key]:operator:value. Only the first two colons separate, so values may contain them. Dimensions: page_path, entry_page, exit_page, hostname, country, region, city, browser, os, device_type, referrer_source, referrer_domain, referrer_channel, utm_source, utm_medium, utm_campaign, utm_content, utm_term, event_name, goal, property (property and goal take a key). Operators: is, is_not, contains; country, region, goal take is and is_not only. A region takes the name the locations report gives it, an ISO 3166-2 code (region:is:DE-BY). Examples: filter=country:is:DE, filter=property.plan:is:pro. Repeat the parameter to combine up to 20 filters; they all have to match."},"allowEmptyValue":true,"allowReserved":true},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":500,"default":20,"description":"Page size, largest first. 1–500, default 20. Not a cap on the whole list."},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","schema":{"type":"string","minLength":1,"maxLength":8192,"description":"Opaque cursor from the previous page's `nextCursor`. Omit for the first page (largest rows). Reuse it only with the same site, range, filters and tab/dimension. The last page answers `nextCursor: null`."},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"count":{"type":"integer","minimum":0,"maximum":9007199254740991},"visitors":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Distinct visitors."},"share":{"type":"number","description":"Percent, 0 to 100. Visitors in the range who fired the event."},"revenue":{"type":"number","description":"Integer, minor units of the site's reporting currency (cents for USD). The money the event itself carried."}},"required":["name","count","visitors","share","revenue"]}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Null on the last page."},"importedExcluded":{"type":"boolean","description":"True when the range holds days imported from another tool that these figures leave out: a filter or a breakdown the imported daily totals cannot answer."},"meta":{"type":"object","properties":{"timezone":{"type":"string","description":"The site's timezone, which every day boundary falls in."},"currency":{"type":"string","description":"ISO 4217 code of every amount in the response."},"range":{"anyOf":[{"type":"object","properties":{"from":{"type":"string","description":"ISO 8601, inclusive."},"to":{"type":"string","description":"ISO 8601, exclusive."}},"required":["from","to"]},{"type":"null"}],"description":"The instants the period resolved to."},"compare":{"anyOf":[{"type":"object","properties":{"from":{"type":"string","description":"ISO 8601, inclusive."},"to":{"type":"string","description":"ISO 8601, exclusive."}},"required":["from","to"]},{"type":"null"}],"description":"The comparison range, when one was asked for."}},"required":["timezone","currency","range","compare"]}},"required":["data","nextCursor","meta"]}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"422":{"$ref":"#/components/responses/Error422"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}}}},"/sites/{site}/events/{name}":{"get":{"operationId":"getEvent","summary":"One custom event","description":"Totals for one custom event, and a breakdown of its properties.","tags":["Stats"],"parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string","description":"The site: its domain as registered (example.com), or its site id."}},{"name":"name","in":"path","required":true,"schema":{"type":"string","maxLength":200,"description":"The event name, exactly as the tracker sends it."}},{"name":"period","in":"query","schema":{"anyOf":[{"enum":["day","week","month","year","all","custom"],"type":"string"},{"type":"string","pattern":"^([1-9]\\d{0,3})(mo|m|h|d|w)$"}],"default":"7d","description":"The range: a calendar unit (day, week, month, year) positioned by `date`; a window ending now as a count and unit, m h d w mo (30m, 24h, 7d, 2w, 3mo); all; or custom, which reads `from` and `to`. Defaults to 7d."},"allowEmptyValue":true,"allowReserved":true},{"name":"date","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Which day/week/month/year a unit preset refers to, YYYY-MM-DD in the site's timezone. Omitted means the current one."},"allowEmptyValue":true,"allowReserved":true},{"name":"from","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"First day of a custom range, YYYY-MM-DD, inclusive."},"allowEmptyValue":true,"allowReserved":true},{"name":"to","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Last day of a custom range, YYYY-MM-DD, inclusive."},"allowEmptyValue":true,"allowReserved":true},{"name":"filter","in":"query","schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"default":[],"description":"Repeatable filter, written dimension[.key]:operator:value. Only the first two colons separate, so values may contain them. Dimensions: page_path, entry_page, exit_page, hostname, country, region, city, browser, os, device_type, referrer_source, referrer_domain, referrer_channel, utm_source, utm_medium, utm_campaign, utm_content, utm_term, event_name, goal, property (property and goal take a key). Operators: is, is_not, contains; country, region, goal take is and is_not only. A region takes the name the locations report gives it, an ISO 3166-2 code (region:is:DE-BY). Examples: filter=country:is:DE, filter=property.plan:is:pro. Repeat the parameter to combine up to 20 filters; they all have to match."},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"count":{"type":"integer","minimum":0,"maximum":9007199254740991},"visitors":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Distinct visitors."},"share":{"type":"number","description":"Percent, 0 to 100. Visitors in the range who fired the event."},"revenue":{"type":"number","description":"Integer, minor units of the site's reporting currency (cents for USD). The money the event itself carried."},"properties":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"count":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Events carrying the key, any value."},"values":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string"},"count":{"type":"integer","minimum":0,"maximum":9007199254740991},"visitors":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Distinct visitors."}},"required":["value","count","visitors"]}}},"required":["key","count","values"]},"description":"Property keys by count, at most 50, each with its 50 most common values."}},"required":["count","visitors","share","revenue","properties"]},"meta":{"type":"object","properties":{"timezone":{"type":"string","description":"The site's timezone, which every day boundary falls in."},"currency":{"type":"string","description":"ISO 4217 code of every amount in the response."},"range":{"anyOf":[{"type":"object","properties":{"from":{"type":"string","description":"ISO 8601, inclusive."},"to":{"type":"string","description":"ISO 8601, exclusive."}},"required":["from","to"]},{"type":"null"}],"description":"The instants the period resolved to."},"compare":{"anyOf":[{"type":"object","properties":{"from":{"type":"string","description":"ISO 8601, inclusive."},"to":{"type":"string","description":"ISO 8601, exclusive."}},"required":["from","to"]},{"type":"null"}],"description":"The comparison range, when one was asked for."}},"required":["timezone","currency","range","compare"]}},"required":["data","meta"]}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"422":{"$ref":"#/components/responses/Error422"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}}}},"/sites/{site}/bots":{"get":{"operationId":"getBots","summary":"Bot traffic","description":"Traffic left out of the stats, by the rule that caught it. Takes no filter: bot events carry no visitor, page or location columns.","tags":["Stats"],"parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string","description":"The site: its domain as registered (example.com), or its site id."}},{"name":"period","in":"query","schema":{"anyOf":[{"enum":["day","week","month","year","all","custom"],"type":"string"},{"type":"string","pattern":"^([1-9]\\d{0,3})(mo|m|h|d|w)$"}],"default":"7d","description":"The range: a calendar unit (day, week, month, year) positioned by `date`; a window ending now as a count and unit, m h d w mo (30m, 24h, 7d, 2w, 3mo); all; or custom, which reads `from` and `to`. Defaults to 7d."},"allowEmptyValue":true,"allowReserved":true},{"name":"date","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Which day/week/month/year a unit preset refers to, YYYY-MM-DD in the site's timezone. Omitted means the current one."},"allowEmptyValue":true,"allowReserved":true},{"name":"from","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"First day of a custom range, YYYY-MM-DD, inclusive."},"allowEmptyValue":true,"allowReserved":true},{"name":"to","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Last day of a custom range, YYYY-MM-DD, inclusive."},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"reason":{"type":"string","description":"The rule that caught the traffic: crawler, spam, …"},"hits":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["reason","hits"]}},"nextCursor":{"type":"null"},"meta":{"type":"object","properties":{"timezone":{"type":"string","description":"The site's timezone, which every day boundary falls in."},"currency":{"type":"string","description":"ISO 4217 code of every amount in the response."},"range":{"anyOf":[{"type":"object","properties":{"from":{"type":"string","description":"ISO 8601, inclusive."},"to":{"type":"string","description":"ISO 8601, exclusive."}},"required":["from","to"]},{"type":"null"}],"description":"The instants the period resolved to."},"compare":{"anyOf":[{"type":"object","properties":{"from":{"type":"string","description":"ISO 8601, inclusive."},"to":{"type":"string","description":"ISO 8601, exclusive."}},"required":["from","to"]},{"type":"null"}],"description":"The comparison range, when one was asked for."}},"required":["timezone","currency","range","compare"]}},"required":["data","nextCursor","meta"]}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"422":{"$ref":"#/components/responses/Error422"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}}}},"/sites/{site}/tool-calls":{"get":{"operationId":"getToolCalls","summary":"MCP tool calls","description":"Calls AI assistants made to the site's own MCP server, recorded by `highseat/mcp`: totals, calls by assistant and calls by tool, with error counts, latency and empty results. Takes no filter: a call carries no page, place, device or source. Calls per bucket come from the timeseries with `event` set to `mcp_tool_call`.","tags":["Stats"],"parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string","description":"The site: its domain as registered (example.com), or its site id."}},{"name":"period","in":"query","schema":{"anyOf":[{"enum":["day","week","month","year","all","custom"],"type":"string"},{"type":"string","pattern":"^([1-9]\\d{0,3})(mo|m|h|d|w)$"}],"default":"7d","description":"The range: a calendar unit (day, week, month, year) positioned by `date`; a window ending now as a count and unit, m h d w mo (30m, 24h, 7d, 2w, 3mo); all; or custom, which reads `from` and `to`. Defaults to 7d."},"allowEmptyValue":true,"allowReserved":true},{"name":"date","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Which day/week/month/year a unit preset refers to, YYYY-MM-DD in the site's timezone. Omitted means the current one."},"allowEmptyValue":true,"allowReserved":true},{"name":"from","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"First day of a custom range, YYYY-MM-DD, inclusive."},"allowEmptyValue":true,"allowReserved":true},{"name":"to","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Last day of a custom range, YYYY-MM-DD, inclusive."},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"totals":{"type":"object","properties":{"calls":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Calls AI assistants made to the site's MCP server."},"errors":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Calls that ended in an error code rather than `ok`."},"error_rate":{"type":"number","description":"Percent, 0 to 100. Calls that were errors, to one decimal."},"p50_ms":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Milliseconds. Median call duration; null when no call reported one."},"p95_ms":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Milliseconds. 95th-percentile call duration; null when no call reported one."},"listed":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Calls to a read-only tool that returned a list."},"empty":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Calls whose list was empty: the assistant found nothing."},"empty_rate":{"type":"number","description":"Percent, 0 to 100. Listed calls whose list was empty, to one decimal."}},"required":["calls","errors","error_rate","p50_ms","p95_ms","listed","empty","empty_rate"]},"assistants":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"The assistant (Claude, ChatGPT, Cursor, …), Scripts for an HTTP library, or the client's name as sent."},"calls":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Calls AI assistants made to the site's MCP server."},"errors":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Calls that ended in an error code rather than `ok`."},"error_rate":{"type":"number","description":"Percent, 0 to 100. Calls that were errors, to one decimal."},"p95_ms":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Milliseconds. 95th-percentile call duration; null when no call reported one."},"declared":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Calls whose client named itself in the MCP handshake."},"from_user_agent":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Calls whose client was read off its User-Agent."},"unnamed":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Calls whose client nothing named."}},"required":["name","calls","errors","error_rate","p95_ms","declared","from_user_agent","unnamed"]},"description":"Calls by assistant, most first, up to 100."},"tools":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"The tool's name."},"calls":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Calls AI assistants made to the site's MCP server."},"errors":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Calls that ended in an error code rather than `ok`."},"error_rate":{"type":"number","description":"Percent, 0 to 100. Calls that were errors, to one decimal."},"p95_ms":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Milliseconds. 95th-percentile call duration; null when no call reported one."},"listed":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Calls to a read-only tool that returned a list."},"empty":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Calls whose list was empty: the assistant found nothing."},"empty_rate":{"type":"number","description":"Percent, 0 to 100. Listed calls whose list was empty, to one decimal."}},"required":["name","calls","errors","error_rate","p95_ms","listed","empty","empty_rate"]},"description":"Calls by tool, most first, up to 100."}},"required":["totals","assistants","tools"]},"meta":{"type":"object","properties":{"timezone":{"type":"string","description":"The site's timezone, which every day boundary falls in."},"currency":{"type":"string","description":"ISO 4217 code of every amount in the response."},"range":{"anyOf":[{"type":"object","properties":{"from":{"type":"string","description":"ISO 8601, inclusive."},"to":{"type":"string","description":"ISO 8601, exclusive."}},"required":["from","to"]},{"type":"null"}],"description":"The instants the period resolved to."},"compare":{"anyOf":[{"type":"object","properties":{"from":{"type":"string","description":"ISO 8601, inclusive."},"to":{"type":"string","description":"ISO 8601, exclusive."}},"required":["from","to"]},{"type":"null"}],"description":"The comparison range, when one was asked for."}},"required":["timezone","currency","range","compare"]}},"required":["data","meta"]}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"422":{"$ref":"#/components/responses/Error422"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}}}},"/sites/{site}/goals/conversions":{"get":{"operationId":"getGoalConversions","summary":"Goal conversions","description":"Every goal saved for the site, with its conversions over the range.","tags":["Stats"],"parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string","description":"The site: its domain as registered (example.com), or its site id."}},{"name":"period","in":"query","schema":{"anyOf":[{"enum":["day","week","month","year","all","custom"],"type":"string"},{"type":"string","pattern":"^([1-9]\\d{0,3})(mo|m|h|d|w)$"}],"default":"7d","description":"The range: a calendar unit (day, week, month, year) positioned by `date`; a window ending now as a count and unit, m h d w mo (30m, 24h, 7d, 2w, 3mo); all; or custom, which reads `from` and `to`. Defaults to 7d."},"allowEmptyValue":true,"allowReserved":true},{"name":"date","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Which day/week/month/year a unit preset refers to, YYYY-MM-DD in the site's timezone. Omitted means the current one."},"allowEmptyValue":true,"allowReserved":true},{"name":"from","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"First day of a custom range, YYYY-MM-DD, inclusive."},"allowEmptyValue":true,"allowReserved":true},{"name":"to","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Last day of a custom range, YYYY-MM-DD, inclusive."},"allowEmptyValue":true,"allowReserved":true},{"name":"filter","in":"query","schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"default":[],"description":"Repeatable filter, written dimension[.key]:operator:value. Only the first two colons separate, so values may contain them. Dimensions: page_path, entry_page, exit_page, hostname, country, region, city, browser, os, device_type, referrer_source, referrer_domain, referrer_channel, utm_source, utm_medium, utm_campaign, utm_content, utm_term, event_name, goal, property (property and goal take a key). Operators: is, is_not, contains; country, region, goal take is and is_not only. A region takes the name the locations report gives it, an ISO 3166-2 code (region:is:DE-BY). Examples: filter=country:is:DE, filter=property.plan:is:pro. Repeat the parameter to combine up to 20 filters; they all have to match."},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"enum":["page","event"],"type":"string"},"match":{"type":"string"},"visitors":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Visitors that reached the goal."},"count":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Times the goal was reached."},"rate":{"type":"number","description":"Percent, 0 to 100. Visitors in the range that converted."}},"required":["id","name","type","match","visitors","count","rate"]}},"nextCursor":{"type":"null"},"meta":{"type":"object","properties":{"timezone":{"type":"string","description":"The site's timezone, which every day boundary falls in."},"currency":{"type":"string","description":"ISO 4217 code of every amount in the response."},"range":{"anyOf":[{"type":"object","properties":{"from":{"type":"string","description":"ISO 8601, inclusive."},"to":{"type":"string","description":"ISO 8601, exclusive."}},"required":["from","to"]},{"type":"null"}],"description":"The instants the period resolved to."},"compare":{"anyOf":[{"type":"object","properties":{"from":{"type":"string","description":"ISO 8601, inclusive."},"to":{"type":"string","description":"ISO 8601, exclusive."}},"required":["from","to"]},{"type":"null"}],"description":"The comparison range, when one was asked for."}},"required":["timezone","currency","range","compare"]}},"required":["data","nextCursor","meta"]}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"422":{"$ref":"#/components/responses/Error422"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}}}},"/sites/{site}/revenue":{"get":{"operationId":"getRevenue","summary":"Revenue totals","description":"Gross and net revenue, refunds, paid orders and the average order, attributed revenue, buyers and the purchaser rate for the range. A payment provider's webhook wins over a tracker purchase carrying the same order_id.","tags":["Stats"],"parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string","description":"The site: its domain as registered (example.com), or its site id."}},{"name":"period","in":"query","schema":{"anyOf":[{"enum":["day","week","month","year","all","custom"],"type":"string"},{"type":"string","pattern":"^([1-9]\\d{0,3})(mo|m|h|d|w)$"}],"default":"7d","description":"The range: a calendar unit (day, week, month, year) positioned by `date`; a window ending now as a count and unit, m h d w mo (30m, 24h, 7d, 2w, 3mo); all; or custom, which reads `from` and `to`. Defaults to 7d."},"allowEmptyValue":true,"allowReserved":true},{"name":"date","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Which day/week/month/year a unit preset refers to, YYYY-MM-DD in the site's timezone. Omitted means the current one."},"allowEmptyValue":true,"allowReserved":true},{"name":"from","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"First day of a custom range, YYYY-MM-DD, inclusive."},"allowEmptyValue":true,"allowReserved":true},{"name":"to","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Last day of a custom range, YYYY-MM-DD, inclusive."},"allowEmptyValue":true,"allowReserved":true},{"name":"filter","in":"query","schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"default":[],"description":"Repeatable filter, written dimension[.key]:operator:value. Only the first two colons separate, so values may contain them. Dimensions: page_path, entry_page, exit_page, hostname, country, region, city, browser, os, device_type, referrer_source, referrer_domain, referrer_channel, utm_source, utm_medium, utm_campaign, utm_content, utm_term, event_name, goal, property (property and goal take a key). Operators: is, is_not, contains; country, region, goal take is and is_not only. A region takes the name the locations report gives it, an ISO 3166-2 code (region:is:DE-BY). Examples: filter=country:is:DE, filter=property.plan:is:pro. Repeat the parameter to combine up to 20 filters; they all have to match."},"allowEmptyValue":true,"allowReserved":true},{"name":"compare","in":"query","schema":{"enum":["off","previous","year","custom"],"type":"string","default":"off","description":"Comparison period, always the range's own length moved: off, previous (the range immediately before), year (the same range a year earlier), or custom (starting on compareFrom). Defaults to off."},"allowEmptyValue":true,"allowReserved":true},{"name":"compareFrom","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"First day of a custom comparison, YYYY-MM-DD; it runs for the range's length."},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"gross":{"type":"number","description":"Integer, minor units of the site's reporting currency (cents for USD). Every sale, before refunds."},"net":{"type":"number","description":"Integer, minor units of the site's reporting currency (cents for USD). Gross less the refunds landed in the range."},"refunded":{"type":"number","description":"Integer, minor units of the site's reporting currency (cents for USD). What the range's refunds returned."},"paidOrders":{"type":"integer","minimum":0,"maximum":9007199254740991},"averageOrder":{"type":"number","description":"Minor units of the site's reporting currency (cents for USD), unrounded, so it may carry a fraction. Net per paid order."},"attributed":{"type":"number","description":"Integer, minor units of the site's reporting currency (cents for USD). Net on orders tied to a visit."},"attributionRate":{"type":"number","description":"Percent, 0 to 100. Attributed net as a share of net."},"visitors":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Distinct visitors."},"buyers":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Distinct visitors with a sale in the range."},"purchaserRate":{"type":"number","description":"Percent, 0 to 100. Buyers among the visitors."},"revenuePerVisitor":{"type":"number","description":"Minor units of the site's reporting currency (cents for USD), unrounded, so it may carry a fraction. Net per visitor."},"unnamedOrders":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Provider orders that carried no product name."},"previous":{"type":"object","properties":{"gross":{"type":"number","description":"Integer, minor units of the site's reporting currency (cents for USD). Every sale, before refunds."},"net":{"type":"number","description":"Integer, minor units of the site's reporting currency (cents for USD). Gross less the refunds landed in the range."},"refunded":{"type":"number","description":"Integer, minor units of the site's reporting currency (cents for USD). What the range's refunds returned."},"paidOrders":{"type":"integer","minimum":0,"maximum":9007199254740991},"averageOrder":{"type":"number","description":"Minor units of the site's reporting currency (cents for USD), unrounded, so it may carry a fraction. Net per paid order."},"attributed":{"type":"number","description":"Integer, minor units of the site's reporting currency (cents for USD). Net on orders tied to a visit."},"attributionRate":{"type":"number","description":"Percent, 0 to 100. Attributed net as a share of net."},"visitors":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Distinct visitors."},"buyers":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Distinct visitors with a sale in the range."},"purchaserRate":{"type":"number","description":"Percent, 0 to 100. Buyers among the visitors."},"revenuePerVisitor":{"type":"number","description":"Minor units of the site's reporting currency (cents for USD), unrounded, so it may carry a fraction. Net per visitor."},"unnamedOrders":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Provider orders that carried no product name."}},"required":["gross","net","refunded","paidOrders","averageOrder","attributed","attributionRate","visitors","buyers","purchaserRate","revenuePerVisitor","unnamedOrders"],"description":"The comparison range's figures, when asked for."}},"required":["gross","net","refunded","paidOrders","averageOrder","attributed","attributionRate","visitors","buyers","purchaserRate","revenuePerVisitor","unnamedOrders"]},"meta":{"type":"object","properties":{"timezone":{"type":"string","description":"The site's timezone, which every day boundary falls in."},"currency":{"type":"string","description":"ISO 4217 code of every amount in the response."},"range":{"anyOf":[{"type":"object","properties":{"from":{"type":"string","description":"ISO 8601, inclusive."},"to":{"type":"string","description":"ISO 8601, exclusive."}},"required":["from","to"]},{"type":"null"}],"description":"The instants the period resolved to."},"compare":{"anyOf":[{"type":"object","properties":{"from":{"type":"string","description":"ISO 8601, inclusive."},"to":{"type":"string","description":"ISO 8601, exclusive."}},"required":["from","to"]},{"type":"null"}],"description":"The comparison range, when one was asked for."}},"required":["timezone","currency","range","compare"]}},"required":["data","meta"]}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"422":{"$ref":"#/components/responses/Error422"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}}}},"/sites/{site}/revenue/products":{"get":{"operationId":"getRevenueByProduct","summary":"Revenue by product","description":"Products sold in the range, largest first. A list: `{ data, nextCursor, meta }`. Walk it by passing `nextCursor` as `cursor`; the last page answers `nextCursor: null`. `limit` is the page size (1–500, default 20), not a cap on the whole list. Reuse a cursor only with the same site, range, filters and view.","tags":["Stats"],"parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string","description":"The site: its domain as registered (example.com), or its site id."}},{"name":"period","in":"query","schema":{"anyOf":[{"enum":["day","week","month","year","all","custom"],"type":"string"},{"type":"string","pattern":"^([1-9]\\d{0,3})(mo|m|h|d|w)$"}],"default":"7d","description":"The range: a calendar unit (day, week, month, year) positioned by `date`; a window ending now as a count and unit, m h d w mo (30m, 24h, 7d, 2w, 3mo); all; or custom, which reads `from` and `to`. Defaults to 7d."},"allowEmptyValue":true,"allowReserved":true},{"name":"date","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Which day/week/month/year a unit preset refers to, YYYY-MM-DD in the site's timezone. Omitted means the current one."},"allowEmptyValue":true,"allowReserved":true},{"name":"from","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"First day of a custom range, YYYY-MM-DD, inclusive."},"allowEmptyValue":true,"allowReserved":true},{"name":"to","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Last day of a custom range, YYYY-MM-DD, inclusive."},"allowEmptyValue":true,"allowReserved":true},{"name":"filter","in":"query","schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"default":[],"description":"Repeatable filter, written dimension[.key]:operator:value. Only the first two colons separate, so values may contain them. Dimensions: page_path, entry_page, exit_page, hostname, country, region, city, browser, os, device_type, referrer_source, referrer_domain, referrer_channel, utm_source, utm_medium, utm_campaign, utm_content, utm_term, event_name, goal, property (property and goal take a key). Operators: is, is_not, contains; country, region, goal take is and is_not only. A region takes the name the locations report gives it, an ISO 3166-2 code (region:is:DE-BY). Examples: filter=country:is:DE, filter=property.plan:is:pro. Repeat the parameter to combine up to 20 filters; they all have to match."},"allowEmptyValue":true,"allowReserved":true},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":500,"default":20,"description":"Page size, largest first. 1–500, default 20. Not a cap on the whole list."},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","schema":{"type":"string","minLength":1,"maxLength":8192,"description":"Opaque cursor from the previous page's `nextCursor`. Omit for the first page (largest rows). Reuse it only with the same site, range, filters and tab/dimension. The last page answers `nextCursor: null`."},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"product":{"type":"string"},"type":{"enum":["one_time","subscription"],"type":"string"},"orders":{"type":"integer","minimum":0,"maximum":9007199254740991},"revenue":{"type":"number","description":"Integer, minor units of the site's reporting currency (cents for USD). Net of refunds."},"attributed":{"type":"number","description":"Integer, minor units of the site's reporting currency (cents for USD). Net on orders tied to a visit."}},"required":["product","type","orders","revenue","attributed"]}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Null on the last page."},"importedExcluded":{"type":"boolean","description":"True when the range holds days imported from another tool that these figures leave out: a filter or a breakdown the imported daily totals cannot answer."},"meta":{"type":"object","properties":{"timezone":{"type":"string","description":"The site's timezone, which every day boundary falls in."},"currency":{"type":"string","description":"ISO 4217 code of every amount in the response."},"range":{"anyOf":[{"type":"object","properties":{"from":{"type":"string","description":"ISO 8601, inclusive."},"to":{"type":"string","description":"ISO 8601, exclusive."}},"required":["from","to"]},{"type":"null"}],"description":"The instants the period resolved to."},"compare":{"anyOf":[{"type":"object","properties":{"from":{"type":"string","description":"ISO 8601, inclusive."},"to":{"type":"string","description":"ISO 8601, exclusive."}},"required":["from","to"]},{"type":"null"}],"description":"The comparison range, when one was asked for."}},"required":["timezone","currency","range","compare"]}},"required":["data","nextCursor","meta"]}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"422":{"$ref":"#/components/responses/Error422"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}}}},"/sites/{site}/revenue/attribution":{"get":{"operationId":"getAttribution","summary":"Attributed revenue","description":"The Revenue page's Attribution card: the range's net revenue and orders credited to the traffic that earned them, by the dimension `tab` names, largest first. A list: `{ data, nextCursor, meta }`. Walk it by passing `nextCursor` as `cursor`; the last page answers `nextCursor: null`. `limit` is the page size (1–500, default 20), not a cap on the whole list. Reuse a cursor only with the same site, range, filters and view. Row `revenue` is attributed by the site's attribution model and lookback, with its thank-you pages excluded, the same as the dashboard's. A direct visit earns credit only when every visit before the sale was direct.","tags":["Stats"],"parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string","description":"The site: its domain as registered (example.com), or its site id."}},{"name":"period","in":"query","schema":{"anyOf":[{"enum":["day","week","month","year","all","custom"],"type":"string"},{"type":"string","pattern":"^([1-9]\\d{0,3})(mo|m|h|d|w)$"}],"default":"7d","description":"The range: a calendar unit (day, week, month, year) positioned by `date`; a window ending now as a count and unit, m h d w mo (30m, 24h, 7d, 2w, 3mo); all; or custom, which reads `from` and `to`. Defaults to 7d."},"allowEmptyValue":true,"allowReserved":true},{"name":"date","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Which day/week/month/year a unit preset refers to, YYYY-MM-DD in the site's timezone. Omitted means the current one."},"allowEmptyValue":true,"allowReserved":true},{"name":"from","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"First day of a custom range, YYYY-MM-DD, inclusive."},"allowEmptyValue":true,"allowReserved":true},{"name":"to","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Last day of a custom range, YYYY-MM-DD, inclusive."},"allowEmptyValue":true,"allowReserved":true},{"name":"filter","in":"query","schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"default":[],"description":"Repeatable filter, written dimension[.key]:operator:value. Only the first two colons separate, so values may contain them. Dimensions: page_path, entry_page, exit_page, hostname, country, region, city, browser, os, device_type, referrer_source, referrer_domain, referrer_channel, utm_source, utm_medium, utm_campaign, utm_content, utm_term, event_name, goal, property (property and goal take a key). Operators: is, is_not, contains; country, region, goal take is and is_not only. A region takes the name the locations report gives it, an ISO 3166-2 code (region:is:DE-BY). Examples: filter=country:is:DE, filter=property.plan:is:pro. Repeat the parameter to combine up to 20 filters; they all have to match."},"allowEmptyValue":true,"allowReserved":true},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":500,"default":20,"description":"Page size, largest first. 1–500, default 20. Not a cap on the whole list."},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","schema":{"type":"string","minLength":1,"maxLength":8192,"description":"Opaque cursor from the previous page's `nextCursor`. Omit for the first page (largest rows). Reuse it only with the same site, range, filters and tab/dimension. The last page answers `nextCursor: null`."},"allowEmptyValue":true,"allowReserved":true},{"name":"tab","in":"query","schema":{"enum":["sources","channels","pages","campaigns","countries"],"type":"string","default":"sources","description":"Which breakdown the revenue is credited across."},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"The source, channel, page path, campaign or country code. On the sources tab an empty string is direct traffic."},"domain":{"type":"string","description":"A source's host for its favicon, or an empty string."},"revenue":{"type":"number","description":"Integer, minor units of the site's reporting currency (cents for USD)."},"orders":{"type":"number","description":"Orders credited to the row by the attribution weights, to two decimals."}},"required":["name","domain","revenue","orders"]}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Null on the last page."},"importedExcluded":{"type":"boolean","description":"True when the range holds days imported from another tool that these figures leave out: a filter or a breakdown the imported daily totals cannot answer."},"meta":{"type":"object","properties":{"timezone":{"type":"string","description":"The site's timezone, which every day boundary falls in."},"currency":{"type":"string","description":"ISO 4217 code of every amount in the response."},"range":{"anyOf":[{"type":"object","properties":{"from":{"type":"string","description":"ISO 8601, inclusive."},"to":{"type":"string","description":"ISO 8601, exclusive."}},"required":["from","to"]},{"type":"null"}],"description":"The instants the period resolved to."},"compare":{"anyOf":[{"type":"object","properties":{"from":{"type":"string","description":"ISO 8601, inclusive."},"to":{"type":"string","description":"ISO 8601, exclusive."}},"required":["from","to"]},{"type":"null"}],"description":"The comparison range, when one was asked for."}},"required":["timezone","currency","range","compare"]}},"required":["data","nextCursor","meta"]}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"422":{"$ref":"#/components/responses/Error422"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}}}},"/sites/{site}/properties":{"get":{"operationId":"getEventProperties","summary":"Event properties","description":"The property keys custom events carried in the range, by count, each with its most common values. Every custom event's by default; `name` narrows it to one event and `key` to one property.","tags":["Stats"],"parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string","description":"The site: its domain as registered (example.com), or its site id."}},{"name":"period","in":"query","schema":{"anyOf":[{"enum":["day","week","month","year","all","custom"],"type":"string"},{"type":"string","pattern":"^([1-9]\\d{0,3})(mo|m|h|d|w)$"}],"default":"7d","description":"The range: a calendar unit (day, week, month, year) positioned by `date`; a window ending now as a count and unit, m h d w mo (30m, 24h, 7d, 2w, 3mo); all; or custom, which reads `from` and `to`. Defaults to 7d."},"allowEmptyValue":true,"allowReserved":true},{"name":"date","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Which day/week/month/year a unit preset refers to, YYYY-MM-DD in the site's timezone. Omitted means the current one."},"allowEmptyValue":true,"allowReserved":true},{"name":"from","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"First day of a custom range, YYYY-MM-DD, inclusive."},"allowEmptyValue":true,"allowReserved":true},{"name":"to","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Last day of a custom range, YYYY-MM-DD, inclusive."},"allowEmptyValue":true,"allowReserved":true},{"name":"filter","in":"query","schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"default":[],"description":"Repeatable filter, written dimension[.key]:operator:value. Only the first two colons separate, so values may contain them. Dimensions: page_path, entry_page, exit_page, hostname, country, region, city, browser, os, device_type, referrer_source, referrer_domain, referrer_channel, utm_source, utm_medium, utm_campaign, utm_content, utm_term, event_name, goal, property (property and goal take a key). Operators: is, is_not, contains; country, region, goal take is and is_not only. A region takes the name the locations report gives it, an ISO 3166-2 code (region:is:DE-BY). Examples: filter=country:is:DE, filter=property.plan:is:pro. Repeat the parameter to combine up to 20 filters; they all have to match."},"allowEmptyValue":true,"allowReserved":true},{"name":"name","in":"query","schema":{"type":"string","maxLength":200,"description":"The event name; every custom event without one."},"allowEmptyValue":true,"allowReserved":true},{"name":"key","in":"query","schema":{"type":"string","minLength":1,"maxLength":200,"description":"One property; every property without one."},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"count":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Events carrying the key, any value."},"values":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string"},"count":{"type":"integer","minimum":0,"maximum":9007199254740991},"visitors":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Distinct visitors."}},"required":["value","count","visitors"]}}},"required":["key","count","values"]},"description":"Property keys by count, at most 50, each with its 50 most common values."},"nextCursor":{"type":"null"},"meta":{"type":"object","properties":{"timezone":{"type":"string","description":"The site's timezone, which every day boundary falls in."},"currency":{"type":"string","description":"ISO 4217 code of every amount in the response."},"range":{"anyOf":[{"type":"object","properties":{"from":{"type":"string","description":"ISO 8601, inclusive."},"to":{"type":"string","description":"ISO 8601, exclusive."}},"required":["from","to"]},{"type":"null"}],"description":"The instants the period resolved to."},"compare":{"anyOf":[{"type":"object","properties":{"from":{"type":"string","description":"ISO 8601, inclusive."},"to":{"type":"string","description":"ISO 8601, exclusive."}},"required":["from","to"]},{"type":"null"}],"description":"The comparison range, when one was asked for."}},"required":["timezone","currency","range","compare"]}},"required":["data","nextCursor","meta"]}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"422":{"$ref":"#/components/responses/Error422"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}}}},"/usage":{"get":{"operationId":"getUsage","summary":"Get the event usage","description":"The workspace's events this period against its plan's limit: what is used, what is left, and when the count resets. The figures are the Billing page's. It answers while the workspace is locked or has no plan, when every other route answers 403. A key limited to some sites gets the workspace's figures, which the plan is billed on, and only its own `sites`. The request limits are separate, in the `RateLimit-*` headers.","tags":["Usage"],"parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"period":{"type":"object","properties":{"start":{"type":"string","format":"date-time","x-native-type":"date","description":"When the period began, at midnight UTC."},"end":{"type":"string","format":"date-time","x-native-type":"date","description":"When the period ends and the count starts again from 0."}},"required":["start","end"],"description":"The period being counted: a paid plan's billing month, a trial, or a calendar month."},"plan":{"anyOf":[{"enum":["10k","25k","50k","100k","200k","500k","1m","2m","5m","10m","20m","50m"],"type":"string"},{"type":"null"}],"description":"The tier the usage is metered against. Null during a trial or without a plan."},"limit":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The events the plan includes a period. Null when nothing limits the usage."},"events":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The events the workspace stored this period, across all its sites, deleted ones included."},"remaining":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The events left before `limit`, never below 0. Null without a limit."},"overLimitAt":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"The event count past which the period is over: 110% of `limit`. Null without a limit."},"projected":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The events the period ends with at its pace so far. A trial projects a month at its pace."},"status":{"enum":["under","near","over","lock-notice","locked"],"type":"string","description":"Where this period's events stand against the limit. A period counts as over only past `overLimitAt`, 110% of the limit: the margin a busy month may use at no charge. `under`: below 80% of the limit, or no limit at all. `near`: from 80% up to `overLimitAt`. `over`: past `overLimitAt` for the first period in a row; nothing closes, and the reports keep answering. `lock-notice`: a second period in a row past it, so the reports lock 7 days after it passed, at `lockAt`, unless the workspace moves to a larger plan. `locked`: the dashboards and every other API route answer 403 until a period ends under `overLimitAt` or a larger plan covers the usage. Events are still collected in every status. The list of statuses may gain or lose values, so read a value you do not know as `over`."},"lockAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}],"description":"When the reports lock, or when they locked. Set only for `lock-notice` and `locked`."},"trial":{"anyOf":[{"type":"object","properties":{"day":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The trial's current day, from 1."},"days":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The trial's length in days."}},"required":["day","days"]},{"type":"null"}],"description":"The running trial, which has no limit. Null outside a trial."},"sites":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"domain":{"type":"string","description":"The site's hostname, which also names it in a path."},"events":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The events the site stored this period."}},"required":["id","name","domain","events"]},"description":"The sites the credential reaches, busiest first. One limited to some sites lists only those, while `events` stays the workspace's total."}},"required":["period","plan","limit","events","remaining","overLimitAt","projected","status","lockAt","trial","sites"]}},"required":["data"]}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"422":{"$ref":"#/components/responses/Error422"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}}}},"/sites/{site}/notes":{"get":{"operationId":"listNotes","summary":"List notes","description":"The notes pinned to the site's chart, newest first: the dashboard's own. `from` and `to` keep the notes of those days. A list: `{ data, nextCursor }`. Walk it by passing `nextCursor` as `cursor`; the last page answers `nextCursor: null`. Reuse a cursor only with the same parameters.","tags":["Notes"],"parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string","description":"The site: its domain as registered (example.com), or its site id."}},{"name":"from","in":"query","schema":{"type":"string","minLength":1,"pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"The first day to list, YYYY-MM-DD, inclusive."},"allowEmptyValue":true,"allowReserved":true},{"name":"to","in":"query","schema":{"type":"string","minLength":1,"pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"The last day to list, YYYY-MM-DD, inclusive."},"allowEmptyValue":true,"allowReserved":true},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":500,"default":20,"description":"Page size, newest first. 1–500, default 20."},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","schema":{"type":"string","minLength":1,"maxLength":1000,"description":"Opaque cursor from the previous page's `nextCursor`. Omit for the first page."},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"date":{"type":"string","description":"The day the note is pinned to on the chart, YYYY-MM-DD."},"text":{"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"createdBy":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"}},"required":["name"]},{"type":"null"}],"description":"Who wrote the note: a person, or the API key that created it. An edit keeps the author. Null once the author is deleted, and for a note an OAuth connection wrote."}},"required":["id","date","text","createdAt","updatedAt","createdBy"]}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Pass as `cursor` for the next page. Null on the last page."}},"required":["data","nextCursor"]}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"422":{"$ref":"#/components/responses/Error422"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}}},"post":{"operationId":"createNote","summary":"Create a note","description":"Pins a note to a day of the site's chart, as the dashboard does. An API key is its author, and the chart names it. A note from an OAuth connection names no author.","tags":["Notes"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"date":{"type":"string","minLength":1,"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"text":{"type":"string","minLength":1,"maxLength":200}},"required":["date","text"]}}}},"parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string","description":"The site: its domain as registered (example.com), or its site id."}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string up to 255 characters, such as a UUID. A retry with the same key and body within 24 hours answers what the first call did, without writing again.","schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"date":{"type":"string","description":"The day the note is pinned to on the chart, YYYY-MM-DD."},"text":{"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"createdBy":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"}},"required":["name"]},{"type":"null"}],"description":"Who wrote the note: a person, or the API key that created it. An edit keeps the author. Null once the author is deleted, and for a note an OAuth connection wrote."}},"required":["id","date","text","createdAt","updatedAt","createdBy"]}},"required":["data"]}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"}}},"400":{"$ref":"#/components/responses/WriteError400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/WriteError403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/WriteError409"},"413":{"$ref":"#/components/responses/WriteError413"},"422":{"$ref":"#/components/responses/WriteError422"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}}}},"/sites/{site}/notes/{id}":{"get":{"operationId":"getNote","summary":"Get a note","description":"One note of the site, by its id.","tags":["Notes"],"parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string","description":"The site: its domain as registered (example.com), or its site id."}},{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The note's id, from the notes list."}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"date":{"type":"string","description":"The day the note is pinned to on the chart, YYYY-MM-DD."},"text":{"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"createdBy":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"}},"required":["name"]},{"type":"null"}],"description":"Who wrote the note: a person, or the API key that created it. An edit keeps the author. Null once the author is deleted, and for a note an OAuth connection wrote."}},"required":["id","date","text","createdAt","updatedAt","createdBy"]}},"required":["data"]}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"422":{"$ref":"#/components/responses/Error422"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}}},"patch":{"operationId":"updateNote","summary":"Update a note","description":"Moves a note to another day, rewrites it, or both. The note keeps its author.","tags":["Notes"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"date":{"type":"string","minLength":1,"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"text":{"type":"string","minLength":1,"maxLength":200}}}}}},"parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string","description":"The site: its domain as registered (example.com), or its site id."}},{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The note's id, from the notes list."}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"date":{"type":"string","description":"The day the note is pinned to on the chart, YYYY-MM-DD."},"text":{"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"createdBy":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"}},"required":["name"]},{"type":"null"}],"description":"Who wrote the note: a person, or the API key that created it. An edit keeps the author. Null once the author is deleted, and for a note an OAuth connection wrote."}},"required":["id","date","text","createdAt","updatedAt","createdBy"]}},"required":["data"]}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"}}},"400":{"$ref":"#/components/responses/WriteError400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/WriteError403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/WriteError409"},"413":{"$ref":"#/components/responses/WriteError413"},"422":{"$ref":"#/components/responses/WriteError422"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}}},"delete":{"operationId":"deleteNote","summary":"Delete a note","description":"Removes a note from the site's chart.","tags":["Notes"],"parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string","description":"The site: its domain as registered (example.com), or its site id."}},{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The note's id, from the notes list."}}],"responses":{"204":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"}}},"400":{"$ref":"#/components/responses/WriteError400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/WriteError403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/WriteError409"},"413":{"$ref":"#/components/responses/WriteError413"},"422":{"$ref":"#/components/responses/WriteError422"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}}}},"/sites/{site}/goals":{"get":{"operationId":"listGoals","summary":"List goals","description":"The goals saved for the site, oldest first: what each one matches, not its conversions. The goal conversions report counts those over a range.","tags":["Goals"],"parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string","description":"The site: its domain as registered (example.com), or its site id."}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"enum":["page","event"],"type":"string","description":"`page` counts a pageview, `event` a custom event."},"match":{"type":"string","description":"A page goal's path, `*` wildcards allowed, or an event goal's exact event name."},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","name","type","match","createdAt"]}},"nextCursor":{"type":"null"}},"required":["data","nextCursor"]}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"422":{"$ref":"#/components/responses/Error422"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}}},"post":{"operationId":"createGoal","summary":"Create a goal","description":"Saves a goal on the site, as the dashboard's Goals settings do. Conversions are counted when they are read, so a new goal counts past days too. A site counts one goal per type and match: a second answers 409 `GOAL_EXISTS`, with the existing goal's `id`. A site has at most 100 goals: one more answers 422 `GOAL_LIMIT_REACHED`.","tags":["Goals"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100,"description":"The goal's name, as the Goals card shows it."},"type":{"enum":["page","event"],"type":"string","description":"`page` counts a pageview, `event` a custom event."},"match":{"type":"string","minLength":1,"maxLength":500,"description":"A page goal's path, `*` wildcards allowed, or an event goal's exact event name. A path is stored with a leading slash and no trailing one."}},"required":["name","type","match"]}}}},"parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string","description":"The site: its domain as registered (example.com), or its site id."}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string up to 255 characters, such as a UUID. A retry with the same key and body within 24 hours answers what the first call did, without writing again.","schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"enum":["page","event"],"type":"string","description":"`page` counts a pageview, `event` a custom event."},"match":{"type":"string","description":"A page goal's path, `*` wildcards allowed, or an event goal's exact event name."},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","name","type","match","createdAt"]}},"required":["data"]}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"}}},"400":{"$ref":"#/components/responses/WriteError400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/WriteError403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/WriteError409"},"413":{"$ref":"#/components/responses/WriteError413"},"422":{"$ref":"#/components/responses/WriteError422"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}}}},"/sites/{site}/goals/{id}":{"get":{"operationId":"getGoal","summary":"Get a goal","description":"One goal of the site, by its id.","tags":["Goals"],"parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string","description":"The site: its domain as registered (example.com), or its site id."}},{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The goal's id, from the goals list."}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"enum":["page","event"],"type":"string","description":"`page` counts a pageview, `event` a custom event."},"match":{"type":"string","description":"A page goal's path, `*` wildcards allowed, or an event goal's exact event name."},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","name","type","match","createdAt"]}},"required":["data"]}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"422":{"$ref":"#/components/responses/Error422"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}}},"patch":{"operationId":"updateGoal","summary":"Update a goal","description":"Renames a goal or changes what it matches. Conversions are evaluated when they are read, so an edited match counts on past days too, and the goal's earlier figures change with it. A `match` alone keeps the goal's type; a `type` needs its `match`, since a page path and an event name do not translate. A site counts one goal per type and match: a second answers 409 `GOAL_EXISTS`, with the existing goal's `id`.","tags":["Goals"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100,"description":"The goal's name, as the Goals card shows it."},"type":{"enum":["page","event"],"type":"string","description":"`page` counts a pageview, `event` a custom event."},"match":{"type":"string","minLength":1,"maxLength":500,"description":"A page goal's path, `*` wildcards allowed, or an event goal's exact event name. A path is stored with a leading slash and no trailing one."}}}}}},"parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string","description":"The site: its domain as registered (example.com), or its site id."}},{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The goal's id, from the goals list."}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"enum":["page","event"],"type":"string","description":"`page` counts a pageview, `event` a custom event."},"match":{"type":"string","description":"A page goal's path, `*` wildcards allowed, or an event goal's exact event name."},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","name","type","match","createdAt"]}},"required":["data"]}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"}}},"400":{"$ref":"#/components/responses/WriteError400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/WriteError403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/WriteError409"},"413":{"$ref":"#/components/responses/WriteError413"},"422":{"$ref":"#/components/responses/WriteError422"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}}},"delete":{"operationId":"deleteGoal","summary":"Delete a goal","description":"Removes a goal from the site. The events it counted stay.","tags":["Goals"],"parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string","description":"The site: its domain as registered (example.com), or its site id."}},{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The goal's id, from the goals list."}}],"responses":{"204":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"}}},"400":{"$ref":"#/components/responses/WriteError400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/WriteError403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/WriteError409"},"413":{"$ref":"#/components/responses/WriteError413"},"422":{"$ref":"#/components/responses/WriteError422"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}}}},"/sites/{site}/funnels":{"get":{"operationId":"listFunnels","summary":"List saved funnels","description":"The funnels saved for the site, oldest first. Evaluate one by its id.","tags":["Funnels"],"parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string","description":"The site: its domain as registered (example.com), or its site id."}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"steps":{"type":"array","items":{"type":"object","properties":{"type":{"enum":["page","event"],"type":"string"},"match":{"type":"string","minLength":1,"maxLength":500}},"required":["type","match"]}},"windowHours":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Hours allowed between the first and the last step."},"unit":{"enum":["visitor","session"],"type":"string","description":"Whether a visitor or each session walks the funnel."},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","name","steps","windowHours","unit","createdAt"]}},"nextCursor":{"type":"null"}},"required":["data","nextCursor"]}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"422":{"$ref":"#/components/responses/Error422"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}}},"post":{"operationId":"createFunnel","summary":"Create a funnel","description":"Saves a funnel on the site, as the dashboard's funnel builder does. It counts past days too: a funnel is evaluated when it is read. `getFunnelPreview` checks the steps before you save them. A site has at most 50 funnels: one more answers 422 `FUNNEL_LIMIT_REACHED`.","tags":["Funnels"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100,"description":"The funnel's name, as the funnels page lists it."},"steps":{"type":"array","minItems":2,"maxItems":8,"items":{"type":"object","properties":{"type":{"enum":["page","event"],"type":"string"},"match":{"type":"string","minLength":1,"maxLength":500}},"required":["type","match"]},"description":"2–8 steps, in order. A page step matches a path, `*` wildcards allowed; an event step matches the exact event name."},"windowHours":{"type":"integer","minimum":1,"maximum":2160,"default":24,"description":"Hours allowed between the first and the last step, 1–2160. Defaults to 24."},"unit":{"enum":["visitor","session"],"type":"string","description":"Count a visitor across sessions (`visitor`), or each session on its own (`session`).","default":"visitor"}},"required":["name","steps"]}}}},"parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string","description":"The site: its domain as registered (example.com), or its site id."}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string up to 255 characters, such as a UUID. A retry with the same key and body within 24 hours answers what the first call did, without writing again.","schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"steps":{"type":"array","items":{"type":"object","properties":{"type":{"enum":["page","event"],"type":"string"},"match":{"type":"string","minLength":1,"maxLength":500}},"required":["type","match"]}},"windowHours":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Hours allowed between the first and the last step."},"unit":{"enum":["visitor","session"],"type":"string","description":"Whether a visitor or each session walks the funnel."},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","name","steps","windowHours","unit","createdAt"]}},"required":["data"]}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"}}},"400":{"$ref":"#/components/responses/WriteError400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/WriteError403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/WriteError409"},"413":{"$ref":"#/components/responses/WriteError413"},"422":{"$ref":"#/components/responses/WriteError422"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}}}},"/sites/{site}/funnels/{id}":{"get":{"operationId":"getFunnel","summary":"Evaluate a saved funnel","description":"How many visitors reached each step of the saved funnel, in order and within its window, over the range: one overall row, or one per value of `breakdown`.","tags":["Funnels"],"parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string","description":"The site: its domain as registered (example.com), or its site id."}},{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The funnel's id, from the funnels list."}},{"name":"period","in":"query","schema":{"anyOf":[{"enum":["day","week","month","year","all","custom"],"type":"string"},{"type":"string","pattern":"^([1-9]\\d{0,3})(mo|m|h|d|w)$"}],"default":"7d","description":"The range: a calendar unit (day, week, month, year) positioned by `date`; a window ending now as a count and unit, m h d w mo (30m, 24h, 7d, 2w, 3mo); all; or custom, which reads `from` and `to`. Defaults to 7d."},"allowEmptyValue":true,"allowReserved":true},{"name":"date","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Which day/week/month/year a unit preset refers to, YYYY-MM-DD in the site's timezone. Omitted means the current one."},"allowEmptyValue":true,"allowReserved":true},{"name":"from","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"First day of a custom range, YYYY-MM-DD, inclusive."},"allowEmptyValue":true,"allowReserved":true},{"name":"to","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Last day of a custom range, YYYY-MM-DD, inclusive."},"allowEmptyValue":true,"allowReserved":true},{"name":"filter","in":"query","schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"default":[],"description":"Repeatable filter, written dimension[.key]:operator:value. Only the first two colons separate, so values may contain them. Dimensions: page_path, entry_page, exit_page, hostname, country, region, city, browser, os, device_type, referrer_source, referrer_domain, referrer_channel, utm_source, utm_medium, utm_campaign, utm_content, utm_term, event_name, goal, property (property and goal take a key). Operators: is, is_not, contains; country, region, goal take is and is_not only. A region takes the name the locations report gives it, an ISO 3166-2 code (region:is:DE-BY). Examples: filter=country:is:DE, filter=property.plan:is:pro. Repeat the parameter to combine up to 20 filters; they all have to match."},"allowEmptyValue":true,"allowReserved":true},{"name":"breakdown","in":"query","schema":{"enum":["referrer_source","country","device_type"],"type":"string","description":"Split every step by this dimension instead of returning one overall row."},"allowEmptyValue":true,"allowReserved":true},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":50,"default":10,"description":"Breakdown rows to return, by first-step size. 1–50."},"allowEmptyValue":true,"allowReserved":true},{"name":"unit","in":"query","schema":{"enum":["visitor","session"],"type":"string","description":"Count a visitor across sessions, or each session. Absent: the funnel's own."},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"The breakdown value, or an empty string for the overall row."},"domain":{"type":"string","description":"A source's host for its favicon, or an empty string."},"steps":{"type":"array","items":{"type":"object","properties":{"step":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"1-based position in the funnel."},"visitors":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Visitors (or sessions) that reached the step in order."},"fromPrevious":{"type":"number","description":"Percent, 0 to 100. Of the previous step; 100 on step 1."},"fromFirst":{"type":"number","description":"Percent, 0 to 100. Of step 1."},"dropoff":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Lost since the previous step; 0 on step 1."}},"required":["step","visitors","fromPrevious","fromFirst","dropoff"]}}},"required":["name","domain","steps"]}},"nextCursor":{"type":"null"},"meta":{"type":"object","properties":{"timezone":{"type":"string","description":"The site's timezone, which every day boundary falls in."},"currency":{"type":"string","description":"ISO 4217 code of every amount in the response."},"range":{"anyOf":[{"type":"object","properties":{"from":{"type":"string","description":"ISO 8601, inclusive."},"to":{"type":"string","description":"ISO 8601, exclusive."}},"required":["from","to"]},{"type":"null"}],"description":"The instants the period resolved to."},"compare":{"anyOf":[{"type":"object","properties":{"from":{"type":"string","description":"ISO 8601, inclusive."},"to":{"type":"string","description":"ISO 8601, exclusive."}},"required":["from","to"]},{"type":"null"}],"description":"The comparison range, when one was asked for."}},"required":["timezone","currency","range","compare"]}},"required":["data","nextCursor","meta"]}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"422":{"$ref":"#/components/responses/Error422"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}}},"patch":{"operationId":"updateFunnel","summary":"Update a funnel","description":"Renames a funnel or changes what it counts. Send any of `name`, `steps`, `windowHours` and `unit`; `steps` replaces the stored steps whole. The funnel is evaluated when it is read, so the change applies to past days too.","tags":["Funnels"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100,"description":"The funnel's name, as the funnels page lists it."},"steps":{"type":"array","minItems":2,"maxItems":8,"items":{"type":"object","properties":{"type":{"enum":["page","event"],"type":"string"},"match":{"type":"string","minLength":1,"maxLength":500}},"required":["type","match"]},"description":"2–8 steps, in order. A page step matches a path, `*` wildcards allowed; an event step matches the exact event name."},"windowHours":{"type":"integer","minimum":1,"maximum":2160,"description":"Hours allowed between the first and the last step, 1–2160."},"unit":{"enum":["visitor","session"],"type":"string","description":"Count a visitor across sessions (`visitor`), or each session on its own (`session`)."}}}}}},"parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string","description":"The site: its domain as registered (example.com), or its site id."}},{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The funnel's id, from the funnels list."}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"steps":{"type":"array","items":{"type":"object","properties":{"type":{"enum":["page","event"],"type":"string"},"match":{"type":"string","minLength":1,"maxLength":500}},"required":["type","match"]}},"windowHours":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Hours allowed between the first and the last step."},"unit":{"enum":["visitor","session"],"type":"string","description":"Whether a visitor or each session walks the funnel."},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","name","steps","windowHours","unit","createdAt"]}},"required":["data"]}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"}}},"400":{"$ref":"#/components/responses/WriteError400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/WriteError403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/WriteError409"},"413":{"$ref":"#/components/responses/WriteError413"},"422":{"$ref":"#/components/responses/WriteError422"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}}},"delete":{"operationId":"deleteFunnel","summary":"Delete a funnel","description":"Removes a saved funnel from the site. The events it counted stay.","tags":["Funnels"],"parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string","description":"The site: its domain as registered (example.com), or its site id."}},{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The funnel's id, from the funnels list."}}],"responses":{"204":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"}}},"400":{"$ref":"#/components/responses/WriteError400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/WriteError403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/WriteError409"},"413":{"$ref":"#/components/responses/WriteError413"},"422":{"$ref":"#/components/responses/WriteError422"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}}}},"/sites/{site}/funnel-preview":{"get":{"operationId":"getFunnelPreview","summary":"Evaluate unsaved funnel steps","description":"What `getFunnel` answers, for steps that are not saved: check a funnel before you create it. Pass each step as a `step` parameter, in order. A read key may call it.","tags":["Funnels"],"parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string","description":"The site: its domain as registered (example.com), or its site id."}},{"name":"period","in":"query","required":false,"schema":{"anyOf":[{"enum":["day","week","month","year","all","custom"],"type":"string"},{"type":"string","pattern":"^([1-9]\\d{0,3})(mo|m|h|d|w)$"}],"default":"7d","description":"The range: a calendar unit (day, week, month, year) positioned by `date`; a window ending now as a count and unit, m h d w mo (30m, 24h, 7d, 2w, 3mo); all; or custom, which reads `from` and `to`. Defaults to 7d."},"allowEmptyValue":true,"allowReserved":true},{"name":"date","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Which day/week/month/year a unit preset refers to, YYYY-MM-DD in the site's timezone. Omitted means the current one."},"allowEmptyValue":true,"allowReserved":true},{"name":"from","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"First day of a custom range, YYYY-MM-DD, inclusive."},"allowEmptyValue":true,"allowReserved":true},{"name":"to","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Last day of a custom range, YYYY-MM-DD, inclusive."},"allowEmptyValue":true,"allowReserved":true},{"name":"filter","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"default":[],"description":"Repeatable filter, written dimension[.key]:operator:value. Only the first two colons separate, so values may contain them. Dimensions: page_path, entry_page, exit_page, hostname, country, region, city, browser, os, device_type, referrer_source, referrer_domain, referrer_channel, utm_source, utm_medium, utm_campaign, utm_content, utm_term, event_name, goal, property (property and goal take a key). Operators: is, is_not, contains; country, region, goal take is and is_not only. A region takes the name the locations report gives it, an ISO 3166-2 code (region:is:DE-BY). Examples: filter=country:is:DE, filter=property.plan:is:pro. Repeat the parameter to combine up to 20 filters; they all have to match."},"allowEmptyValue":true,"allowReserved":true},{"name":"breakdown","in":"query","required":false,"schema":{"enum":["referrer_source","country","device_type"],"type":"string","description":"Split every step by this dimension instead of returning one overall row."},"allowEmptyValue":true,"allowReserved":true},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":50,"default":10,"description":"Breakdown rows to return, by first-step size. 1–50."},"allowEmptyValue":true,"allowReserved":true},{"name":"step","in":"query","required":true,"schema":{"anyOf":[{"type":"string","maxLength":510},{"type":"array","items":{"type":"string","maxLength":510}}],"description":"Repeatable funnel step, written type:match, in order: 2–8 of them. The type is `page` (a path, `*` wildcards allowed) or `event` (the exact event name). Only the first colon separates. Example: step=page:/pricing&step=event:Signup."},"allowEmptyValue":true,"allowReserved":true},{"name":"windowHours","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":2160,"default":24,"description":"Hours allowed between the first and the last step, 1–2160. Defaults to 24."},"allowEmptyValue":true,"allowReserved":true},{"name":"unit","in":"query","required":false,"schema":{"enum":["visitor","session"],"type":"string","description":"Count a visitor across sessions (`visitor`), or each session on its own (`session`).","default":"visitor"},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"The breakdown value, or an empty string for the overall row."},"domain":{"type":"string","description":"A source's host for its favicon, or an empty string."},"steps":{"type":"array","items":{"type":"object","properties":{"step":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0,"description":"1-based position in the funnel."},"visitors":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Visitors (or sessions) that reached the step in order."},"fromPrevious":{"type":"number","description":"Percent, 0 to 100. Of the previous step; 100 on step 1."},"fromFirst":{"type":"number","description":"Percent, 0 to 100. Of step 1."},"dropoff":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Lost since the previous step; 0 on step 1."}},"required":["step","visitors","fromPrevious","fromFirst","dropoff"]}}},"required":["name","domain","steps"]}},"nextCursor":{"type":"null"},"meta":{"type":"object","properties":{"timezone":{"type":"string","description":"The site's timezone, which every day boundary falls in."},"currency":{"type":"string","description":"ISO 4217 code of every amount in the response."},"range":{"anyOf":[{"type":"object","properties":{"from":{"type":"string","description":"ISO 8601, inclusive."},"to":{"type":"string","description":"ISO 8601, exclusive."}},"required":["from","to"]},{"type":"null"}],"description":"The instants the period resolved to."},"compare":{"anyOf":[{"type":"object","properties":{"from":{"type":"string","description":"ISO 8601, inclusive."},"to":{"type":"string","description":"ISO 8601, exclusive."}},"required":["from","to"]},{"type":"null"}],"description":"The comparison range, when one was asked for."}},"required":["timezone","currency","range","compare"]}},"required":["data","nextCursor","meta"]}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"422":{"$ref":"#/components/responses/Error422"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}}}},"/sites/{site}/reports":{"get":{"operationId":"listReports","summary":"List saved reports","description":"The saved reports of the site's Reports page, in grid order. A list: `{ data, nextCursor }`, every report on one page.","tags":["Reports"],"parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string","description":"The site: its domain as registered (example.com), or its site id."}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"enum":["trend","list"],"type":"string"},"metric":{"enum":["visitors","sessions","pageviews","events","bounceRate","avgDuration","revenue"],"type":"string"},"dimension":{"anyOf":[{"type":"string"},{"type":"null"}]},"propertyKey":{"anyOf":[{"type":"string"},{"type":"null"}]},"series":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"filters":{"type":"array","items":{"type":"string"},"description":"In the grammar `filter=` takes, dimension[.key]:operator:value."}},"required":["label","filters"]}},"period":{"anyOf":[{"type":"string"},{"type":"null"}]},"granularity":{"anyOf":[{"enum":["hour","day","week","month"],"type":"string"},{"type":"null"}]},"showRevenue":{"type":"boolean"},"position":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The report's place in the grid, ascending."},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","name","type","metric","dimension","propertyKey","series","period","granularity","showRevenue","position","createdAt","updatedAt"]}},"nextCursor":{"type":"null"}},"required":["data","nextCursor"]}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"422":{"$ref":"#/components/responses/Error422"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}}},"post":{"operationId":"createReport","summary":"Create a saved report","description":"Adds a report to the end of the site's Reports page, checked as the dashboard's builder checks it.","tags":["Reports"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100,"description":"The tile's title."},"type":{"enum":["trend","list"],"type":"string","description":"trend charts the metric over time; list ranks the rows of one dimension."},"metric":{"enum":["visitors","sessions","pageviews","events","bounceRate","avgDuration","revenue"],"type":"string","default":"visitors","description":"What a trend charts per bucket. `events` counts the event each series names. A list ranks by its dimension's own count, as its dashboard card does."},"dimension":{"anyOf":[{"enum":["page_path","entry_page","exit_page","hostname","country","region","city","browser","os","device_type","referrer_source","referrer_domain","referrer_channel","utm_source","utm_medium","utm_campaign","utm_content","utm_term","event_name","goal","property"],"type":"string"},{"type":"null"}],"default":null,"description":"A list's rows: a filter dimension a dashboard card lists (page_path, entry_page, exit_page, hostname, country, region, city, browser, os, device_type, referrer_source, referrer_channel, utm_*, event_name), or property. Null for a trend."},"propertyKey":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}],"default":null,"description":"The event property a list by `property` ranks the values of. Null otherwise."},"series":{"type":"array","minItems":1,"maxItems":3,"items":{"type":"object","properties":{"label":{"type":"string","maxLength":100,"default":"","description":"The line's name in the legend. Empty names it by its filters' values."},"filters":{"type":"array","maxItems":20,"items":{"type":"string","maxLength":1200},"default":[],"description":"The filters the line counts under, in the grammar `filter=` takes, dimension[.key]:operator:value. All have to match."}}},"description":"One to 3 series for a trend, each drawn as its own line of the same metric; exactly one for a list, whose filters narrow its rows. An `events` trend names its event on every series with `event_name:is:<name>` or `goal.event:is:<name>`."},"period":{"anyOf":[{"anyOf":[{"enum":["day","week","month","year","all"],"type":"string"},{"type":"string","pattern":"^([1-9]\\d{0,3})(mo|m|h|d|w)$"}]},{"type":"null"}],"default":null,"description":"The range the tile always reads: a calendar period (day, week, month, year), all, or a window of an hour or more (24h, 30d, 3mo). Null follows the Reports page's picker."},"granularity":{"anyOf":[{"enum":["hour","day","week","month"],"type":"string"},{"type":"null"}],"default":null,"description":"A trend's bucket size. Null follows the range's length, as the dashboard's chart does."},"showRevenue":{"type":"boolean","default":true,"description":"Whether a list's tile shows its revenue column, once the site has sold. A display choice: the report's results carry each row's revenue either way."}},"required":["name","type","series"]}}}},"parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string","description":"The site: its domain as registered (example.com), or its site id."}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string up to 255 characters, such as a UUID. A retry with the same key and body within 24 hours answers what the first call did, without writing again.","schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"enum":["trend","list"],"type":"string"},"metric":{"enum":["visitors","sessions","pageviews","events","bounceRate","avgDuration","revenue"],"type":"string"},"dimension":{"anyOf":[{"type":"string"},{"type":"null"}]},"propertyKey":{"anyOf":[{"type":"string"},{"type":"null"}]},"series":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"filters":{"type":"array","items":{"type":"string"},"description":"In the grammar `filter=` takes, dimension[.key]:operator:value."}},"required":["label","filters"]}},"period":{"anyOf":[{"type":"string"},{"type":"null"}]},"granularity":{"anyOf":[{"enum":["hour","day","week","month"],"type":"string"},{"type":"null"}]},"showRevenue":{"type":"boolean"},"position":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The report's place in the grid, ascending."},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","name","type","metric","dimension","propertyKey","series","period","granularity","showRevenue","position","createdAt","updatedAt"]}},"required":["data"]}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"}}},"400":{"$ref":"#/components/responses/WriteError400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/WriteError403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/WriteError409"},"413":{"$ref":"#/components/responses/WriteError413"},"422":{"$ref":"#/components/responses/WriteError422"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}}}},"/sites/{site}/reports/{id}":{"get":{"operationId":"getReport","summary":"Get a saved report","description":"One saved report's definition, by its id.","tags":["Reports"],"parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string","description":"The site: its domain as registered (example.com), or its site id."}},{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The report's id, from the reports list."}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"enum":["trend","list"],"type":"string"},"metric":{"enum":["visitors","sessions","pageviews","events","bounceRate","avgDuration","revenue"],"type":"string"},"dimension":{"anyOf":[{"type":"string"},{"type":"null"}]},"propertyKey":{"anyOf":[{"type":"string"},{"type":"null"}]},"series":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"filters":{"type":"array","items":{"type":"string"},"description":"In the grammar `filter=` takes, dimension[.key]:operator:value."}},"required":["label","filters"]}},"period":{"anyOf":[{"type":"string"},{"type":"null"}]},"granularity":{"anyOf":[{"enum":["hour","day","week","month"],"type":"string"},{"type":"null"}]},"showRevenue":{"type":"boolean"},"position":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The report's place in the grid, ascending."},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","name","type","metric","dimension","propertyKey","series","period","granularity","showRevenue","position","createdAt","updatedAt"]}},"required":["data"]}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"422":{"$ref":"#/components/responses/Error422"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}}},"patch":{"operationId":"updateReport","summary":"Update a saved report","description":"Rewrites any of a report's fields; the rest keep their values. The result is checked as a whole, as the dashboard's builder checks it. `position` moves the report in the grid.","tags":["Reports"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100,"description":"The tile's title."},"type":{"enum":["trend","list"],"type":"string","description":"trend charts the metric over time; list ranks the rows of one dimension."},"metric":{"enum":["visitors","sessions","pageviews","events","bounceRate","avgDuration","revenue"],"type":"string","description":"What a trend charts per bucket. `events` counts the event each series names. A list ranks by its dimension's own count, as its dashboard card does."},"dimension":{"anyOf":[{"enum":["page_path","entry_page","exit_page","hostname","country","region","city","browser","os","device_type","referrer_source","referrer_domain","referrer_channel","utm_source","utm_medium","utm_campaign","utm_content","utm_term","event_name","goal","property"],"type":"string"},{"type":"null"}],"description":"A list's rows: a filter dimension a dashboard card lists (page_path, entry_page, exit_page, hostname, country, region, city, browser, os, device_type, referrer_source, referrer_channel, utm_*, event_name), or property. Null for a trend."},"propertyKey":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}],"description":"The event property a list by `property` ranks the values of. Null otherwise."},"series":{"type":"array","minItems":1,"maxItems":3,"items":{"type":"object","properties":{"label":{"type":"string","maxLength":100,"default":"","description":"The line's name in the legend. Empty names it by its filters' values."},"filters":{"type":"array","maxItems":20,"items":{"type":"string","maxLength":1200},"default":[],"description":"The filters the line counts under, in the grammar `filter=` takes, dimension[.key]:operator:value. All have to match."}}},"description":"One to 3 series for a trend, each drawn as its own line of the same metric; exactly one for a list, whose filters narrow its rows. An `events` trend names its event on every series with `event_name:is:<name>` or `goal.event:is:<name>`."},"period":{"anyOf":[{"anyOf":[{"enum":["day","week","month","year","all"],"type":"string"},{"type":"string","pattern":"^([1-9]\\d{0,3})(mo|m|h|d|w)$"}]},{"type":"null"}],"description":"The range the tile always reads: a calendar period (day, week, month, year), all, or a window of an hour or more (24h, 30d, 3mo). Null follows the Reports page's picker."},"granularity":{"anyOf":[{"enum":["hour","day","week","month"],"type":"string"},{"type":"null"}],"description":"A trend's bucket size. Null follows the range's length, as the dashboard's chart does."},"showRevenue":{"type":"boolean","description":"Whether a list's tile shows its revenue column, once the site has sold. A display choice: the report's results carry each row's revenue either way."},"position":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Moves the report to this place in the grid, counted from 0, and renumbers the others around it. A number past the end puts it last."}}}}}},"parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string","description":"The site: its domain as registered (example.com), or its site id."}},{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The report's id, from the reports list."}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"type":{"enum":["trend","list"],"type":"string"},"metric":{"enum":["visitors","sessions","pageviews","events","bounceRate","avgDuration","revenue"],"type":"string"},"dimension":{"anyOf":[{"type":"string"},{"type":"null"}]},"propertyKey":{"anyOf":[{"type":"string"},{"type":"null"}]},"series":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"filters":{"type":"array","items":{"type":"string"},"description":"In the grammar `filter=` takes, dimension[.key]:operator:value."}},"required":["label","filters"]}},"period":{"anyOf":[{"type":"string"},{"type":"null"}]},"granularity":{"anyOf":[{"enum":["hour","day","week","month"],"type":"string"},{"type":"null"}]},"showRevenue":{"type":"boolean"},"position":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The report's place in the grid, ascending."},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","name","type","metric","dimension","propertyKey","series","period","granularity","showRevenue","position","createdAt","updatedAt"]}},"required":["data"]}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"}}},"400":{"$ref":"#/components/responses/WriteError400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/WriteError403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/WriteError409"},"413":{"$ref":"#/components/responses/WriteError413"},"422":{"$ref":"#/components/responses/WriteError422"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}}},"delete":{"operationId":"deleteReport","summary":"Delete a saved report","description":"Removes a report from the site's Reports page.","tags":["Reports"],"parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string","description":"The site: its domain as registered (example.com), or its site id."}},{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The report's id, from the reports list."}}],"responses":{"204":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"}}},"400":{"$ref":"#/components/responses/WriteError400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/WriteError403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/WriteError409"},"413":{"$ref":"#/components/responses/WriteError413"},"422":{"$ref":"#/components/responses/WriteError422"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}}}},"/sites/{site}/reports/{id}/results":{"get":{"operationId":"getReportResults","summary":"Get a saved report's figures","description":"The figures the report's tile shows: a trend's buckets per series, or a list's rows, largest first, as the breakdown its dimension's card reads answers them. The report's own `period` applies unless the call passes one, and a report without one reads 7d. `date`, `from` and `to` refine a `period` the call passes, so one sent without it is a 400. A list's rows carry their revenue whatever the report's `showRevenue`. A list by property answers its most common values on one page. Walk it by passing `nextCursor` as `cursor`; the last page answers `nextCursor: null`. Reuse a cursor only with the same parameters.","tags":["Reports"],"parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string","description":"The site: its domain as registered (example.com), or its site id."}},{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The report's id, from the reports list."}},{"name":"period","in":"query","schema":{"anyOf":[{"enum":["day","week","month","year","all","custom"],"type":"string"},{"type":"string","pattern":"^([1-9]\\d{0,3})(mo|m|h|d|w)$"}],"description":"The range, in the grammar the reports take. Absent: the report's own period."},"allowEmptyValue":true,"allowReserved":true},{"name":"date","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Which day/week/month/year a unit period refers to, YYYY-MM-DD."},"allowEmptyValue":true,"allowReserved":true},{"name":"from","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"First day of a custom range, YYYY-MM-DD, inclusive."},"allowEmptyValue":true,"allowReserved":true},{"name":"to","in":"query","schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Last day of a custom range, YYYY-MM-DD, inclusive."},"allowEmptyValue":true,"allowReserved":true},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":500,"default":20,"description":"A list's page size, 1–500, default 20."},"allowEmptyValue":true,"allowReserved":true},{"name":"cursor","in":"query","schema":{"type":"string","minLength":1,"maxLength":8192,"description":"Opaque cursor from the previous page's `nextCursor`. Omit for the first page (largest rows). Reuse it only with the same site, range, filters and tab/dimension. The last page answers `nextCursor: null`."},"allowEmptyValue":true,"allowReserved":true}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"anyOf":[{"type":"object","properties":{"type":{"const":"trend"},"granularity":{"enum":["minute","hour","day","week","month"],"type":"string","description":"The bucket size."},"series":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string","description":"The series' label; empty when its filters name it."},"points":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string","description":"The bucket's start, in the site's timezone."},"value":{"type":"number","description":"The metric in the bucket: a count, a percent, seconds, or minor units of the site's currency for revenue."}},"required":["date","value"]}}},"required":["label","points"]}}},"required":["type","granularity","series"]},{"type":"object","properties":{"type":{"const":"list"},"source":{"const":"pages"},"rows":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string","description":"The page path, or the hostname on the hostnames tab."},"visitors":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Distinct visitors."},"count":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Pageviews (top, hostnames), entrances (entry), exits (exit) or hits (not_found)."},"exitRate":{"type":"number","description":"Percent, 0 to 100. Exit tab only: exits per pageview."},"avgDuration":{"type":"number","description":"Seconds. Top tab only: engaged time per view."},"linkedFrom":{"type":"string","description":"not_found tab only: the page that most often linked here, or an empty string."},"conversionRate":{"type":"number","description":"Percent, 0 to 100. Visitors of the row that converted. Only under a goal filter: a saved goal, an event name or a property."},"revenue":{"type":"number","description":"Integer, minor units of the site's reporting currency (cents for USD)."},"orders":{"type":"number","description":"Orders credited to the row by the attribution weights, to two decimals."}},"required":["path","visitors","count","revenue","orders"]}}},"required":["type","source","rows"]},{"type":"object","properties":{"type":{"const":"list"},"source":{"const":"sources"},"rows":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"The referrer source. An empty string is direct traffic: visits with no referrer, or with a page of the site itself as the referrer. The channels tab names that row Direct."},"visitors":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Distinct visitors."},"conversionRate":{"type":"number","description":"Percent, 0 to 100. Visitors of the row that converted. Only under a goal filter: a saved goal, an event name or a property."},"bounceRate":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Percent, 0 to 100. Sessions that bounced, to one decimal. Null when no session in the range counts."},"avgDuration":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Seconds. Engaged time per session, to one decimal. Null when no session in the range counts."},"revenue":{"type":"number","description":"Integer, minor units of the site's reporting currency (cents for USD)."},"orders":{"type":"number","description":"Orders credited to the row by the attribution weights, to two decimals."},"domain":{"type":"string","description":"A host for the source's favicon, or an empty string. On the direct row it is often the site's own host."},"pageviews":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["name","visitors","bounceRate","avgDuration","revenue","orders","domain","pageviews"]}}},"required":["type","source","rows"]},{"type":"object","properties":{"type":{"const":"list"},"source":{"const":"locations"},"rows":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"A country code, an ISO 3166-2 region code, or a city name. An empty string is a place that could not be recognised."},"visitors":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Distinct visitors."},"conversionRate":{"type":"number","description":"Percent, 0 to 100. Visitors of the row that converted. Only under a goal filter: a saved goal, an event name or a property."},"bounceRate":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Percent, 0 to 100. Sessions that bounced, to one decimal. Null when no session in the range counts."},"avgDuration":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Seconds. Engaged time per session, to one decimal. Null when no session in the range counts."},"revenue":{"type":"number","description":"Integer, minor units of the site's reporting currency (cents for USD)."},"orders":{"type":"number","description":"Orders credited to the row by the attribution weights, to two decimals."},"countryCode":{"type":"string","description":"The row's ISO 3166-1 country code."}},"required":["name","visitors","bounceRate","avgDuration","revenue","orders","countryCode"]}}},"required":["type","source","rows"]},{"type":"object","properties":{"type":{"const":"list"},"source":{"const":"devices"},"rows":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"The browser, operating system or device type. An empty string is one that could not be recognised."},"visitors":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Distinct visitors."},"conversionRate":{"type":"number","description":"Percent, 0 to 100. Visitors of the row that converted. Only under a goal filter: a saved goal, an event name or a property."},"bounceRate":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Percent, 0 to 100. Sessions that bounced, to one decimal. Null when no session in the range counts."},"avgDuration":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Seconds. Engaged time per session, to one decimal. Null when no session in the range counts."},"revenue":{"type":"number","description":"Integer, minor units of the site's reporting currency (cents for USD)."},"orders":{"type":"number","description":"Orders credited to the row by the attribution weights, to two decimals."}},"required":["name","visitors","bounceRate","avgDuration","revenue","orders"]}}},"required":["type","source","rows"]},{"type":"object","properties":{"type":{"const":"list"},"source":{"const":"campaigns"},"rows":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"visitors":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Distinct visitors."},"conversionRate":{"type":"number","description":"Percent, 0 to 100. Visitors of the row that converted. Only under a goal filter: a saved goal, an event name or a property."},"bounceRate":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Percent, 0 to 100. Sessions that bounced, to one decimal. Null when no session in the range counts."},"avgDuration":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Seconds. Engaged time per session, to one decimal. Null when no session in the range counts."},"revenue":{"type":"number","description":"Integer, minor units of the site's reporting currency (cents for USD)."},"orders":{"type":"number","description":"Orders credited to the row by the attribution weights, to two decimals."},"pageviews":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["name","visitors","bounceRate","avgDuration","revenue","orders","pageviews"]}}},"required":["type","source","rows"]},{"type":"object","properties":{"type":{"const":"list"},"source":{"const":"events"},"rows":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"count":{"type":"integer","minimum":0,"maximum":9007199254740991},"visitors":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Distinct visitors."},"share":{"type":"number","description":"Percent, 0 to 100. Visitors in the range who fired the event."},"revenue":{"type":"number","description":"Integer, minor units of the site's reporting currency (cents for USD). The money the event itself carried."}},"required":["name","count","visitors","share","revenue"]}}},"required":["type","source","rows"]},{"type":"object","properties":{"type":{"const":"list"},"source":{"const":"properties"},"rows":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string"},"count":{"type":"integer","minimum":0,"maximum":9007199254740991},"visitors":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Distinct visitors."}},"required":["value","count","visitors"]}}},"required":["type","source","rows"]}]},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Pass as `cursor` for the next page. Null on the last page."},"meta":{"type":"object","properties":{"timezone":{"type":"string","description":"The site's timezone, which every day boundary falls in."},"currency":{"type":"string","description":"ISO 4217 code of every amount in the response."},"range":{"anyOf":[{"type":"object","properties":{"from":{"type":"string","description":"ISO 8601, inclusive."},"to":{"type":"string","description":"ISO 8601, exclusive."}},"required":["from","to"]},{"type":"null"}],"description":"The instants the period resolved to."},"compare":{"anyOf":[{"type":"object","properties":{"from":{"type":"string","description":"ISO 8601, inclusive."},"to":{"type":"string","description":"ISO 8601, exclusive."}},"required":["from","to"]},{"type":"null"}],"description":"The comparison range, when one was asked for."}},"required":["timezone","currency","range","compare"]}},"required":["data","nextCursor","meta"]}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"422":{"$ref":"#/components/responses/Error422"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}}}},"/sites/{site}/share-links":{"get":{"operationId":"listShareLinks","summary":"List share links","description":"The site's public dashboard links, newest first. A read key gets no `url`.","tags":["Share links"],"parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string","description":"The site: its domain as registered (example.com), or its site id."}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"url":{"type":"string","description":"The board's address, which the viewer opens. Left out of a read key's answer: the address opens the board without a key, and keeps opening it after the key is deleted."},"expiresAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}],"description":"ISO 8601 in UTC: the first instant the link no longer opens. Null for never."},"filters":{"type":"array","items":{"type":"string"},"description":"The filters the viewer cannot remove, written as a report's `filter` parameter."},"showNotes":{"type":"boolean","description":"Whether the link shows the chart's notes."},"showRevenue":{"type":"boolean","description":"Whether the link shows revenue."},"hideBranding":{"type":"boolean","description":"Whether the board hides the product's branding."},"hasPassword":{"type":"boolean","description":"Whether the link asks for a password."},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","name","expiresAt","filters","showNotes","showRevenue","hideBranding","hasPassword","createdAt"]}},"nextCursor":{"type":"null"}},"required":["data","nextCursor"]}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"422":{"$ref":"#/components/responses/Error422"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}}},"post":{"operationId":"createShareLink","summary":"Create a share link","description":"Makes a read-only board of the site that opens without an account, as the dashboard's Sharing settings do. The filters are fixed at creation: an update cannot change them. A site has at most 100 share links: one more answers 422 `SHARE_LINK_LIMIT_REACHED`.","tags":["Share links"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100,"description":"The link's name, for the site's own list."},"password":{"type":"string","minLength":6,"maxLength":200,"description":"A password the viewer types before the board opens, 6 to 200 characters. Never returned."},"expiresAt":{"type":"string","format":"date","description":"The last day the link opens, YYYY-MM-DD in the site's timezone."},"filters":{"type":"array","maxItems":20,"items":{"type":"string"},"default":[],"description":"Filters the viewer cannot remove, each written as a report's `filter` parameter, dimension[.key]:operator:value, such as page_path:contains:/blog."},"showNotes":{"type":"boolean","description":"Whether the link shows the chart's notes.","default":false},"showRevenue":{"type":"boolean","description":"Whether the link shows revenue.","default":false},"hideBranding":{"type":"boolean","description":"Whether the board hides the product's branding.","default":false}},"required":["name"]}}}},"parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string","description":"The site: its domain as registered (example.com), or its site id."}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string up to 255 characters, such as a UUID. A retry with the same key and body within 24 hours answers what the first call did, without writing again.","schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"url":{"type":"string","description":"The board's address, which the viewer opens."},"expiresAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}],"description":"ISO 8601 in UTC: the first instant the link no longer opens. Null for never."},"filters":{"type":"array","items":{"type":"string"},"description":"The filters the viewer cannot remove, written as a report's `filter` parameter."},"showNotes":{"type":"boolean","description":"Whether the link shows the chart's notes."},"showRevenue":{"type":"boolean","description":"Whether the link shows revenue."},"hideBranding":{"type":"boolean","description":"Whether the board hides the product's branding."},"hasPassword":{"type":"boolean","description":"Whether the link asks for a password."},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","name","url","expiresAt","filters","showNotes","showRevenue","hideBranding","hasPassword","createdAt"]}},"required":["data"]}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"}}},"400":{"$ref":"#/components/responses/WriteError400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/WriteError403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/WriteError409"},"413":{"$ref":"#/components/responses/WriteError413"},"422":{"$ref":"#/components/responses/WriteError422"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}}}},"/sites/{site}/share-links/{id}":{"get":{"operationId":"getShareLink","summary":"Get a share link","description":"One share link of the site, by its id. A read key gets no `url`.","tags":["Share links"],"parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string","description":"The site: its domain as registered (example.com), or its site id."}},{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The share link's id, from the share links list."}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"url":{"type":"string","description":"The board's address, which the viewer opens. Left out of a read key's answer: the address opens the board without a key, and keeps opening it after the key is deleted."},"expiresAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}],"description":"ISO 8601 in UTC: the first instant the link no longer opens. Null for never."},"filters":{"type":"array","items":{"type":"string"},"description":"The filters the viewer cannot remove, written as a report's `filter` parameter."},"showNotes":{"type":"boolean","description":"Whether the link shows the chart's notes."},"showRevenue":{"type":"boolean","description":"Whether the link shows revenue."},"hideBranding":{"type":"boolean","description":"Whether the board hides the product's branding."},"hasPassword":{"type":"boolean","description":"Whether the link asks for a password."},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","name","expiresAt","filters","showNotes","showRevenue","hideBranding","hasPassword","createdAt"]}},"required":["data"]}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"422":{"$ref":"#/components/responses/Error422"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}}},"patch":{"operationId":"updateShareLink","summary":"Update a share link","description":"Changes the fields sent and keeps the URL. `null` clears the password or the expiry. A viewer who unlocked the board keeps it after a new password, and loses it once the password is cleared.","tags":["Share links"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"password":{"anyOf":[{"type":"string","minLength":6,"maxLength":200,"description":"A password the viewer types before the board opens, 6 to 200 characters. Never returned."},{"type":"null"}]},"expiresAt":{"anyOf":[{"type":"string","format":"date","description":"The last day the link opens, YYYY-MM-DD in the site's timezone."},{"type":"null"}]},"showNotes":{"type":"boolean","description":"Whether the link shows the chart's notes."},"showRevenue":{"type":"boolean","description":"Whether the link shows revenue."},"hideBranding":{"type":"boolean","description":"Whether the board hides the product's branding."}}}}}},"parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string","description":"The site: its domain as registered (example.com), or its site id."}},{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The share link's id, from the share links list."}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"url":{"type":"string","description":"The board's address, which the viewer opens."},"expiresAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}],"description":"ISO 8601 in UTC: the first instant the link no longer opens. Null for never."},"filters":{"type":"array","items":{"type":"string"},"description":"The filters the viewer cannot remove, written as a report's `filter` parameter."},"showNotes":{"type":"boolean","description":"Whether the link shows the chart's notes."},"showRevenue":{"type":"boolean","description":"Whether the link shows revenue."},"hideBranding":{"type":"boolean","description":"Whether the board hides the product's branding."},"hasPassword":{"type":"boolean","description":"Whether the link asks for a password."},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","name","url","expiresAt","filters","showNotes","showRevenue","hideBranding","hasPassword","createdAt"]}},"required":["data"]}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"}}},"400":{"$ref":"#/components/responses/WriteError400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/WriteError403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/WriteError409"},"413":{"$ref":"#/components/responses/WriteError413"},"422":{"$ref":"#/components/responses/WriteError422"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}}},"delete":{"operationId":"deleteShareLink","summary":"Revoke a share link","description":"Deletes the link, so its URL stops opening at once.","tags":["Share links"],"parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string","description":"The site: its domain as registered (example.com), or its site id."}},{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The share link's id, from the share links list."}}],"responses":{"204":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{},{"not":{}}]}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"}}},"400":{"$ref":"#/components/responses/WriteError400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/WriteError403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/WriteError409"},"413":{"$ref":"#/components/responses/WriteError413"},"422":{"$ref":"#/components/responses/WriteError422"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}}}},"/sites/{site}/exports":{"post":{"operationId":"createExport","summary":"Start an export","description":"Starts writing every event of the site into one CSV file, and answers 202 with the export. `getExport` follows it and hands out the download link once it completes. A second export while one runs answers 409 CONFLICT. Takes a write key, as the export takes an owner or admin on the dashboard, and answers while the workspace is closed: the export is how its data leaves before the sites are deleted.","tags":["Exports"],"parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string","description":"The site: its domain as registered (example.com), or its site id."}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string up to 255 characters, such as a UUID. A retry with the same key and body within 24 hours answers what the first call did, without writing again.","schema":{"type":"string","minLength":1,"maxLength":255}}],"responses":{"202":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"status":{"enum":["pending","running","completed","failed","canceled"],"type":"string","description":"`pending` until a worker picks it up; `completed`, `failed` and `canceled` are final."},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"finishedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}],"description":"ISO 8601 in UTC: when the export reached a final status. Null before."},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Why a failed export stopped."},"downloadUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A link that downloads the CSV without a key. Null until the export completes, and again once the link expires."}},"required":["id","status","createdAt","finishedAt","error","downloadUrl"]}},"required":["data"]}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"}}},"400":{"$ref":"#/components/responses/WriteError400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/WriteError403"},"404":{"$ref":"#/components/responses/Error404"},"409":{"$ref":"#/components/responses/WriteError409"},"413":{"$ref":"#/components/responses/WriteError413"},"422":{"$ref":"#/components/responses/WriteError422"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}}}},"/sites/{site}/exports/{id}":{"get":{"operationId":"getExport","summary":"Get an export","description":"An export's status, and its download link once it completes. Takes a write key, as the export takes an owner or admin on the dashboard, and answers while the workspace is closed: the export is how its data leaves before the sites are deleted.","tags":["Exports"],"parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string","description":"The site: its domain as registered (example.com), or its site id."}},{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"The export's id."}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"status":{"enum":["pending","running","completed","failed","canceled"],"type":"string","description":"`pending` until a worker picks it up; `completed`, `failed` and `canceled` are final."},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"finishedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}],"description":"ISO 8601 in UTC: when the export reached a final status. Null before."},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Why a failed export stopped."},"downloadUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A link that downloads the CSV without a key. Null until the export completes, and again once the link expires."}},"required":["id","status","createdAt","finishedAt","error","downloadUrl"]}},"required":["data"]}}},"headers":{"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"},"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"}}},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"422":{"$ref":"#/components/responses/Error422"},"429":{"$ref":"#/components/responses/Error429"},"503":{"$ref":"#/components/responses/Error503"}}}}}}