{"openapi":"3.1.0","info":{"title":"Swetrix (BYOK) API","version":"0.1.0","description":"Swetrix (BYOK) lets an AI assistant read your own Swetrix data through the Swetrix API with a key you supply (Swetrix API key). Read-only: 11 tools (list_projects, traffic_summary, traffic_timeseries, traffic_breakdown, list_custom_events, custom_events_timeseries, performance_summary, performance_breakdown, list_error_groups, list_sessions, live_visitors). The BYOK key travels with each request,...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-swetrix.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-swetrix/docs"},"termsOfService":"https://connectorbay.com/byok-swetrix/terms"},"servers":[{"url":"https://byok-swetrix.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-swetrix/docs"},"security":[{"upstreamKey":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"Optional. A Pro API key raises rate limits; no credentials are required."},"upstreamKey":{"type":"apiKey","in":"header","name":"X-Upstream-Key","description":"Your own key for the service this connector wraps (bring your own key). Used for that one call only; never stored, logged or cached."}},"schemas":{"Error":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object"}}}}},"paths":{"/v1/tools/list_projects":{"post":{"operationId":"list_projects","summary":"List your Swetrix projects with id, name, and whether each is collecting data and has a public dashboard. Use for \"Which","description":"List your Swetrix projects with id, name, and whether each is collecting data and has a public dashboard. Use for \"Which Swetrix projects do I have\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"list_projectsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/traffic_summary":{"post":{"operationId":"traffic_summary","summary":"Visitors, pageviews, users, bounce rate and average session duration for the period, the previous period of equal length","description":"Visitors, pageviews, users, bounce rate and average session duration for the period, the previous period of equal length and the change. Use for \"How did my website traffic change compared with the previous 7 days\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"pid":{"description":"Swetrix project id (list_projects returns it), for example 'WvZCYTrOPzSK'.","maxLength":40,"title":"Pid","type":"string"},"period":{"anyOf":[{"enum":["1h","today","yesterday","1d","7d","4w","3M","12M","24M","all"],"type":"string"},{"type":"null"}],"default":"7d","description":"Time range: 1h, today, yesterday, 1d, 7d, 4w, 3M, 12M, 24M or all. Ignored when from_date and to_date are both given.","title":"Period"},"from_date":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Custom range start as an ISO 8601 date such as 2026-06-01; use together with to_date and leave period out.","title":"From Date"},"to_date":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Custom range end as an ISO 8601 date such as 2026-06-30; use together with from_date.","title":"To Date"},"timezone":{"anyOf":[{"maxLength":60,"type":"string"},{"type":"null"}],"default":null,"description":"IANA time zone used for bucketing and date boundaries, for example Europe/London (default Etc/GMT).","title":"Timezone"},"filters":{"anyOf":[{"maxLength":600,"type":"string"},{"type":"null"}],"default":null,"description":"Optional JSON array of filters, for example [{\"dimension\":\"country\",\"operator\":\"is\",\"value\":[\"US\"]}]; operators are is, is_not, contains, contains_not.","title":"Filters"}},"required":["pid"],"title":"traffic_summaryArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/traffic_timeseries":{"post":{"operationId":"traffic_timeseries","summary":"Traffic metrics per time bucket as rows with ISO timestamps (visitors and pageviews by default). Use for \"How many visit","description":"Traffic metrics per time bucket as rows with ISO timestamps (visitors and pageviews by default). Use for \"How many visitors per day did my site get this month\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"pid":{"description":"Swetrix project id (list_projects returns it), for example 'WvZCYTrOPzSK'.","maxLength":40,"title":"Pid","type":"string"},"period":{"anyOf":[{"enum":["1h","today","yesterday","1d","7d","4w","3M","12M","24M","all"],"type":"string"},{"type":"null"}],"default":"7d","description":"Time range: 1h, today, yesterday, 1d, 7d, 4w, 3M, 12M, 24M or all. Ignored when from_date and to_date are both given.","title":"Period"},"from_date":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Custom range start as an ISO 8601 date such as 2026-06-01; use together with to_date and leave period out.","title":"From Date"},"to_date":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Custom range end as an ISO 8601 date such as 2026-06-30; use together with from_date.","title":"To Date"},"timezone":{"anyOf":[{"maxLength":60,"type":"string"},{"type":"null"}],"default":null,"description":"IANA time zone used for bucketing and date boundaries, for example Europe/London (default Etc/GMT).","title":"Timezone"},"time_bucket":{"anyOf":[{"enum":["minute","hour","day","month","year"],"type":"string"},{"type":"null"}],"default":null,"description":"Time bucket: minute, hour, day, month or year (left out, the service picks the finest allowed).","title":"Time Bucket"},"metrics":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Comma-separated metrics: visitors, sessions, pageviews, session_duration, bounce_rate, concurrency (default visitors,pageviews).","title":"Metrics"},"mode":{"anyOf":[{"enum":["periodical","cumulative"],"type":"string"},{"type":"null"}],"default":null,"description":"periodical (per bucket) or cumulative (running total).","title":"Mode"},"filters":{"anyOf":[{"maxLength":600,"type":"string"},{"type":"null"}],"default":null,"description":"Optional JSON array of filters, for example [{\"dimension\":\"country\",\"operator\":\"is\",\"value\":[\"US\"]}]; operators are is, is_not, contains, contains_not.","title":"Filters"}},"required":["pid"],"title":"traffic_timeseriesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/traffic_breakdown":{"post":{"operationId":"traffic_breakdown","summary":"Traffic metrics grouped by one dimension (country, page, browser, referrer, UTM fields and more), sortable and paginated","description":"Traffic metrics grouped by one dimension (country, page, browser, referrer, UTM fields and more), sortable and paginated. Use for \"Which pages got the most visitors last month\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"pid":{"description":"Swetrix project id (list_projects returns it), for example 'WvZCYTrOPzSK'.","maxLength":40,"title":"Pid","type":"string"},"dimension":{"description":"Dimension to group by.","enum":["country","region","city","page","host","locale","browser","browser_version","os","os_version","device","referrer","utm_source","utm_medium","utm_campaign","utm_term","utm_content","isp","organization","user_type","connection_type","entry_page","exit_page"],"title":"Dimension","type":"string"},"metrics":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Comma-separated metrics: visitors, sessions, pageviews, users (default visitors,pageviews).","title":"Metrics"},"sort":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Sort as field:direction, for example visitors:desc (field is value or a chosen metric).","title":"Sort"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":30,"description":"Rows to return (1 to 100; default 30).","title":"Limit"},"offset":{"anyOf":[{"maximum":100000,"minimum":0,"type":"integer"},{"type":"null"}],"default":0,"description":"Rows to skip for paging; default 0.","title":"Offset"},"period":{"anyOf":[{"enum":["1h","today","yesterday","1d","7d","4w","3M","12M","24M","all"],"type":"string"},{"type":"null"}],"default":"7d","description":"Time range: 1h, today, yesterday, 1d, 7d, 4w, 3M, 12M, 24M or all. Ignored when from_date and to_date are both given.","title":"Period"},"from_date":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Custom range start as an ISO 8601 date such as 2026-06-01; use together with to_date and leave period out.","title":"From Date"},"to_date":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Custom range end as an ISO 8601 date such as 2026-06-30; use together with from_date.","title":"To Date"},"timezone":{"anyOf":[{"maxLength":60,"type":"string"},{"type":"null"}],"default":null,"description":"IANA time zone used for bucketing and date boundaries, for example Europe/London (default Etc/GMT).","title":"Timezone"},"filters":{"anyOf":[{"maxLength":600,"type":"string"},{"type":"null"}],"default":null,"description":"Optional JSON array of filters, for example [{\"dimension\":\"country\",\"operator\":\"is\",\"value\":[\"US\"]}]; operators are is, is_not, contains, contains_not.","title":"Filters"}},"required":["pid","dimension"],"title":"traffic_breakdownArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_custom_events":{"post":{"operationId":"list_custom_events","summary":"Counts of each custom event name in the period, paginated. Use for \"Which custom events fired most often this week and h","description":"Counts of each custom event name in the period, paginated. Use for \"Which custom events fired most often this week and how many times\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"pid":{"description":"Swetrix project id (list_projects returns it), for example 'WvZCYTrOPzSK'.","maxLength":40,"title":"Pid","type":"string"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":30,"description":"Rows to return (1 to 100; default 30).","title":"Limit"},"offset":{"anyOf":[{"maximum":100000,"minimum":0,"type":"integer"},{"type":"null"}],"default":0,"description":"Rows to skip for paging; default 0.","title":"Offset"},"period":{"anyOf":[{"enum":["1h","today","yesterday","1d","7d","4w","3M","12M","24M","all"],"type":"string"},{"type":"null"}],"default":"7d","description":"Time range: 1h, today, yesterday, 1d, 7d, 4w, 3M, 12M, 24M or all. Ignored when from_date and to_date are both given.","title":"Period"},"from_date":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Custom range start as an ISO 8601 date such as 2026-06-01; use together with to_date and leave period out.","title":"From Date"},"to_date":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Custom range end as an ISO 8601 date such as 2026-06-30; use together with from_date.","title":"To Date"},"timezone":{"anyOf":[{"maxLength":60,"type":"string"},{"type":"null"}],"default":null,"description":"IANA time zone used for bucketing and date boundaries, for example Europe/London (default Etc/GMT).","title":"Timezone"},"filters":{"anyOf":[{"maxLength":600,"type":"string"},{"type":"null"}],"default":null,"description":"Optional JSON array of filters, for example [{\"dimension\":\"country\",\"operator\":\"is\",\"value\":[\"US\"]}]; operators are is, is_not, contains, contains_not.","title":"Filters"}},"required":["pid"],"title":"list_custom_eventsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/custom_events_timeseries":{"post":{"operationId":"custom_events_timeseries","summary":"Occurrences of named custom events per time bucket. Use for \"How many signups and purchases happened each day this week\"","description":"Occurrences of named custom events per time bucket. Use for \"How many signups and purchases happened each day this week\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"pid":{"description":"Swetrix project id (list_projects returns it), for example 'WvZCYTrOPzSK'.","maxLength":40,"title":"Pid","type":"string"},"events":{"description":"Comma-separated custom event names, for example 'signup,purchase'.","maxLength":300,"title":"Events","type":"string"},"time_bucket":{"anyOf":[{"enum":["minute","hour","day","month","year"],"type":"string"},{"type":"null"}],"default":null,"description":"Time bucket: minute, hour, day, month or year (left out, the service picks the finest allowed).","title":"Time Bucket"},"period":{"anyOf":[{"enum":["1h","today","yesterday","1d","7d","4w","3M","12M","24M","all"],"type":"string"},{"type":"null"}],"default":"7d","description":"Time range: 1h, today, yesterday, 1d, 7d, 4w, 3M, 12M, 24M or all. Ignored when from_date and to_date are both given.","title":"Period"},"from_date":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Custom range start as an ISO 8601 date such as 2026-06-01; use together with to_date and leave period out.","title":"From Date"},"to_date":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Custom range end as an ISO 8601 date such as 2026-06-30; use together with from_date.","title":"To Date"},"timezone":{"anyOf":[{"maxLength":60,"type":"string"},{"type":"null"}],"default":null,"description":"IANA time zone used for bucketing and date boundaries, for example Europe/London (default Etc/GMT).","title":"Timezone"},"filters":{"anyOf":[{"maxLength":600,"type":"string"},{"type":"null"}],"default":null,"description":"Optional JSON array of filters, for example [{\"dimension\":\"country\",\"operator\":\"is\",\"value\":[\"US\"]}]; operators are is, is_not, contains, contains_not.","title":"Filters"}},"required":["pid","events"],"title":"custom_events_timeseriesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/performance_summary":{"post":{"operationId":"performance_summary","summary":"Average frontend, network and backend load timings in seconds for the period, the previous period and the change. Use fo","description":"Average frontend, network and backend load timings in seconds for the period, the previous period and the change. Use for \"Is my site slower than last week\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"pid":{"description":"Swetrix project id (list_projects returns it), for example 'WvZCYTrOPzSK'.","maxLength":40,"title":"Pid","type":"string"},"period":{"anyOf":[{"enum":["1h","today","yesterday","1d","7d","4w","3M","12M","24M","all"],"type":"string"},{"type":"null"}],"default":"7d","description":"Time range: 1h, today, yesterday, 1d, 7d, 4w, 3M, 12M, 24M or all. Ignored when from_date and to_date are both given.","title":"Period"},"from_date":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Custom range start as an ISO 8601 date such as 2026-06-01; use together with to_date and leave period out.","title":"From Date"},"to_date":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Custom range end as an ISO 8601 date such as 2026-06-30; use together with from_date.","title":"To Date"},"timezone":{"anyOf":[{"maxLength":60,"type":"string"},{"type":"null"}],"default":null,"description":"IANA time zone used for bucketing and date boundaries, for example Europe/London (default Etc/GMT).","title":"Timezone"},"measure":{"anyOf":[{"enum":["median","average","p75","p95"],"type":"string"},{"type":"null"}],"default":null,"description":"Aggregation: median (default), average, p75 or p95.","title":"Measure"},"filters":{"anyOf":[{"maxLength":600,"type":"string"},{"type":"null"}],"default":null,"description":"Optional JSON array of filters, for example [{\"dimension\":\"country\",\"operator\":\"is\",\"value\":[\"US\"]}]; operators are is, is_not, contains, contains_not.","title":"Filters"}},"required":["pid"],"title":"performance_summaryArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/performance_breakdown":{"post":{"operationId":"performance_breakdown","summary":"Page load timings in seconds grouped by one dimension such as country, browser or page. Use for \"Which countries have th","description":"Page load timings in seconds grouped by one dimension such as country, browser or page. Use for \"Which countries have the slowest load time\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"pid":{"description":"Swetrix project id (list_projects returns it), for example 'WvZCYTrOPzSK'.","maxLength":40,"title":"Pid","type":"string"},"dimension":{"description":"Dimension to group by, for example country, browser, os, device or page.","maxLength":40,"title":"Dimension","type":"string"},"metrics":{"anyOf":[{"maxLength":100,"type":"string"},{"type":"null"}],"default":null,"description":"Comma-separated metrics: load_time, ttfb, dns, tls, connection, response, render, dom_load (default load_time).","title":"Metrics"},"measure":{"anyOf":[{"enum":["median","average","p75","p95"],"type":"string"},{"type":"null"}],"default":null,"description":"Aggregation: median (default), average, p75 or p95.","title":"Measure"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":30,"description":"Rows to return (1 to 100; default 30).","title":"Limit"},"offset":{"anyOf":[{"maximum":100000,"minimum":0,"type":"integer"},{"type":"null"}],"default":0,"description":"Rows to skip for paging; default 0.","title":"Offset"},"period":{"anyOf":[{"enum":["1h","today","yesterday","1d","7d","4w","3M","12M","24M","all"],"type":"string"},{"type":"null"}],"default":"7d","description":"Time range: 1h, today, yesterday, 1d, 7d, 4w, 3M, 12M, 24M or all. Ignored when from_date and to_date are both given.","title":"Period"},"from_date":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Custom range start as an ISO 8601 date such as 2026-06-01; use together with to_date and leave period out.","title":"From Date"},"to_date":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Custom range end as an ISO 8601 date such as 2026-06-30; use together with from_date.","title":"To Date"},"timezone":{"anyOf":[{"maxLength":60,"type":"string"},{"type":"null"}],"default":null,"description":"IANA time zone used for bucketing and date boundaries, for example Europe/London (default Etc/GMT).","title":"Timezone"},"filters":{"anyOf":[{"maxLength":600,"type":"string"},{"type":"null"}],"default":null,"description":"Optional JSON array of filters, for example [{\"dimension\":\"country\",\"operator\":\"is\",\"value\":[\"US\"]}]; operators are is, is_not, contains, contains_not.","title":"Filters"}},"required":["pid","dimension"],"title":"performance_breakdownArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_error_groups":{"post":{"operationId":"list_error_groups","summary":"List grouped JavaScript errors with name, message, file, occurrence count, affected users and sessions, and status. Use ","description":"List grouped JavaScript errors with name, message, file, occurrence count, affected users and sessions, and status. Use for \"What are the most frequent errors on my site\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"pid":{"description":"Swetrix project id (list_projects returns it), for example 'WvZCYTrOPzSK'.","maxLength":40,"title":"Pid","type":"string"},"period":{"anyOf":[{"enum":["1h","today","yesterday","1d","7d","4w","3M","12M","24M","all"],"type":"string"},{"type":"null"}],"default":"7d","description":"Time range: 1h, today, yesterday, 1d, 7d, 4w, 3M, 12M, 24M or all. Ignored when from_date and to_date are both given.","title":"Period"},"from_date":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Custom range start as an ISO 8601 date such as 2026-06-01; use together with to_date and leave period out.","title":"From Date"},"to_date":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Custom range end as an ISO 8601 date such as 2026-06-30; use together with from_date.","title":"To Date"},"timezone":{"anyOf":[{"maxLength":60,"type":"string"},{"type":"null"}],"default":null,"description":"IANA time zone used for bucketing and date boundaries, for example Europe/London (default Etc/GMT).","title":"Timezone"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":30,"description":"Rows to return (1 to 100; default 30).","title":"Limit"},"offset":{"anyOf":[{"maximum":100000,"minimum":0,"type":"integer"},{"type":"null"}],"default":0,"description":"Rows to skip for paging; default 0.","title":"Offset"},"show_resolved":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":false,"description":"True to include resolved error groups.","title":"Show Resolved"}},"required":["pid"],"title":"list_error_groupsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_sessions":{"post":{"operationId":"list_sessions","summary":"List recent visitor sessions with country, browser, OS, pageviews, start, last activity and duration. Paginated. Use for","description":"List recent visitor sessions with country, browser, OS, pageviews, start, last activity and duration. Paginated. Use for \"Show my latest sessions and how long they lasted\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"pid":{"description":"Swetrix project id (list_projects returns it), for example 'WvZCYTrOPzSK'.","maxLength":40,"title":"Pid","type":"string"},"period":{"anyOf":[{"enum":["1h","today","yesterday","1d","7d","4w","3M","12M","24M","all"],"type":"string"},{"type":"null"}],"default":"7d","description":"Time range: 1h, today, yesterday, 1d, 7d, 4w, 3M, 12M, 24M or all. Ignored when from_date and to_date are both given.","title":"Period"},"from_date":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Custom range start as an ISO 8601 date such as 2026-06-01; use together with to_date and leave period out.","title":"From Date"},"to_date":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Custom range end as an ISO 8601 date such as 2026-06-30; use together with from_date.","title":"To Date"},"timezone":{"anyOf":[{"maxLength":60,"type":"string"},{"type":"null"}],"default":null,"description":"IANA time zone used for bucketing and date boundaries, for example Europe/London (default Etc/GMT).","title":"Timezone"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":30,"description":"Rows to return (1 to 100; default 30).","title":"Limit"},"offset":{"anyOf":[{"maximum":100000,"minimum":0,"type":"integer"},{"type":"null"}],"default":0,"description":"Rows to skip for paging; default 0.","title":"Offset"},"event_type":{"anyOf":[{"enum":["traffic","performance","error"],"type":"string"},{"type":"null"}],"default":null,"description":"Which sessions: traffic (default), performance or error.","title":"Event Type"}},"required":["pid"],"title":"list_sessionsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/live_visitors":{"post":{"operationId":"live_visitors","summary":"Visitors active on the site in the last 5 minutes with device, browser, OS and country. Use for \"How many people are on ","description":"Visitors active on the site in the last 5 minutes with device, browser, OS and country. Use for \"How many people are on my site right now\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"pid":{"description":"Swetrix project id (list_projects returns it), for example 'WvZCYTrOPzSK'.","maxLength":40,"title":"Pid","type":"string"}},"required":["pid"],"title":"live_visitorsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}}}}