{"openapi":"3.1.0","info":{"title":"X3 Growth Intelligence API","version":"1.0.0","summary":"Cookieless first-party analytics, ad-cost attribution and server-side conversions.","description":"Multi-tenant REST API of X3 Growth Intelligence. Authenticate with an organization secret key (`Authorization: Bearer sk_3x_…`, scoped, optionally narrowed to projects) or a dashboard session (`Bearer x3s_…`).\n\nGuides: https://api.x3growth.io/llms.txt · markdown reference: https://api.x3growth.io/docs/api.md · MCP server: https://api.x3growth.io/mcp.\n\nErrors are RFC 9457 problem details (`application/problem+json`) with a stable `code`; each `type` URL links to its explanation in the errors guide.\nLists use cursor pagination (`limit`, `cursor` → `nextCursor`); routes marked `x-idempotent` honour `Idempotency-Key` for 24 h; `x-required-scopes` names the scopes a key needs.","license":{"name":"Proprietary"}},"externalDocs":{"description":"X3 Growth Intelligence guides","url":"https://api.x3growth.io/v1/docs/index"},"servers":[{"url":"https://api.x3growth.io","description":"This deployment"}],"tags":[{"name":"System","description":"Health check and the cron tick of the deployment."},{"name":"Ingest","description":"Browser tracking endpoint (publishable key) and the SDK scripts. Usually called by the SDK, not by hand.","externalDocs":{"url":"https://api.x3growth.io/v1/docs/api/ingest"}},{"name":"Events","description":"Server-side events and the custom event catalog (schemas, validation).","externalDocs":{"url":"https://api.x3growth.io/v1/docs/sdk/server"}},{"name":"Auth","description":"Dashboard sign-up, login, magic links, sessions and sudo re-authentication.","externalDocs":{"url":"https://api.x3growth.io/v1/docs/api/authentication"}},{"name":"Organizations","description":"Organizations, audit log and OAuth grants.","externalDocs":{"url":"https://api.x3growth.io/v1/docs/concepts/organizations-projects"}},{"name":"Members","description":"Members, roles, the PII flag and invitations.","externalDocs":{"url":"https://api.x3growth.io/v1/docs/concepts/organizations-projects"}},{"name":"Keys","description":"Publishable keys (pk_3x_…), secret keys (sk_3x_…) and proxy keys: create, roll, revoke.","externalDocs":{"url":"https://api.x3growth.io/v1/docs/api/authentication"}},{"name":"Projects","description":"Projects (sites): settings, allowed origins, consent mode, retention.","externalDocs":{"url":"https://api.x3growth.io/v1/docs/concepts/organizations-projects"}},{"name":"Analytics","description":"Overview KPIs, breakdowns, timeseries, pages, sections, scroll, video, flows. All take the analytics filter.","externalDocs":{"url":"https://api.x3growth.io/v1/docs/api/filters"}},{"name":"Sessions","description":"Sessions explorer and the single-session timeline.","externalDocs":{"url":"https://api.x3growth.io/v1/docs/concepts/sessions"}},{"name":"Goals & funnels","description":"Goals, funnels and questionnaires (quiz definitions).","externalDocs":{"url":"https://api.x3growth.io/v1/docs/concepts/goals-funnels"}},{"name":"Relevance","description":"Configurable relevance score: versions, preview and retroactive rescoring.","externalDocs":{"url":"https://api.x3growth.io/v1/docs/concepts/relevance"}},{"name":"Conversions","description":"Conversion definitions, destinations (Meta, LinkedIn, Google Ads, TikTok) and the upload queue.","externalDocs":{"url":"https://api.x3growth.io/v1/docs/conversions"}},{"name":"Leads","description":"Identified leads (personal data; needs leads:read and the PII flag).","externalDocs":{"url":"https://api.x3growth.io/v1/docs/sdk/identify"}},{"name":"Ads","description":"Composio connections, ad accounts, cost sync, UTM mapping and cost KPIs.","externalDocs":{"url":"https://api.x3growth.io/v1/docs/ads"}},{"name":"Setup","description":"Developer tools: install instructions per framework, snippets, installation check, live events.","externalDocs":{"url":"https://api.x3growth.io/v1/docs/getting-started/quickstart"}},{"name":"Docs","description":"These guides as JSON or markdown, llms.txt and this reference.","externalDocs":{"url":"https://api.x3growth.io/v1/docs/index"}}],"components":{"securitySchemes":{"SecretKey":{"type":"http","scheme":"bearer","bearerFormat":"sk_3x_…","description":"Organization secret key with scopes (dashboard → Organization → API keys)."},"UserSession":{"type":"http","scheme":"bearer","bearerFormat":"x3s_…","description":"Dashboard session token (POST /v1/auth/login)."},"CronSecret":{"type":"http","scheme":"bearer","description":"CRON_SECRET of the deployment."}},"schemas":{"Health":{"type":"object","properties":{"ok":{"type":"boolean"},"db":{"type":"string","enum":["ok","unavailable","not_configured"]},"config":{"type":"string","enum":["ok","incomplete"]},"version":{"type":"string"},"time":{"type":"string","format":"date-time"}},"required":["ok","db","version","time"]},"Problem":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer"},"detail":{"type":"string"},"code":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}},"requestId":{"type":"string"}},"required":["type","title","status","code"]},"CronResult":{"type":"object","properties":{"job":{"type":"string"},"ran":{"type":"array","items":{"type":"object","properties":{"job":{"type":"string"},"scope":{"type":"string"},"ok":{"type":"boolean"},"durationMs":{"type":"integer"},"stats":{"type":"object","additionalProperties":{}}},"required":["job","scope","ok","durationMs","stats"]}},"moreDue":{"type":"boolean"}},"required":["job","ran","moreDue"]},"WireBatch":{"type":"object","properties":{"v":{"type":"number","enum":[2]},"k":{"type":"string","pattern":"^pk_3x_[0-9A-Za-z]{30}$"},"sid":{"type":"string","format":"uuid"},"fresh":{"type":"boolean"},"consent":{"type":"boolean"},"test":{"type":"boolean"},"pvs":{"type":"array","items":{"$ref":"#/components/schemas/WirePageview"},"minItems":1,"maxItems":5},"ev":{"type":"array","items":{"$ref":"#/components/schemas/WireEvent"},"maxItems":100},"id":{"$ref":"#/components/schemas/WireIdentify"},"ac":{"type":"object","properties":{"fbp":{"type":"string","pattern":"^fb\\.\\d\\.\\d{10,13}\\.\\d{1,30}$"},"fbc":{"type":"string","maxLength":600,"pattern":"^fb\\.\\d\\.\\d{10,13}\\.[\\w-]{10,500}$"},"ttp":{"type":"string","pattern":"^[\\w.-]{8,200}$"}},"additionalProperties":false,"description":"only sent after consent"},"cv":{"type":"integer","minimum":0},"lib":{"type":"string","pattern":"^[A-Za-z0-9@._-]{1,40}$"}},"required":["v","k","sid","fresh","consent","test","pvs"],"additionalProperties":false},"WirePageview":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"seq":{"type":"integer","minimum":1},"age":{"type":"integer","minimum":0,"maximum":86400000},"nav":{"type":"string","enum":["load","reload","back_forward","spa","prerender","resume"]},"host":{"type":"string","pattern":"^[a-z0-9.-]{1,100}$"},"path":{"type":"string","minLength":1,"maxLength":2048},"variant":{"type":["string","null"],"pattern":"^[A-Za-z0-9_-]{1,20}$"},"lang":{"type":["string","null"],"pattern":"^[a-z]{2}$"},"ref":{"type":["string","null"],"maxLength":300},"attrFrom":{"type":"string","enum":["url","stored","none"]},"attr":{"type":"object","properties":{"utm_source":{"type":"string","maxLength":256},"utm_medium":{"type":"string","maxLength":256},"utm_campaign":{"type":"string","maxLength":256},"utm_content":{"type":"string","maxLength":256},"utm_term":{"type":"string","maxLength":256},"utm_id":{"type":"string","maxLength":256},"gclid":{"type":"string","maxLength":256},"gbraid":{"type":"string","maxLength":256},"wbraid":{"type":"string","maxLength":256},"fbclid":{"type":"string","maxLength":256},"li_fat_id":{"type":"string","maxLength":256},"ttclid":{"type":"string","maxLength":256},"msclkid":{"type":"string","maxLength":256}},"additionalProperties":false},"vw":{"type":"integer","minimum":0,"maximum":10000},"vh":{"type":"integer","minimum":0,"maximum":10000},"sw":{"type":"integer","minimum":0,"maximum":10000},"tp":{"type":"boolean"},"ph":{"type":"integer","minimum":0,"maximum":1000000},"sy":{"type":"integer","minimum":0,"maximum":1000000},"sp":{"type":"integer","minimum":0,"maximum":100},"marks":{"type":"object","properties":{"25":{"type":"integer","minimum":0,"maximum":86400000},"50":{"type":"integer","minimum":0,"maximum":86400000},"75":{"type":"integer","minimum":0,"maximum":86400000},"90":{"type":"integer","minimum":0,"maximum":86400000},"100":{"type":"integer","minimum":0,"maximum":86400000}},"additionalProperties":false},"sec":{"type":"object","additionalProperties":{"type":"array","prefixItems":[{"type":"integer","minimum":0,"maximum":86400000},{"type":"integer","minimum":0,"maximum":86400000}]}},"eng":{"type":"integer","minimum":0,"maximum":14400000},"clk":{"type":"integer","minimum":0,"maximum":10000},"iclk":{"type":"integer","minimum":0,"maximum":10000},"vids":{"type":"array","items":{"$ref":"#/components/schemas/WireVideo"},"maxItems":10}},"required":["id","seq","age","nav","host","path","variant","lang","ref","attrFrom","attr","vw","vh","sw","tp","ph","sy","sp","marks","sec","eng","clk","iclk","vids"],"additionalProperties":false},"WireVideo":{"type":"object","properties":{"n":{"type":"integer","minimum":0,"maximum":9},"id":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,40}$"},"src":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,40}$"},"fmt":{"type":"string","enum":["landscape","portrait","unknown","quer","hoch"]},"t":{"type":"integer","minimum":0,"maximum":86400000},"dur":{"type":"number","minimum":0,"maximum":7200},"ws":{"type":"integer","minimum":0},"mp":{"type":"integer","minimum":0,"maximum":100},"done":{"type":"boolean"},"b":{"type":"string","pattern":"^[0-9a-f]{25}$"},"r":{"type":"array","items":{"type":"array","prefixItems":[{"type":"number","minimum":0},{"type":"number","minimum":0}]},"maxItems":40}},"required":["n","id","src","fmt","t","dur","ws","mp","done","b","r"],"additionalProperties":false},"WireEvent":{"type":"object","properties":{"pv":{"type":"string","format":"uuid"},"n":{"type":"integer","minimum":0,"maximum":499},"t":{"type":"integer","minimum":0,"maximum":86400000},"e":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,39}$"},"p":{"type":"object","additionalProperties":{"anyOf":[{"type":"string","maxLength":200},{"type":"number"},{"type":"boolean"}]}}},"required":["pv","n","t","e"],"additionalProperties":false},"WireIdentify":{"type":"object","properties":{"pv":{"type":"string","format":"uuid"},"em":{"type":"string","pattern":"^[0-9a-f]{64}$"},"emg":{"type":"string","pattern":"^[0-9a-f]{64}$"},"ph":{"type":"string","pattern":"^[0-9a-f]{64}$"},"fn":{"type":"string","pattern":"^[0-9a-f]{64}$"},"ln":{"type":"string","pattern":"^[0-9a-f]{64}$"},"xid":{"type":"string","pattern":"^[0-9a-f]{64}$"},"form":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,40}$"},"tr":{"type":"object","additionalProperties":{"anyOf":[{"type":"string","maxLength":200},{"type":"number"},{"type":"boolean"}]}}},"required":["pv"],"additionalProperties":false},"ClientConfig":{"type":"object","additionalProperties":{}},"ServerEventsResult":{"type":"object","properties":{"accepted":{"type":"integer"},"rejected":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer"},"code":{"type":"string"},"message":{"type":"string"}},"required":["index","code","message"]}}},"required":["accepted","rejected"]},"ServerEvents":{"type":"object","properties":{"events":{"type":"array","items":{"$ref":"#/components/schemas/ServerEvent"},"minItems":1,"maxItems":100}},"required":["events"],"additionalProperties":false},"ServerEvent":{"type":"object","properties":{"sessionId":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"pageviewId":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"name":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,39}$"},"props":{"type":"object","additionalProperties":{"anyOf":[{"type":"string","maxLength":200},{"type":"number"},{"type":"boolean"}]}},"occurredAt":{"type":"string","format":"date-time"}},"required":["sessionId","name"],"additionalProperties":false},"SessionToken":{"type":"object","properties":{"token":{"type":"string"},"expiresAt":{"type":"string","format":"date-time"},"idleExpiresAt":{"type":"string","format":"date-time"},"userId":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"}},"required":["token","expiresAt","idleExpiresAt","userId"]},"Signup":{"type":"object","properties":{"email":{"type":"string","maxLength":320},"password":{"type":"string","minLength":8,"maxLength":128},"name":{"type":"string","minLength":1,"maxLength":100},"organization":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"slug":{"type":"string"}},"required":["name","slug"],"additionalProperties":false},"invitationToken":{"type":"string","maxLength":200},"locale":{"type":"string","enum":["en","de"]}},"required":["email","password"],"additionalProperties":false},"Login":{"type":"object","properties":{"email":{"type":"string","maxLength":320},"password":{"type":"string","minLength":1,"maxLength":128}},"required":["email","password"],"additionalProperties":false},"Ok":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]}},"required":["ok"]},"Me":{"type":"object","properties":{"user":{"$ref":"#/components/schemas/User"},"sudoUntil":{"type":["string","null"],"format":"date-time"},"memberships":{"type":"array","items":{"type":"object","properties":{"org":{"type":"object","properties":{"id":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"slug":{"type":"string","pattern":"^[a-z0-9](?:[a-z0-9-]{0,38}[a-z0-9])?$"},"name":{"type":"string"}},"required":["id","slug","name"]},"role":{"type":"string","enum":["owner","admin","analyst","viewer"]},"pii":{"type":"boolean"},"scopes":{"type":"array","items":{"type":"string","enum":["analytics:read","leads:read","leads:write","events:write","conversions:read","conversions:write","ads:read","ads:write","config:write","project:admin","project:create","org:admin","ingest:proxy"]}},"projects":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"slug":{"type":"string","pattern":"^[a-z0-9](?:[a-z0-9-]{0,38}[a-z0-9])?$"},"name":{"type":"string"}},"required":["id","slug","name"]}}},"required":["org","role","pii","scopes","projects"]}},"lastProjectId":{"type":["string","null"],"pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"}},"required":["user","sudoUntil","memberships","lastProjectId"]},"User":{"type":"object","properties":{"id":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"email":{"type":"string"},"name":{"type":["string","null"]},"locale":{"type":"string","enum":["en","de"]},"emailVerified":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","email","name","locale","emailVerified","createdAt"]},"Sudo":{"type":"object","properties":{"password":{"type":"string","minLength":1,"maxLength":128},"magicLinkToken":{"type":"string","maxLength":200}},"additionalProperties":false},"MagicLinkRequest":{"type":"object","properties":{"email":{"type":"string","maxLength":320},"purpose":{"type":"string","enum":["login","sudo"],"default":"login"},"redirectTo":{"type":"string","maxLength":500}},"required":["email"],"additionalProperties":false},"MagicLinkVerify":{"type":"object","properties":{"token":{"type":"string","minLength":10,"maxLength":200}},"required":["token"],"additionalProperties":false},"PasswordChange":{"type":"object","properties":{"currentPassword":{"type":"string","maxLength":128},"newPassword":{"type":"string","minLength":8,"maxLength":128}},"required":["newPassword"],"additionalProperties":false},"Organization":{"type":"object","properties":{"id":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"slug":{"type":"string","pattern":"^[a-z0-9](?:[a-z0-9-]{0,38}[a-z0-9])?$"},"name":{"type":"string"},"role":{"type":["string","null"],"enum":["owner","admin","analyst","viewer",null]},"createdAt":{"type":"string","format":"date-time"}},"required":["id","slug","name","role","createdAt"]},"OrganizationCreate":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"slug":{"type":"string","pattern":"^[a-z0-9](?:[a-z0-9-]{0,38}[a-z0-9])?$"}},"required":["name","slug"],"additionalProperties":false},"OrganizationUpdate":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"slug":{"type":"string","pattern":"^[a-z0-9](?:[a-z0-9-]{0,38}[a-z0-9])?$"}},"additionalProperties":false},"AuditEntry":{"type":"object","properties":{"id":{"type":"integer"},"at":{"type":"string","format":"date-time"},"projectId":{"type":["string","null"],"pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"actorKind":{"type":"string","enum":["user","secret_key","oauth","system"]},"actorLabel":{"type":["string","null"]},"action":{"type":"string"},"targetType":{"type":["string","null"]},"targetId":{"type":["string","null"]},"details":{"type":["object","null"],"additionalProperties":{}}},"required":["id","at","projectId","actorKind","actorLabel","action","targetType","targetId","details"]},"Member":{"type":"object","properties":{"userId":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"email":{"type":"string"},"name":{"type":["string","null"]},"role":{"type":"string","enum":["owner","admin","analyst","viewer"]},"pii":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"lastLoginAt":{"type":["string","null"],"format":"date-time"}},"required":["userId","email","name","role","pii","createdAt","lastLoginAt"]},"MemberUpdate":{"type":"object","properties":{"role":{"type":"string","enum":["owner","admin","analyst","viewer"]},"pii":{"type":"boolean"}},"additionalProperties":false},"Invitation":{"type":"object","properties":{"id":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"email":{"type":"string"},"role":{"type":"string","enum":["owner","admin","analyst","viewer"]},"pii":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time"},"acceptedAt":{"type":["string","null"],"format":"date-time"},"revokedAt":{"type":["string","null"],"format":"date-time"}},"required":["id","email","role","pii","createdAt","expiresAt","acceptedAt","revokedAt"]},"InvitationCreated":{"type":"object","properties":{"invitation":{"$ref":"#/components/schemas/Invitation"},"acceptUrl":{"type":"string"}},"required":["invitation","acceptUrl"]},"InvitationCreate":{"type":"object","properties":{"email":{"type":"string","maxLength":320,"format":"email"},"role":{"type":"string","enum":["admin","analyst","viewer"]},"pii":{"type":"boolean","default":false}},"required":["email","role"],"additionalProperties":false},"ApiKey":{"type":"object","properties":{"id":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"kind":{"type":"string","enum":["publishable","secret"]},"name":{"type":"string"},"hint":{"type":"string"},"scopes":{"type":"array","items":{"type":"string","enum":["analytics:read","leads:read","leads:write","events:write","conversions:read","conversions:write","ads:read","ads:write","config:write","project:admin","project:create","org:admin","ingest:proxy"]}},"projectId":{"type":["string","null"],"pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"projectIds":{"type":["array","null"],"items":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"}},"note":{"type":["string","null"]},"createdBy":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"},"expiresAt":{"type":["string","null"],"format":"date-time"},"revokedAt":{"type":["string","null"],"format":"date-time"},"lastUsedAt":{"type":["string","null"],"format":"date-time"},"rolledFrom":{"type":["string","null"],"pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"derivedFrom":{"type":["object","null"],"properties":{"kind":{"type":"string","enum":["oauth_grant","secret_key"]},"id":{"type":"string"}},"required":["kind","id"]}},"required":["id","kind","name","hint","scopes","projectId","projectIds","note","createdBy","createdAt","expiresAt","revokedAt","lastUsedAt","rolledFrom","derivedFrom"]},"ApiKeyCreated":{"type":"object","properties":{"key":{"$ref":"#/components/schemas/ApiKey"},"secret":{"type":"string"}},"required":["key","secret"]},"SecretKeyCreate":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"scopes":{"type":"array","items":{"type":"string","enum":["analytics:read","leads:read","leads:write","events:write","conversions:read","conversions:write","ads:read","ads:write","config:write","project:admin","project:create","org:admin","ingest:proxy"]},"minItems":1},"projectIds":{"type":"array","items":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"minItems":1,"maxItems":100},"expiresAt":{"type":"string","format":"date-time"},"note":{"type":"string","maxLength":500}},"required":["name","scopes"],"additionalProperties":false},"KeyRoll":{"type":"object","properties":{"expireOldInHours":{"type":"integer","minimum":0,"maximum":720,"default":168}},"additionalProperties":false},"ProxyKeyCreate":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100,"default":"first-party proxy"},"expiresAt":{"type":"string","format":"date-time"}},"additionalProperties":false},"PublishableKeyCreate":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100}},"required":["name"],"additionalProperties":false},"Project":{"type":"object","properties":{"id":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"orgId":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"orgSlug":{"type":"string","pattern":"^[a-z0-9](?:[a-z0-9-]{0,38}[a-z0-9])?$"},"slug":{"type":"string","pattern":"^[a-z0-9](?:[a-z0-9-]{0,38}[a-z0-9])?$"},"name":{"type":"string"},"timezone":{"type":"string","minLength":1,"maxLength":64},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"locale":{"type":"string","enum":["en","de"]},"country":{"type":["string","null"],"pattern":"^[A-Z]{2}$"},"retentionDays":{"type":"integer"},"channelRules":{"anyOf":[{"type":"number","enum":[1]},{"type":"number","enum":[2]}]},"relevanceVersion":{"type":"integer"},"goalsVersion":{"type":"integer"},"configRev":{"type":"integer"},"preset":{"type":["string","null"]},"settings":{"$ref":"#/components/schemas/ProjectSettings"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","orgId","orgSlug","slug","name","timezone","currency","locale","country","retentionDays","channelRules","relevanceVersion","goalsVersion","configRev","preset","settings","createdAt","updatedAt"]},"ProjectSettings":{"type":"object","properties":{"pii":{"type":"object","properties":{"storePlaintext":{"type":"boolean"},"leadsRetentionDays":{"type":["integer","null"],"minimum":1,"maximum":3650}},"required":["storePlaintext","leadsRetentionDays"],"additionalProperties":false},"limits":{"type":"object","properties":{"pageviewsPerDay":{"type":"integer","minimum":100,"maximum":50000000},"pageviewsPerKeyDay":{"type":"integer","minimum":10,"maximum":1000000},"eventsPerKeyDay":{"type":"integer","minimum":100,"maximum":10000000},"eventsPerDay":{"type":["integer","null"],"minimum":1000,"maximum":500000000},"storedBytesQuota":{"type":["integer","null"],"minimum":10000000}},"required":["pageviewsPerDay","pageviewsPerKeyDay","eventsPerKeyDay","eventsPerDay","storedBytesQuota"],"additionalProperties":false},"conversions":{"type":"object","properties":{"webDailyCap":{"type":"integer","minimum":0,"maximum":1000000}},"required":["webDailyCap"],"additionalProperties":false},"ads":{"type":"object","properties":{"relevantMinScore":{"type":"integer","minimum":1,"maximum":100}},"required":["relevantMinScore"],"additionalProperties":false},"sql":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"],"additionalProperties":false},"proxyWarningShare":{"type":"number","minimum":0.05,"maximum":1}},"required":["pii","limits","conversions","ads","sql","proxyWarningShare"],"additionalProperties":false},"ProjectCreated":{"type":"object","properties":{"project":{"$ref":"#/components/schemas/Project"},"publishableKey":{"type":"string"}},"required":["project","publishableKey"]},"ProjectCreate":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"slug":{"type":"string","pattern":"^[a-z0-9](?:[a-z0-9-]{0,38}[a-z0-9])?$"},"domains":{"type":"array","items":{"type":"string","pattern":"^(?:\\*\\.)?(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)*[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$"},"minItems":1,"maxItems":50},"timezone":{"type":"string","minLength":1,"maxLength":64,"default":"UTC"},"currency":{"type":"string","pattern":"^[A-Z]{3}$","default":"EUR"},"locale":{"type":"string","enum":["en","de"],"default":"en"},"country":{"type":["string","null"],"pattern":"^[A-Z]{2}$","default":null},"preset":{"type":"string","enum":["default","cpi"],"default":"default"},"allowLocalhost":{"type":"boolean","default":false}},"required":["name","slug","domains"],"additionalProperties":false},"ProjectUpdate":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"slug":{"type":"string","pattern":"^[a-z0-9](?:[a-z0-9-]{0,38}[a-z0-9])?$"},"timezone":{"type":"string","minLength":1,"maxLength":64},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"locale":{"type":"string","enum":["en","de"]},"country":{"type":["string","null"],"pattern":"^[A-Z]{2}$"},"retentionDays":{"type":"integer","minimum":1,"maximum":3650},"channelRules":{"anyOf":[{"type":"number","enum":[1]},{"type":"number","enum":[2]}]},"settings":{"type":"object","properties":{"pii":{"type":"object","properties":{"storePlaintext":{"type":"boolean"},"leadsRetentionDays":{"type":["integer","null"],"minimum":1,"maximum":3650}},"required":["storePlaintext","leadsRetentionDays"],"additionalProperties":false},"limits":{"type":"object","properties":{"pageviewsPerDay":{"type":"integer","minimum":100,"maximum":50000000},"pageviewsPerKeyDay":{"type":"integer","minimum":10,"maximum":1000000},"eventsPerKeyDay":{"type":"integer","minimum":100,"maximum":10000000},"eventsPerDay":{"type":["integer","null"],"minimum":1000,"maximum":500000000},"storedBytesQuota":{"type":["integer","null"],"minimum":10000000}},"required":["pageviewsPerDay","pageviewsPerKeyDay","eventsPerKeyDay","eventsPerDay","storedBytesQuota"],"additionalProperties":false},"conversions":{"type":"object","properties":{"webDailyCap":{"type":"integer","minimum":0,"maximum":1000000}},"required":["webDailyCap"],"additionalProperties":false},"ads":{"type":"object","properties":{"relevantMinScore":{"type":"integer","minimum":1,"maximum":100}},"required":["relevantMinScore"],"additionalProperties":false},"sql":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"],"additionalProperties":false},"proxyWarningShare":{"type":"number","minimum":0.05,"maximum":1}},"additionalProperties":false}},"additionalProperties":false},"ProjectTrackingConfigResponse":{"type":"object","properties":{"tracking":{"$ref":"#/components/schemas/TrackingConfig"},"configRev":{"type":"integer"}},"required":["tracking","configRev"]},"TrackingConfig":{"type":"object","properties":{"domains":{"type":"array","items":{"type":"string","pattern":"^(?:\\*\\.)?(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)*[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$"},"minItems":1,"maxItems":50},"allowedOrigins":{"type":"array","items":{"type":"string","pattern":"^https?:\\/\\/(?:\\*\\.)?[a-z0-9.-]+(?::(?:\\d{1,5}|\\*))?$"},"minItems":1,"maxItems":50},"allowLocalhost":{"type":"boolean"},"hostPrefixes":{"type":"object","additionalProperties":{"type":"string","pattern":"^\\/[A-Za-z0-9/._~:-]{0,199}$"}},"pageGroups":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,39}$"},"label":{"anyOf":[{"type":"string","minLength":1,"maxLength":80},{"type":"object","properties":{"en":{"type":"string","minLength":1,"maxLength":80},"de":{"type":"string","minLength":1,"maxLength":80}},"required":["en"],"additionalProperties":false}]},"match":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["exact","prefix","glob","regex"]},"value":{"type":"string","minLength":1,"maxLength":200}},"required":["kind","value"],"additionalProperties":false},"minItems":1,"maxItems":20}},"required":["key","label","match"],"additionalProperties":false},"maxItems":30},"defaultGroup":{"type":"object","properties":{"key":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,39}$"},"label":{"anyOf":[{"type":"string","minLength":1,"maxLength":80},{"type":"object","properties":{"en":{"type":"string","minLength":1,"maxLength":80},"de":{"type":"string","minLength":1,"maxLength":80}},"required":["en"],"additionalProperties":false}]}},"required":["key","label"],"additionalProperties":false},"excludePaths":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["exact","prefix","glob","regex"]},"value":{"type":"string","minLength":1,"maxLength":200}},"required":["kind","value"],"additionalProperties":false},"maxItems":50},"personalPaths":{"type":"array","items":{"type":"object","properties":{"match":{"type":"object","properties":{"kind":{"type":"string","enum":["exact","prefix","glob","regex"]},"value":{"type":"string","minLength":1,"maxLength":200}},"required":["kind","value"],"additionalProperties":false},"replacement":{"type":"string","pattern":"^\\/[A-Za-z0-9/._~:-]{0,199}$"}},"required":["match","replacement"],"additionalProperties":false},"maxItems":20},"personalMode":{"type":"string","enum":["isolate","exclude"]},"valueRedactions":{"type":"array","items":{"type":"object","properties":{"pattern":{"type":"string","minLength":1,"maxLength":200},"replacement":{"type":"string","maxLength":40},"ignoreCase":{"type":"boolean"}},"required":["pattern","replacement","ignoreCase"],"additionalProperties":false},"maxItems":10},"variantParam":{"type":["string","null"],"pattern":"^[A-Za-z0-9_-]{1,40}$"},"testParams":{"type":"array","items":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,40}$"},"minItems":1,"maxItems":5},"notrackParam":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,40}$"},"storagePrefix":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,15}$"},"consent":{"type":"object","properties":{"mode":{"type":"string","enum":["cookieless","strict","require"]},"storageKey":{"type":["string","null"],"minLength":1,"maxLength":64},"grantedValues":{"type":"array","items":{"type":"string","maxLength":40},"maxItems":5},"deniedValues":{"type":"array","items":{"type":"string","maxLength":40},"maxItems":5},"windowEvent":{"type":["object","null"],"properties":{"name":{"type":"string","minLength":1,"maxLength":64},"detailPath":{"type":"string","pattern":"^(?:[A-Za-z_$][A-Za-z0-9_$]*(?:\\.[A-Za-z_$][A-Za-z0-9_$]*)*)?$"},"grantedValues":{"type":"array","items":{"type":"string","maxLength":40},"maxItems":5},"deniedValues":{"type":"array","items":{"type":"string","maxLength":40},"maxItems":5}},"required":["name","detailPath","grantedValues","deniedValues"],"additionalProperties":false},"cmp":{"type":"array","items":{"type":"string","enum":["cookiebot","usercentrics","complianz","borlabs","google_consent_mode"]},"maxItems":5},"respectDoNotTrack":{"type":"boolean"},"respectGlobalPrivacyControl":{"type":"boolean"}},"required":["mode","storageKey","grantedValues","deniedValues","windowEvent","cmp","respectDoNotTrack","respectGlobalPrivacyControl"],"additionalProperties":false},"legacyTrackAttributes":{"type":"boolean"},"cta":{"type":"object","properties":{"selectors":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"maxItems":20}},"required":["selectors"],"additionalProperties":false},"messaging":{"type":"object","properties":{"whatsapp":{"type":"boolean"},"apps":{"type":"array","items":{"type":"string","enum":["telegram","signal","messenger","viber","line","wechat","sms","skype","threema"]},"maxItems":9}},"required":["whatsapp","apps"],"additionalProperties":false},"downloads":{"type":"object","properties":{"extensions":{"type":"array","items":{"type":"string","pattern":"^[a-z0-9]{1,8}$"},"maxItems":30}},"required":["extensions"],"additionalProperties":false},"notFound":{"type":"object","properties":{"path":{"type":"string","pattern":"^\\/[A-Za-z0-9/._~:-]{0,199}$"},"markerAttr":{"type":"string","pattern":"^data-[a-z0-9-]{1,40}$"}},"required":["path","markerAttr"],"additionalProperties":false},"bookings":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["postmessage"]},"origin":{"type":"string","pattern":"^https?:\\/\\/[a-z0-9.-]+(?::\\d{1,5})?$"},"match":{"type":"object","additionalProperties":{"anyOf":[{"type":"string","maxLength":100},{"type":"boolean"},{"type":"number"}]}},"via":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,19}$"}},"required":["type","origin","match","via"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["message_type"]},"messageType":{"type":"string","minLength":1,"maxLength":64},"via":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,19}$"}},"required":["type","messageType","via"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["window_event"]},"event":{"type":"string","minLength":1,"maxLength":64},"via":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,19}$"}},"required":["type","event","via"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["thank_you"]},"paths":{"type":"array","items":{"type":"string","pattern":"^\\/[A-Za-z0-9/._~:-]{0,199}$"},"minItems":1,"maxItems":10},"windowFlag":{"type":["string","null"],"pattern":"^[A-Za-z_$][A-Za-z0-9_$]{0,63}$"},"via":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,19}$"}},"required":["type","paths","windowFlag","via"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["calendly"]},"via":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,19}$"}},"required":["type","via"],"additionalProperties":false}]},"maxItems":10},"bridges":{"type":"array","items":{"type":"object","properties":{"event":{"type":"string","minLength":1,"maxLength":64},"emit":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,39}$"},"props":{"type":"object","additionalProperties":{"type":"string","pattern":"^(?:[A-Za-z_$][A-Za-z0-9_$]*(?:\\.[A-Za-z_$][A-Za-z0-9_$]*)*)?$"}},"flush":{"type":"boolean"}},"required":["event","emit","props","flush"],"additionalProperties":false},"maxItems":20},"plugins":{"type":"object","properties":{"video":{"type":"boolean"},"sections":{"type":"boolean"},"forms":{"type":"boolean"}},"required":["video","sections","forms"],"additionalProperties":false},"firstTouch":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"],"additionalProperties":false},"identify":{"type":"object","properties":{"requireConsent":{"type":"boolean"}},"required":["requireConsent"],"additionalProperties":false},"events":{"type":"object","properties":{"allowUnregistered":{"type":"boolean"}},"required":["allowUnregistered"],"additionalProperties":false},"questionnaires":{"type":"object","properties":{"strict":{"type":"boolean"}},"required":["strict"],"additionalProperties":false}},"required":["domains","allowedOrigins","allowLocalhost","hostPrefixes","pageGroups","defaultGroup","excludePaths","personalPaths","personalMode","valueRedactions","variantParam","testParams","notrackParam","storagePrefix","consent","legacyTrackAttributes","cta","messaging","downloads","notFound","bookings","bridges","plugins","firstTouch","identify","events","questionnaires"],"additionalProperties":false},"TrackingConfigPatch":{"type":"object","properties":{"domains":{"type":"array","items":{"type":"string","pattern":"^(?:\\*\\.)?(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)*[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$"},"minItems":1,"maxItems":50},"allowedOrigins":{"type":"array","items":{"type":"string","pattern":"^https?:\\/\\/(?:\\*\\.)?[a-z0-9.-]+(?::(?:\\d{1,5}|\\*))?$"},"minItems":1,"maxItems":50},"allowLocalhost":{"type":"boolean"},"hostPrefixes":{"type":"object","additionalProperties":{"type":"string","pattern":"^\\/[A-Za-z0-9/._~:-]{0,199}$"}},"pageGroups":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,39}$"},"label":{"anyOf":[{"type":"string","minLength":1,"maxLength":80},{"type":"object","properties":{"en":{"type":"string","minLength":1,"maxLength":80},"de":{"type":"string","minLength":1,"maxLength":80}},"required":["en"],"additionalProperties":false}]},"match":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["exact","prefix","glob","regex"]},"value":{"type":"string","minLength":1,"maxLength":200}},"required":["kind","value"],"additionalProperties":false},"minItems":1,"maxItems":20}},"required":["key","label","match"],"additionalProperties":false},"maxItems":30},"defaultGroup":{"type":"object","properties":{"key":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,39}$"},"label":{"anyOf":[{"type":"string","minLength":1,"maxLength":80},{"type":"object","properties":{"en":{"type":"string","minLength":1,"maxLength":80},"de":{"type":"string","minLength":1,"maxLength":80}},"required":["en"],"additionalProperties":false}]}},"required":["key","label"],"additionalProperties":false},"excludePaths":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["exact","prefix","glob","regex"]},"value":{"type":"string","minLength":1,"maxLength":200}},"required":["kind","value"],"additionalProperties":false},"maxItems":50},"personalPaths":{"type":"array","items":{"type":"object","properties":{"match":{"type":"object","properties":{"kind":{"type":"string","enum":["exact","prefix","glob","regex"]},"value":{"type":"string","minLength":1,"maxLength":200}},"required":["kind","value"],"additionalProperties":false},"replacement":{"type":"string","pattern":"^\\/[A-Za-z0-9/._~:-]{0,199}$"}},"required":["match","replacement"],"additionalProperties":false},"maxItems":20},"personalMode":{"type":"string","enum":["isolate","exclude"]},"valueRedactions":{"type":"array","items":{"type":"object","properties":{"pattern":{"type":"string","minLength":1,"maxLength":200},"replacement":{"type":"string","maxLength":40},"ignoreCase":{"type":"boolean"}},"required":["pattern","replacement","ignoreCase"],"additionalProperties":false},"maxItems":10},"variantParam":{"type":["string","null"],"pattern":"^[A-Za-z0-9_-]{1,40}$"},"testParams":{"type":"array","items":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,40}$"},"minItems":1,"maxItems":5},"notrackParam":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,40}$"},"storagePrefix":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,15}$"},"consent":{"type":"object","properties":{"mode":{"type":"string","enum":["cookieless","strict","require"]},"storageKey":{"type":["string","null"],"minLength":1,"maxLength":64},"grantedValues":{"type":"array","items":{"type":"string","maxLength":40},"maxItems":5},"deniedValues":{"type":"array","items":{"type":"string","maxLength":40},"maxItems":5},"windowEvent":{"type":["object","null"],"properties":{"name":{"type":"string","minLength":1,"maxLength":64},"detailPath":{"type":"string","pattern":"^(?:[A-Za-z_$][A-Za-z0-9_$]*(?:\\.[A-Za-z_$][A-Za-z0-9_$]*)*)?$"},"grantedValues":{"type":"array","items":{"type":"string","maxLength":40},"maxItems":5},"deniedValues":{"type":"array","items":{"type":"string","maxLength":40},"maxItems":5}},"required":["name","detailPath","grantedValues","deniedValues"],"additionalProperties":false},"cmp":{"type":"array","items":{"type":"string","enum":["cookiebot","usercentrics","complianz","borlabs","google_consent_mode"]},"maxItems":5},"respectDoNotTrack":{"type":"boolean"},"respectGlobalPrivacyControl":{"type":"boolean"}},"required":["mode","storageKey","grantedValues","deniedValues","windowEvent","cmp","respectDoNotTrack","respectGlobalPrivacyControl"],"additionalProperties":false},"legacyTrackAttributes":{"type":"boolean"},"cta":{"type":"object","properties":{"selectors":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"maxItems":20}},"required":["selectors"],"additionalProperties":false},"messaging":{"type":"object","properties":{"whatsapp":{"type":"boolean"},"apps":{"type":"array","items":{"type":"string","enum":["telegram","signal","messenger","viber","line","wechat","sms","skype","threema"]},"maxItems":9}},"required":["whatsapp","apps"],"additionalProperties":false},"downloads":{"type":"object","properties":{"extensions":{"type":"array","items":{"type":"string","pattern":"^[a-z0-9]{1,8}$"},"maxItems":30}},"required":["extensions"],"additionalProperties":false},"notFound":{"type":"object","properties":{"path":{"type":"string","pattern":"^\\/[A-Za-z0-9/._~:-]{0,199}$"},"markerAttr":{"type":"string","pattern":"^data-[a-z0-9-]{1,40}$"}},"required":["path","markerAttr"],"additionalProperties":false},"bookings":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["postmessage"]},"origin":{"type":"string","pattern":"^https?:\\/\\/[a-z0-9.-]+(?::\\d{1,5})?$"},"match":{"type":"object","additionalProperties":{"anyOf":[{"type":"string","maxLength":100},{"type":"boolean"},{"type":"number"}]}},"via":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,19}$"}},"required":["type","origin","match","via"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["message_type"]},"messageType":{"type":"string","minLength":1,"maxLength":64},"via":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,19}$"}},"required":["type","messageType","via"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["window_event"]},"event":{"type":"string","minLength":1,"maxLength":64},"via":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,19}$"}},"required":["type","event","via"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["thank_you"]},"paths":{"type":"array","items":{"type":"string","pattern":"^\\/[A-Za-z0-9/._~:-]{0,199}$"},"minItems":1,"maxItems":10},"windowFlag":{"type":["string","null"],"pattern":"^[A-Za-z_$][A-Za-z0-9_$]{0,63}$"},"via":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,19}$"}},"required":["type","paths","windowFlag","via"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["calendly"]},"via":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,19}$"}},"required":["type","via"],"additionalProperties":false}]},"maxItems":10},"bridges":{"type":"array","items":{"type":"object","properties":{"event":{"type":"string","minLength":1,"maxLength":64},"emit":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,39}$"},"props":{"type":"object","additionalProperties":{"type":"string","pattern":"^(?:[A-Za-z_$][A-Za-z0-9_$]*(?:\\.[A-Za-z_$][A-Za-z0-9_$]*)*)?$"}},"flush":{"type":"boolean"}},"required":["event","emit","props","flush"],"additionalProperties":false},"maxItems":20},"plugins":{"type":"object","properties":{"video":{"type":"boolean"},"sections":{"type":"boolean"},"forms":{"type":"boolean"}},"required":["video","sections","forms"],"additionalProperties":false},"firstTouch":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"],"additionalProperties":false},"identify":{"type":"object","properties":{"requireConsent":{"type":"boolean"}},"required":["requireConsent"],"additionalProperties":false},"events":{"type":"object","properties":{"allowUnregistered":{"type":"boolean"}},"required":["allowUnregistered"],"additionalProperties":false},"questionnaires":{"type":"object","properties":{"strict":{"type":"boolean"}},"required":["strict"],"additionalProperties":false}},"additionalProperties":false},"ProjectStatus":{"type":"object","properties":{"connected":{"type":"boolean"},"mode":{"type":"string","enum":["production","development","disabled"]},"reason":{"type":["string","null"]},"schemaVersion":{"type":["string","null"]},"dbSizeBytes":{"type":["number","null"]},"dbSizeLimitBytes":{"type":["number","null"]},"ingestPaused":{"type":"boolean"},"storageHigh":{"type":"boolean"},"firstSessionAt":{"type":["string","null"],"format":"date-time"},"lastSeenAt":{"type":["string","null"],"format":"date-time"},"lastCleanupAt":{"type":["string","null"],"format":"date-time"},"cleanupStale":{"type":"boolean"},"errorKind":{"type":["string","null"],"enum":["connection","quota","timeout","other",null]},"error":{"type":["string","null"]},"relevance":{"type":"object","properties":{"version":{"type":"integer"},"pendingSessions":{"type":"integer"}},"required":["version","pendingSessions"]},"goals":{"type":"object","properties":{"version":{"type":"integer"},"pendingSessions":{"type":"integer"}},"required":["version","pendingSessions"]},"budgets":{"type":"object","properties":{"pageviewsToday":{"type":"integer"},"limit":{"type":"integer"}},"required":["pageviewsToday","limit"]},"quota":{"type":"object","properties":{"pageviewsToday":{"type":"integer"},"pageviewsPerDay":{"type":"integer"},"eventsToday":{"type":"integer"},"eventsPerDay":{"type":["integer","null"]},"storedBytesEstimate":{"type":["number","null"]},"storedBytesQuota":{"type":["number","null"]},"exceeded":{"type":"boolean"},"reason":{"type":["string","null"],"enum":["pageviews_per_day","events_per_day","stored_bytes","deployment_storage",null]}},"required":["pageviewsToday","pageviewsPerDay","eventsToday","eventsPerDay","storedBytesEstimate","storedBytesQuota","exceeded","reason"]},"eventNames":{"type":"object","properties":{"observed":{"type":"integer"},"limit":{"type":"integer"},"droppedToday":{"type":"integer"}},"required":["observed","limit","droppedToday"]},"webConversions":{"type":"object","properties":{"today":{"type":"integer"},"cap":{"type":"integer"}},"required":["today","cap"]},"proxyWarning":{"type":["object","null"],"properties":{"share":{"type":"number"},"warn":{"type":"boolean"}},"required":["share","warn"]},"installation":{"type":"object","properties":{"lastEventAt":{"type":["string","null"],"format":"date-time"},"origins":{"type":"array","items":{"type":"string"}}},"required":["lastEventAt","origins"]}},"required":["connected","mode","reason","schemaVersion","dbSizeBytes","dbSizeLimitBytes","ingestPaused","storageHigh","firstSessionAt","lastSeenAt","lastCleanupAt","cleanupStale","errorKind","error","relevance","goals","budgets","quota","eventNames","webConversions","proxyWarning","installation"]},"Overview":{"type":"object","properties":{"filter":{"$ref":"#/components/schemas/FilterEcho"},"kpis":{"$ref":"#/components/schemas/SessionAggregate"},"extras":{"$ref":"#/components/schemas/OverviewExtras"},"bucket":{"type":"string","enum":["hour","day","week"]},"series":{"type":"array","items":{"$ref":"#/components/schemas/TimeSeriesPoint"}},"funnel":{"$ref":"#/components/schemas/FunnelResult"},"conversionsBySource":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string"},"status":{"type":"string"},"count":{"type":"integer"}},"required":["source","status","count"]}},"previous":{"type":["object","null"],"properties":{"filter":{"$ref":"#/components/schemas/FilterEcho"},"kpis":{"$ref":"#/components/schemas/SessionAggregate"},"change":{"type":"object","additionalProperties":{"type":["number","null"]}}},"required":["filter","kpis","change"]},"relevanceVersion":{"type":"integer"},"notes":{"type":"array","items":{"type":"string"}},"source":{"$ref":"#/components/schemas/ResultSource"}},"required":["filter","kpis","extras","bucket","series","funnel","conversionsBySource","previous","relevanceVersion","notes","source"]},"FilterEcho":{"type":"object","additionalProperties":{}},"SessionAggregate":{"type":"object","properties":{"sessions":{"type":"integer"},"visitors":{"type":"integer"},"pageviews":{"type":"number"},"avgPages":{"type":"number"},"avgEngagedS":{"type":"number"},"medianEngagedS":{"type":"number"},"avgScrollPct":{"type":"number"},"bounceRate":{"type":"number"},"clickRate":{"type":"number"},"clicksPerSession":{"type":"number"},"rawClicksPerSession":{"type":"number"},"videoStartRate":{"type":"number"},"avgVideoWatchPct":{"type":"number"},"videoCompleteRate":{"type":"number"},"quizViewRate":{"type":"number"},"quizStartRate":{"type":"number"},"quizSubmitRate":{"type":"number"},"bookingRate":{"type":"number"},"whatsappRate":{"type":"number"},"ctaRate":{"type":"number"},"calculatorRate":{"type":"number"},"formSubmitRate":{"type":"number"},"identifiedRate":{"type":"number"},"conversions":{"type":"integer"},"conversionRate":{"type":"number"},"goalValue":{"type":"number"},"avgRelevance":{"type":"number"},"medianRelevance":{"type":"number"},"engagedPlusRate":{"type":"number"},"hotPlusSessions":{"type":"integer"},"hotPlusRate":{"type":"number"},"relevanceTiers":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"min":{"type":"integer"},"max":{"type":"integer"},"sessions":{"type":"integer"}},"required":["key","min","max","sessions"]}}},"required":["sessions","visitors","pageviews","avgPages","avgEngagedS","medianEngagedS","avgScrollPct","bounceRate","clickRate","clicksPerSession","rawClicksPerSession","videoStartRate","avgVideoWatchPct","videoCompleteRate","quizViewRate","quizStartRate","quizSubmitRate","bookingRate","whatsappRate","ctaRate","calculatorRate","formSubmitRate","identifiedRate","conversions","conversionRate","goalValue","avgRelevance","medianRelevance","engagedPlusRate","hotPlusSessions","hotPlusRate","relevanceTiers"]},"OverviewExtras":{"type":"object","properties":{"avgMaxScrollPct":{"type":"number"},"medianMaxScrollPct":{"type":"number"},"medianAvgScrollPct":{"type":"number"},"medianPages":{"type":"number"},"medianDurationS":{"type":"number"},"avgVideoWatchedS":{"type":"number"},"counts":{"type":"object","additionalProperties":{"type":"integer"}}},"required":["avgMaxScrollPct","medianMaxScrollPct","medianAvgScrollPct","medianPages","medianDurationS","avgVideoWatchedS","counts"]},"TimeSeriesPoint":{"type":"object","properties":{"bucket":{"type":"string"},"sessions":{"type":"integer"},"visitors":{"type":"integer"},"pageviews":{"type":"integer"},"conversions":{"type":"integer"}},"required":["bucket","sessions","visitors","pageviews","conversions"]},"FunnelResult":{"type":["object","null"],"properties":{"funnel":{"type":"object","properties":{"key":{"type":"string"},"name":{"type":"string"},"mode":{"type":"string","enum":["independent","sequential"]}},"required":["key","name","mode"]},"steps":{"type":"array","items":{"$ref":"#/components/schemas/FunnelStepRow"}}},"required":["funnel","steps"]},"FunnelStepRow":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"sessions":{"type":"integer"},"share":{"type":"number"},"stepRate":{"type":"number"}},"required":["key","label","sessions","share","stepRate"]},"ResultSource":{"type":"object","properties":{"kind":{"type":"string","enum":["exact","rollup"]},"approximate":{"type":"array","items":{"type":"string"}}},"required":["kind","approximate"]},"Breakdown":{"type":"object","properties":{"filter":{"$ref":"#/components/schemas/FilterEcho"},"dimension":{"type":"string","enum":["channel","utm_source","utm_medium","utm_campaign","utm_content","utm_term","utm_id","ref_host","entry_page","entry_group","variant","device","browser","os","country","lang","exit_page","exit_group","entry_host","screen","stitch","attr_from","click_id","converted","quiz_answers","consent","relevance_tier","goal","ad_platform","ad_campaign","ad_adset","ad","day","week","month","hour_of_day","weekday"]},"rows":{"type":"array","items":{"$ref":"#/components/schemas/SegmentRow"}},"totalGroups":{"type":"integer"},"truncated":{"type":"boolean"}},"required":["filter","dimension","rows","totalGroups","truncated"]},"SegmentRow":{"type":"object","properties":{"sessions":{"type":"integer"},"visitors":{"type":"integer"},"pageviews":{"type":"number"},"avgPages":{"type":"number"},"avgEngagedS":{"type":"number"},"medianEngagedS":{"type":"number"},"avgScrollPct":{"type":"number"},"bounceRate":{"type":"number"},"clickRate":{"type":"number"},"clicksPerSession":{"type":"number"},"rawClicksPerSession":{"type":"number"},"videoStartRate":{"type":"number"},"avgVideoWatchPct":{"type":"number"},"videoCompleteRate":{"type":"number"},"quizViewRate":{"type":"number"},"quizStartRate":{"type":"number"},"quizSubmitRate":{"type":"number"},"bookingRate":{"type":"number"},"whatsappRate":{"type":"number"},"ctaRate":{"type":"number"},"calculatorRate":{"type":"number"},"formSubmitRate":{"type":"number"},"identifiedRate":{"type":"number"},"conversions":{"type":"integer"},"conversionRate":{"type":"number"},"goalValue":{"type":"number"},"avgRelevance":{"type":"number"},"medianRelevance":{"type":"number"},"engagedPlusRate":{"type":"number"},"hotPlusSessions":{"type":"integer"},"hotPlusRate":{"type":"number"},"relevanceTiers":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"min":{"type":"integer"},"max":{"type":"integer"},"sessions":{"type":"integer"}},"required":["key","min","max","sessions"]}},"value":{"type":["string","null"]},"label":{"type":["string","null"]},"share":{"type":"number"}},"required":["sessions","visitors","pageviews","avgPages","avgEngagedS","medianEngagedS","avgScrollPct","bounceRate","clickRate","clicksPerSession","rawClicksPerSession","videoStartRate","avgVideoWatchPct","videoCompleteRate","quizViewRate","quizStartRate","quizSubmitRate","bookingRate","whatsappRate","ctaRate","calculatorRate","formSubmitRate","identifiedRate","conversions","conversionRate","goalValue","avgRelevance","medianRelevance","engagedPlusRate","hotPlusSessions","hotPlusRate","relevanceTiers","value","share"]},"RelevanceRanking":{"type":"object","properties":{"filter":{"$ref":"#/components/schemas/FilterEcho"},"dimension":{"type":"string","enum":["channel","utm_source","utm_medium","utm_campaign","utm_content","utm_term","utm_id","ref_host","entry_page","entry_group","variant","device","browser","os","country","lang"]},"sort":{"type":"string","enum":["avg","hot","hot_rate","engaged_rate","sessions"]},"rows":{"type":"array","items":{"type":"object","properties":{"sessions":{"type":"integer"},"visitors":{"type":"integer"},"pageviews":{"type":"number"},"avgPages":{"type":"number"},"avgEngagedS":{"type":"number"},"medianEngagedS":{"type":"number"},"avgScrollPct":{"type":"number"},"bounceRate":{"type":"number"},"clickRate":{"type":"number"},"clicksPerSession":{"type":"number"},"rawClicksPerSession":{"type":"number"},"videoStartRate":{"type":"number"},"avgVideoWatchPct":{"type":"number"},"videoCompleteRate":{"type":"number"},"quizViewRate":{"type":"number"},"quizStartRate":{"type":"number"},"quizSubmitRate":{"type":"number"},"bookingRate":{"type":"number"},"whatsappRate":{"type":"number"},"ctaRate":{"type":"number"},"calculatorRate":{"type":"number"},"formSubmitRate":{"type":"number"},"identifiedRate":{"type":"number"},"conversions":{"type":"integer"},"conversionRate":{"type":"number"},"goalValue":{"type":"number"},"avgRelevance":{"type":"number"},"medianRelevance":{"type":"number"},"engagedPlusRate":{"type":"number"},"hotPlusSessions":{"type":"integer"},"hotPlusRate":{"type":"number"},"relevanceTiers":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"min":{"type":"integer"},"max":{"type":"integer"},"sessions":{"type":"integer"}},"required":["key","min","max","sessions"]}},"value":{"type":["string","null"]},"label":{"type":["string","null"]},"share":{"type":"number"},"rank":{"type":"integer"},"tier":{"type":"string"},"tierLabel":{"type":"string"}},"required":["sessions","visitors","pageviews","avgPages","avgEngagedS","medianEngagedS","avgScrollPct","bounceRate","clickRate","clicksPerSession","rawClicksPerSession","videoStartRate","avgVideoWatchPct","videoCompleteRate","quizViewRate","quizStartRate","quizSubmitRate","bookingRate","whatsappRate","ctaRate","calculatorRate","formSubmitRate","identifiedRate","conversions","conversionRate","goalValue","avgRelevance","medianRelevance","engagedPlusRate","hotPlusSessions","hotPlusRate","relevanceTiers","value","share","rank","tier"]}}},"required":["filter","dimension","sort","rows"]},"PageRow":{"type":"object","properties":{"page":{"type":"string"},"group":{"type":"string"},"pageviews":{"type":"integer"},"sessions":{"type":"integer"},"entries":{"type":"integer"},"exits":{"type":"integer"},"exitRate":{"type":"number"},"avgEngagedS":{"type":"number"},"avgScrollPct":{"type":"number"},"foldOnlyRate":{"type":"number"},"clicksPerPageview":{"type":"number"},"videoStartRate":{"type":"number"}},"required":["page","group","pageviews","sessions","entries","exits","exitRate","avgEngagedS","avgScrollPct","foldOnlyRate","clicksPerPageview","videoStartRate"]},"SectionRow":{"type":"object","properties":{"page":{"type":"string"},"section":{"type":"string"},"pageviews":{"type":"integer"},"reach":{"type":"number"},"avgVisibleS":{"type":"number"},"medianFirstSeenS":{"type":"number"}},"required":["page","section","pageviews","reach","avgVisibleS","medianFirstSeenS"]},"DistributionBucket":{"type":"object","properties":{"key":{"type":"string"},"minS":{"type":"number"},"maxS":{"type":["number","null"]},"count":{"type":"integer"},"share":{"type":"number"}},"required":["key","minS","maxS","count","share"]},"ClickRow":{"type":"object","properties":{"label":{"type":["string","null"]},"kind":{"type":"string","enum":["internal","external","anchor","tel","mailto","whatsapp","messaging","download","button","form","other"]},"tag":{"type":"string"},"href":{"type":["string","null"]},"section":{"type":["string","null"]},"clicks":{"type":"integer"},"pageviews":{"type":"integer"},"sessions":{"type":"integer"},"sessionShare":{"type":"number"}},"required":["label","kind","tag","href","section","clicks","pageviews","sessions","sessionShare"]},"VideoStatsRow":{"type":"object","properties":{"video":{"type":"string"},"plays":{"type":"integer"},"pageviewsWithPlay":{"type":"integer"},"startRate":{"type":"number"},"avgWatchedS":{"type":"number"},"avgCoveragePct":{"type":"number"},"avgMaxPct":{"type":"number"},"completionRate":{"type":"number"},"avgDurationS":{"type":"number"},"byFormat":{"type":"array","items":{"type":"object","properties":{"format":{"type":"string","enum":["landscape","portrait","unknown"]},"plays":{"type":"integer"},"avgCoveragePct":{"type":"number"},"completionRate":{"type":"number"},"retention":{"type":"array","items":{"type":"number"}}},"required":["format","plays","avgCoveragePct","completionRate","retention"]}},"retention":{"type":"array","items":{"type":"number"}}},"required":["video","plays","pageviewsWithPlay","startRate","avgWatchedS","avgCoveragePct","avgMaxPct","completionRate","avgDurationS","byFormat","retention"]},"AnswerStatsRow":{"type":"object","properties":{"questionnaire":{"type":"string"},"label":{"type":"string"},"views":{"type":"integer"},"starts":{"type":"integer"},"contact":{"type":"integer"},"submits":{"type":"integer"},"questions":{"type":"array","items":{"type":"object","properties":{"q":{"type":"string"},"label":{"type":"string"},"step":{"type":"integer"},"answered":{"type":"integer"},"options":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string"},"label":{"type":"string"},"count":{"type":"integer"},"share":{"type":"number"}},"required":["value","label","count","share"]}}},"required":["q","label","step","answered","options"]}}},"required":["questionnaire","label","views","starts","contact","submits","questions"]},"GoalStatsRow":{"type":"object","properties":{"key":{"type":"string"},"name":{"type":"string"},"isConversion":{"type":"boolean"},"sessions":{"type":"integer"},"rate":{"type":"number"},"value":{"type":"number"}},"required":["key","name","isConversion","sessions","rate","value"]},"FilterOptions":{"type":"object","properties":{"pages":{"type":"array","items":{"type":"object","properties":{"page":{"type":"string"},"group":{"type":"string"},"pageviews":{"type":"integer"}},"required":["page","group","pageviews"]}},"groups":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"}},"required":["key","label"]}},"channels":{"type":"array","items":{"type":"string"}},"utm":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}},"refHosts":{"type":"array","items":{"type":"string"}},"variants":{"type":"array","items":{"type":"string"}},"countries":{"type":"array","items":{"type":"string"}},"devices":{"type":"array","items":{"type":"string"}},"goals":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"name":{"type":"string"}},"required":["key","name"]}},"events":{"type":"array","items":{"type":"string"}}},"required":["pages","groups","channels","utm","refHosts","variants","countries","devices","goals","events"]},"EventsQueryResult":{"type":"object","properties":{"filter":{"$ref":"#/components/schemas/FilterEcho"},"events":{"type":"array","items":{"$ref":"#/components/schemas/EventRow"}},"countsByName":{"type":"object","additionalProperties":{"type":"integer"}},"truncated":{"type":"boolean"}},"required":["filter","events","countsByName","truncated"]},"EventRow":{"type":"object","properties":{"sessionId":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"pageviewId":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"n":{"type":"integer"},"at":{"type":"string","format":"date-time"},"name":{"type":"string"},"props":{"type":["object","null"],"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"source":{"type":"string","enum":["web","server"]},"page":{"type":"string"},"channel":{"type":"string"},"utmCampaign":{"type":["string","null"]},"utmContent":{"type":["string","null"]},"device":{"type":"string"}},"required":["sessionId","pageviewId","n","at","name","props","source","page","channel","utmCampaign","utmContent","device"]},"LiveEvents":{"type":"object","properties":{"events":{"type":"array","items":{"type":"object","properties":{"sessionId":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"pageviewId":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"n":{"type":"integer"},"at":{"type":"string","format":"date-time"},"name":{"type":"string"},"props":{"type":["object","null"],"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"source":{"type":"string","enum":["web","server"]},"page":{"type":"string"},"channel":{"type":"string"},"utmCampaign":{"type":["string","null"]},"utmContent":{"type":["string","null"]},"device":{"type":"string"},"receivedAt":{"type":"string","format":"date-time"},"host":{"type":"string"}},"required":["sessionId","pageviewId","n","at","name","props","source","page","channel","utmCampaign","utmContent","device","receivedAt","host"]}},"cursor":{"type":"string"},"waitedMs":{"type":"integer"}},"required":["events","cursor","waitedMs"]},"SessionList":{"type":"object","properties":{"filter":{"$ref":"#/components/schemas/FilterEcho"},"rows":{"type":"array","items":{"$ref":"#/components/schemas/SessionListRow"}},"total":{"type":"integer"},"offset":{"type":"integer"},"limit":{"type":"integer"},"nextOffset":{"type":["integer","null"]}},"required":["filter","rows","total","offset","limit","nextOffset"]},"SessionListRow":{"type":"object","properties":{"id":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"startedAt":{"type":"string","format":"date-time"},"durationS":{"type":"number"},"engagedS":{"type":"number"},"pageviews":{"type":"integer"},"clicks":{"type":"integer"},"intClicks":{"type":"integer"},"maxScrollPct":{"type":"number"},"avgScrollPct":{"type":"number"},"videoWatchedS":{"type":"number"},"videoCovPct":{"type":"number"},"entryPage":{"type":"string"},"exitPage":{"type":["string","null"]},"channel":{"type":"string"},"utm":{"type":"object","properties":{"utm_source":{"type":"string"},"utm_medium":{"type":"string"},"utm_campaign":{"type":"string"},"utm_content":{"type":"string"},"utm_term":{"type":"string"},"utm_id":{"type":"string"}}},"refHost":{"type":["string","null"]},"device":{"type":"string"},"browser":{"type":"string"},"os":{"type":"string"},"country":{"type":["string","null"]},"isTest":{"type":"boolean"},"personal":{"type":"boolean"},"stitch":{"type":"string","enum":["new","memory","storage","hash"]},"relevance":{"type":"integer"},"tier":{"type":"string"},"goals":{"type":"array","items":{"type":"string"}},"ad":{"type":["object","null"],"properties":{"platform":{"type":"string"},"campaignId":{"type":["string","null"]},"adsetId":{"type":["string","null"]},"adId":{"type":["string","null"]},"method":{"type":"string"}},"required":["platform","campaignId","adsetId","adId","method"]},"flags":{"type":"object","properties":{"quizAnswers":{"type":"integer"},"quizSubmitted":{"type":"boolean"},"booked":{"type":"boolean"},"whatsapp":{"type":"boolean"},"cta":{"type":"boolean"},"calculator":{"type":"boolean"},"formSubmit":{"type":"boolean"},"video":{"type":"boolean"},"videoCompleted":{"type":"boolean"},"identified":{"type":"boolean"},"converted":{"type":"boolean"},"confirmedConversion":{"type":"boolean"},"bounced":{"type":"boolean"}},"required":["quizAnswers","quizSubmitted","booked","whatsapp","cta","calculator","formSubmit","video","videoCompleted","identified","converted","confirmedConversion","bounced"]}},"required":["id","startedAt","durationS","engagedS","pageviews","clicks","intClicks","maxScrollPct","avgScrollPct","videoWatchedS","videoCovPct","entryPage","exitPage","channel","utm","refHost","device","browser","os","country","isTest","personal","stitch","relevance","tier","goals","ad","flags"]},"SessionDetail":{"type":"object","properties":{"session":{"type":"object","properties":{"id":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"startedAt":{"type":"string","format":"date-time"},"durationS":{"type":"number"},"engagedS":{"type":"number"},"pageviews":{"type":"integer"},"clicks":{"type":"integer"},"intClicks":{"type":"integer"},"maxScrollPct":{"type":"number"},"avgScrollPct":{"type":"number"},"videoWatchedS":{"type":"number"},"videoCovPct":{"type":"number"},"entryPage":{"type":"string"},"exitPage":{"type":["string","null"]},"channel":{"type":"string"},"utm":{"type":"object","properties":{"utm_source":{"type":"string"},"utm_medium":{"type":"string"},"utm_campaign":{"type":"string"},"utm_content":{"type":"string"},"utm_term":{"type":"string"},"utm_id":{"type":"string"}}},"refHost":{"type":["string","null"]},"device":{"type":"string"},"browser":{"type":"string"},"os":{"type":"string"},"country":{"type":["string","null"]},"isTest":{"type":"boolean"},"personal":{"type":"boolean"},"stitch":{"type":"string","enum":["new","memory","storage","hash"]},"relevance":{"type":"integer"},"tier":{"type":"string"},"goals":{"type":"array","items":{"type":"string"}},"ad":{"type":["object","null"],"properties":{"platform":{"type":"string"},"campaignId":{"type":["string","null"]},"adsetId":{"type":["string","null"]},"adId":{"type":["string","null"]},"method":{"type":"string"}},"required":["platform","campaignId","adsetId","adId","method"]},"flags":{"type":"object","properties":{"quizAnswers":{"type":"integer"},"quizSubmitted":{"type":"boolean"},"booked":{"type":"boolean"},"whatsapp":{"type":"boolean"},"cta":{"type":"boolean"},"calculator":{"type":"boolean"},"formSubmit":{"type":"boolean"},"video":{"type":"boolean"},"videoCompleted":{"type":"boolean"},"identified":{"type":"boolean"},"converted":{"type":"boolean"},"confirmedConversion":{"type":"boolean"},"bounced":{"type":"boolean"}},"required":["quizAnswers","quizSubmitted","booked","whatsapp","cta","calculator","formSubmit","video","videoCompleted","identified","converted","confirmedConversion","bounced"]},"attrFrom":{"type":"string","enum":["url","stored","none"]},"attribution":{"type":"object","properties":{"utm_source":{"type":"string"},"utm_medium":{"type":"string"},"utm_campaign":{"type":"string"},"utm_content":{"type":"string"},"utm_term":{"type":"string"},"utm_id":{"type":"string"},"gclid":{"type":"string"},"gbraid":{"type":"string"},"wbraid":{"type":"string"},"fbclid":{"type":"string"},"li_fat_id":{"type":"string"},"ttclid":{"type":"string"},"msclkid":{"type":"string"}}},"variant":{"type":["string","null"]},"lang":{"type":["string","null"]},"screen":{"type":["string","null"]},"consent":{"type":"boolean"},"entryHost":{"type":"string"},"eventCounts":{"type":"object","additionalProperties":{"type":"integer"}},"storedRelevanceVersion":{"type":["integer","null"]},"relevanceVersion":{"type":"integer"},"breakdown":{"$ref":"#/components/schemas/RelevanceBreakdown"}},"required":["id","startedAt","durationS","engagedS","pageviews","clicks","intClicks","maxScrollPct","avgScrollPct","videoWatchedS","videoCovPct","entryPage","exitPage","channel","utm","refHost","device","browser","os","country","isTest","personal","stitch","relevance","tier","goals","ad","flags","attrFrom","attribution","variant","lang","screen","consent","entryHost","eventCounts","storedRelevanceVersion","relevanceVersion","breakdown"]},"pageviews":{"type":"array","items":{"$ref":"#/components/schemas/SessionPageviewDetail"}},"conversions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"source":{"type":"string"},"definition":{"type":["string","null"]},"status":{"type":"string"},"occurredAt":{"type":"string","format":"date-time"}},"required":["id","source","definition","status","occurredAt"]}},"leads":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"source":{"type":"string"},"form":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"}},"required":["id","source","form","createdAt"]}}},"required":["session","pageviews","conversions","leads"]},"RelevanceBreakdown":{"type":"object","properties":{"score":{"type":"integer"},"forced":{"type":["string","null"],"enum":["conversion","floor",null]},"rawSum":{"type":"number"},"items":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"points":{"type":"number"},"value":{"type":"number"},"reasons":{"type":"array","items":{"type":"string"}},"ref":{"type":"string"},"label":{"type":"string"},"text":{"type":"string"}},"required":["key","points","text"]}}},"required":["score","forced","rawSum","items"]},"SessionPageviewDetail":{"type":"object","properties":{"id":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"startedAt":{"type":"string","format":"date-time"},"offsetMs":{"type":"number"},"page":{"type":"string"},"group":{"type":"string"},"nav":{"type":"string","enum":["load","reload","back_forward","spa","prerender","resume"]},"refHost":{"type":["string","null"]},"engagedS":{"type":"number"},"durationS":{"type":"number"},"maxScrollPct":{"type":"number"},"maxScrollY":{"type":"number"},"viewport":{"type":"object","properties":{"w":{"type":"number"},"h":{"type":"number"}},"required":["w","h"]},"pageH":{"type":"number"},"clicks":{"type":"integer"},"intClicks":{"type":"integer"},"personal":{"type":"boolean"},"timeline":{"type":"array","items":{"$ref":"#/components/schemas/TimelineItem"}}},"required":["id","startedAt","offsetMs","page","group","nav","refHost","engagedS","durationS","maxScrollPct","maxScrollY","viewport","pageH","clicks","intClicks","personal","timeline"]},"TimelineItem":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["event"]},"tMs":{"type":"number"},"name":{"type":"string"},"props":{"type":["object","null"],"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"source":{"type":"string","enum":["web","server"]}},"required":["kind","tMs","name","props","source"]},{"type":"object","properties":{"kind":{"type":"string","enum":["scroll"]},"tMs":{"type":"number"},"pct":{"type":"integer"}},"required":["kind","tMs","pct"]},{"type":"object","properties":{"kind":{"type":"string","enum":["section"]},"tMs":{"type":"number"},"section":{"type":"string"},"visibleMs":{"type":"number"}},"required":["kind","tMs","section","visibleMs"]},{"type":"object","properties":{"kind":{"type":"string","enum":["video"]},"tMs":{"type":"number"},"n":{"type":"integer"},"video":{"type":"string"},"format":{"type":"string","enum":["landscape","portrait","unknown"]},"durationS":{"type":"number"},"watchedS":{"type":"number"},"maxPct":{"type":"number"},"completed":{"type":"boolean"},"ranges":{"type":"array","items":{"type":"array","prefixItems":[{"type":"number"},{"type":"number"}]}}},"required":["kind","tMs","n","video","format","durationS","watchedS","maxPct","completed","ranges"]}]},"EventCatalogEntry":{"type":"object","properties":{"name":{"type":"string"},"label":{"type":"object","properties":{"en":{"type":"string"},"de":{"type":"string"}},"required":["en","de"]},"builtIn":{"type":"boolean"},"preset":{"type":["string","null"]},"status":{"type":"string","enum":["active","observed","blocked"]},"props":{"type":"object","additionalProperties":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["string"]},"max":{"type":"integer","minimum":1,"maximum":200},"pattern":{"type":"string","minLength":1,"maxLength":200},"optional":{"type":"boolean"},"privacy":{"type":"string","enum":["label","text"]}},"required":["type","max"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["int"]},"min":{"type":"integer"},"max":{"type":"integer"},"optional":{"type":"boolean"}},"required":["type","min","max"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["number"]},"min":{"type":"number"},"max":{"type":"number"},"optional":{"type":"boolean"}},"required":["type","min","max"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["bool"]},"optional":{"type":"boolean"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["enum"]},"values":{"type":"array","items":{"type":"string","minLength":1,"maxLength":100},"minItems":1,"maxItems":50},"optional":{"type":"boolean"}},"required":["type","values"],"additionalProperties":false}]}},"oncePerPageview":{"type":"boolean"},"dedupe":{"type":"string","enum":["none","name","name_props"]},"sessionFlag":{"type":["string","null"]},"count30d":{"type":["integer","null"]}},"required":["name","label","builtIn","preset","status","props","oncePerPageview","dedupe","sessionFlag","count30d"]},"EventSchema":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,39}$"},"label":{"anyOf":[{"type":"string","minLength":1,"maxLength":80},{"type":"object","properties":{"en":{"type":"string","minLength":1,"maxLength":80},"de":{"type":"string","minLength":1,"maxLength":80}},"required":["en"],"additionalProperties":false},{"type":"null"}]},"description":{"type":["string","null"],"maxLength":500},"props":{"type":"object","additionalProperties":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["string"]},"max":{"type":"integer","minimum":1,"maximum":200},"pattern":{"type":"string","minLength":1,"maxLength":200},"optional":{"type":"boolean"},"privacy":{"type":"string","enum":["label","text"]}},"required":["type","max"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["int"]},"min":{"type":"integer"},"max":{"type":"integer"},"optional":{"type":"boolean"}},"required":["type","min","max"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["number"]},"min":{"type":"number"},"max":{"type":"number"},"optional":{"type":"boolean"}},"required":["type","min","max"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["bool"]},"optional":{"type":"boolean"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["enum"]},"values":{"type":"array","items":{"type":"string","minLength":1,"maxLength":100},"minItems":1,"maxItems":50},"optional":{"type":"boolean"}},"required":["type","values"],"additionalProperties":false}]}},"oncePerPageview":{"type":"boolean"},"dedupe":{"type":"string","enum":["none","name","name_props"]},"flush":{"type":"boolean"},"status":{"type":"string","enum":["active","observed","blocked"]},"firstSeenAt":{"type":["string","null"],"format":"date-time"},"lastSeenAt":{"type":["string","null"],"format":"date-time"}},"required":["name","label","description","props","oncePerPageview","dedupe","flush","status","firstSeenAt","lastSeenAt"]},"EventSchemaWrite":{"type":"object","properties":{"label":{"anyOf":[{"type":"string","minLength":1,"maxLength":80},{"type":"object","properties":{"en":{"type":"string","minLength":1,"maxLength":80},"de":{"type":"string","minLength":1,"maxLength":80}},"required":["en"],"additionalProperties":false},{"type":"null"}],"default":null},"description":{"type":["string","null"],"maxLength":500,"default":null},"props":{"type":"object","additionalProperties":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["string"]},"max":{"type":"integer","minimum":1,"maximum":200},"pattern":{"type":"string","minLength":1,"maxLength":200},"optional":{"type":"boolean"},"privacy":{"type":"string","enum":["label","text"]}},"required":["type","max"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["int"]},"min":{"type":"integer"},"max":{"type":"integer"},"optional":{"type":"boolean"}},"required":["type","min","max"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["number"]},"min":{"type":"number"},"max":{"type":"number"},"optional":{"type":"boolean"}},"required":["type","min","max"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["bool"]},"optional":{"type":"boolean"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["enum"]},"values":{"type":"array","items":{"type":"string","minLength":1,"maxLength":100},"minItems":1,"maxItems":50},"optional":{"type":"boolean"}},"required":["type","values"],"additionalProperties":false}]}},"oncePerPageview":{"type":"boolean","default":false},"dedupe":{"type":"string","enum":["none","name","name_props"],"default":"name_props"},"flush":{"type":"boolean","default":false},"status":{"type":"string","enum":["active","blocked"],"default":"active"}},"required":["props"],"additionalProperties":false},"Goal":{"type":"object","properties":{"key":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,39}$"},"name":{"type":"string","minLength":1,"maxLength":100},"match":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["event"]},"event":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,39}$"},"props":{"type":"object","additionalProperties":{"anyOf":[{"type":"string","maxLength":200},{"type":"number"},{"type":"boolean"}]}}},"required":["kind","event"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["page"]},"page":{"type":"string","pattern":"^\\/[A-Za-z0-9/._~:-]{0,199}$"},"mode":{"type":"string","enum":["exact","prefix"]}},"required":["kind","page","mode"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["lead"]},"form":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,40}$"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["conversion"]},"definition":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,39}$"}},"required":["kind"],"additionalProperties":false}]},"isConversion":{"type":"boolean"},"value":{"type":["number","null"],"minimum":0,"maximum":1000000000},"sort":{"type":"integer","minimum":0,"maximum":1000},"archived":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["key","name","match","isConversion","value","sort","archived","createdAt","updatedAt"]},"GoalWrite":{"type":"object","properties":{"key":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,39}$"},"name":{"type":"string","minLength":1,"maxLength":100},"match":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["event"]},"event":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,39}$"},"props":{"type":"object","additionalProperties":{"anyOf":[{"type":"string","maxLength":200},{"type":"number"},{"type":"boolean"}]}}},"required":["kind","event"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["page"]},"page":{"type":"string","pattern":"^\\/[A-Za-z0-9/._~:-]{0,199}$"},"mode":{"type":"string","enum":["exact","prefix"]}},"required":["kind","page","mode"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["lead"]},"form":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,40}$"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["conversion"]},"definition":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,39}$"}},"required":["kind"],"additionalProperties":false}]},"isConversion":{"type":"boolean"},"value":{"type":["number","null"],"minimum":0,"maximum":1000000000,"default":null},"sort":{"type":"integer","minimum":0,"maximum":1000,"default":0},"archived":{"type":"boolean","default":false}},"required":["key","name","match","isConversion"],"additionalProperties":false},"Funnel":{"type":"object","properties":{"key":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,39}$"},"name":{"type":"string","minLength":1,"maxLength":100},"mode":{"type":"string","enum":["independent","sequential"]},"steps":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,39}$"},"label":{"anyOf":[{"type":"string","minLength":1,"maxLength":80},{"type":"object","properties":{"en":{"type":"string","minLength":1,"maxLength":80},"de":{"type":"string","minLength":1,"maxLength":80}},"required":["en"],"additionalProperties":false}]},"match":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["sessions"]}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["event"]},"event":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,39}$"},"props":{"type":"object","additionalProperties":{"anyOf":[{"type":"string","maxLength":200},{"type":"number"},{"type":"boolean"}]}}},"required":["kind","event"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["page"]},"page":{"type":"string","pattern":"^\\/[A-Za-z0-9/._~:-]{0,199}$"},"mode":{"type":"string","enum":["exact","prefix"]}},"required":["kind","page","mode"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["goal"]},"goal":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,39}$"}},"required":["kind","goal"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["answered"]},"count":{"type":"integer","minimum":1,"maximum":50},"questionnaire":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,40}$"}},"required":["kind","count"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["funnel_step"]},"step":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,39}$"}},"required":["kind","step"],"additionalProperties":false}]}},"required":["key","label","match"],"additionalProperties":false},"minItems":2,"maxItems":20},"isDefault":{"type":"boolean"},"sort":{"type":"integer","minimum":0,"maximum":1000},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["key","name","mode","steps","isDefault","sort","createdAt","updatedAt"]},"FunnelWrite":{"type":"object","properties":{"key":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,39}$"},"name":{"type":"string","minLength":1,"maxLength":100},"mode":{"type":"string","enum":["independent","sequential"]},"steps":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,39}$"},"label":{"anyOf":[{"type":"string","minLength":1,"maxLength":80},{"type":"object","properties":{"en":{"type":"string","minLength":1,"maxLength":80},"de":{"type":"string","minLength":1,"maxLength":80}},"required":["en"],"additionalProperties":false}]},"match":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["sessions"]}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["event"]},"event":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,39}$"},"props":{"type":"object","additionalProperties":{"anyOf":[{"type":"string","maxLength":200},{"type":"number"},{"type":"boolean"}]}}},"required":["kind","event"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["page"]},"page":{"type":"string","pattern":"^\\/[A-Za-z0-9/._~:-]{0,199}$"},"mode":{"type":"string","enum":["exact","prefix"]}},"required":["kind","page","mode"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["goal"]},"goal":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,39}$"}},"required":["kind","goal"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["answered"]},"count":{"type":"integer","minimum":1,"maximum":50},"questionnaire":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,40}$"}},"required":["kind","count"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["funnel_step"]},"step":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,39}$"}},"required":["kind","step"],"additionalProperties":false}]}},"required":["key","label","match"],"additionalProperties":false},"minItems":2,"maxItems":20},"isDefault":{"type":"boolean","default":false},"sort":{"type":"integer","minimum":0,"maximum":1000,"default":0}},"required":["key","name","mode","steps"],"additionalProperties":false},"Questionnaire":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,40}$"},"label":{"anyOf":[{"type":"string","minLength":1,"maxLength":80},{"type":"object","properties":{"en":{"type":"string","minLength":1,"maxLength":80},"de":{"type":"string","minLength":1,"maxLength":80}},"required":["en"],"additionalProperties":false}]},"questions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,40}$"},"label":{"anyOf":[{"type":"string","minLength":1,"maxLength":80},{"type":"object","properties":{"en":{"type":"string","minLength":1,"maxLength":80},"de":{"type":"string","minLength":1,"maxLength":80}},"required":["en"],"additionalProperties":false}]},"summaryLabel":{"anyOf":[{"type":"string","minLength":1,"maxLength":80},{"type":"object","properties":{"en":{"type":"string","minLength":1,"maxLength":80},"de":{"type":"string","minLength":1,"maxLength":80}},"required":["en"],"additionalProperties":false}]},"options":{"type":"array","items":{"type":"array","prefixItems":[{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,40}$"},{"anyOf":[{"type":"string","minLength":1,"maxLength":80},{"type":"object","properties":{"en":{"type":"string","minLength":1,"maxLength":80},"de":{"type":"string","minLength":1,"maxLength":80}},"required":["en"],"additionalProperties":false}]}]},"minItems":1,"maxItems":30}},"required":["id","label","options"],"additionalProperties":false},"minItems":1,"maxItems":50},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","label","questions","createdAt","updatedAt"]},"RelevanceState":{"type":"object","properties":{"version":{"type":"integer"},"config":{"$ref":"#/components/schemas/RelevanceConfig"},"history":{"type":"array","items":{"type":"object","properties":{"version":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"createdBy":{"type":["string","null"]},"note":{"type":["string","null"]}},"required":["version","createdAt","createdBy","note"]}},"rescoring":{"type":"object","properties":{"pendingSessions":{"type":"integer"},"running":{"type":"boolean"}},"required":["pendingSessions","running"]}},"required":["version","config","history","rescoring"]},"RelevanceConfig":{"type":"object","properties":{"schema":{"type":"number","enum":[1]},"forced":{"type":"object","properties":{"flags":{"type":"array","items":{"type":"string","enum":["quiz_submitted","booked","form_submit","confirmed_conversion","identified"]},"maxItems":5},"events":{"type":"array","items":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,39}$"},"maxItems":20},"goals":{"type":"array","items":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,39}$"},"maxItems":20}},"required":["flags","events","goals"],"additionalProperties":false},"floor":{"type":["object","null"],"properties":{"engagedMsBelow":{"type":"integer","minimum":0,"maximum":60000},"interactions":{"type":"array","items":{"type":"string","enum":["int_clicks","video","quiz_answers","cta_click","whatsapp","calculator","quiz_contact"]},"maxItems":7},"events":{"type":"array","items":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,39}$"},"maxItems":20}},"required":["engagedMsBelow","interactions","events"],"additionalProperties":false},"engaged":{"type":"array","items":{"type":"array","prefixItems":[{"type":"number","minimum":0,"maximum":1000000},{"type":"integer","minimum":0,"maximum":100}]},"maxItems":10},"scroll":{"type":"object","properties":{"steps":{"type":"array","items":{"type":"array","prefixItems":[{"type":"number","minimum":0,"maximum":1000000},{"type":"integer","minimum":0,"maximum":100}]},"maxItems":10},"foldScrolled":{"type":"integer","minimum":0,"maximum":100}},"required":["steps","foldScrolled"],"additionalProperties":false},"pages":{"type":"array","items":{"type":"array","prefixItems":[{"type":"number","minimum":0,"maximum":1000000},{"type":"integer","minimum":0,"maximum":100}]},"maxItems":10},"video":{"type":"object","properties":{"started":{"type":"integer","minimum":0,"maximum":100},"watched":{"type":"object","properties":{"seconds":{"type":"integer","minimum":1,"maximum":7200},"points":{"type":"integer","minimum":0,"maximum":100}},"required":["seconds","points"],"additionalProperties":false},"coverage":{"type":"object","properties":{"pct":{"type":"integer","minimum":1,"maximum":100},"points":{"type":"integer","minimum":0,"maximum":100}},"required":["pct","points"],"additionalProperties":false},"completed":{"type":"integer","minimum":0,"maximum":100}},"required":["started","watched","coverage","completed"],"additionalProperties":false},"intClicks":{"type":"object","properties":{"each":{"type":"integer","minimum":0,"maximum":100},"max":{"type":"integer","minimum":0,"maximum":100}},"required":["each","max"],"additionalProperties":false},"flags":{"type":"object","properties":{"cta_click":{"type":"integer","minimum":0,"maximum":100},"calculator":{"type":"integer","minimum":0,"maximum":100},"quiz_viewed":{"type":"integer","minimum":0,"maximum":100},"quiz_contact":{"type":"integer","minimum":0,"maximum":100},"whatsapp":{"type":"integer","minimum":0,"maximum":100},"identified":{"type":"integer","minimum":0,"maximum":100}},"required":["cta_click","calculator","quiz_viewed","quiz_contact","whatsapp","identified"],"additionalProperties":false},"quizAnswers":{"type":"object","properties":{"first":{"type":"integer","minimum":0,"maximum":100},"furtherEach":{"type":"integer","minimum":0,"maximum":100},"furtherMax":{"type":"integer","minimum":0,"maximum":100}},"required":["first","furtherEach","furtherMax"],"additionalProperties":false},"events":{"type":"array","items":{"type":"object","properties":{"event":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,39}$"},"points":{"type":"integer","minimum":0,"maximum":100},"each":{"type":"integer","minimum":0,"maximum":100},"max":{"type":"integer","minimum":0,"maximum":100},"label":{"type":"string","minLength":1,"maxLength":80}},"required":["event","points","each","max"],"additionalProperties":false},"maxItems":50},"goals":{"type":"array","items":{"type":"object","properties":{"goal":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,39}$"},"points":{"type":"integer","minimum":0,"maximum":100},"label":{"type":"string","minLength":1,"maxLength":80}},"required":["goal","points"],"additionalProperties":false},"maxItems":50},"tiers":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,19}$"},"min":{"type":"integer","minimum":0,"maximum":100},"label":{"anyOf":[{"type":"string","minLength":1,"maxLength":80},{"type":"object","properties":{"en":{"type":"string","minLength":1,"maxLength":80},"de":{"type":"string","minLength":1,"maxLength":80}},"required":["en"],"additionalProperties":false}]}},"required":["key","min"],"additionalProperties":false},"minItems":2,"maxItems":8},"thresholds":{"type":"object","properties":{"engagedPlus":{"type":"integer","minimum":1,"maximum":100},"hotPlus":{"type":"integer","minimum":1,"maximum":100}},"required":["engagedPlus","hotPlus"],"additionalProperties":false}},"required":["schema","forced","floor","engaged","scroll","pages","video","intClicks","flags","quizAnswers","events","goals","tiers","thresholds"],"additionalProperties":false},"RelevancePreview":{"type":"object","properties":{"sampleSessions":{"type":"integer"},"current":{"type":"object","properties":{"avg":{"type":"number"},"tiers":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"sessions":{"type":"integer"}},"required":["key","sessions"]}}},"required":["avg","tiers"]},"proposed":{"type":"object","properties":{"avg":{"type":"number"},"tiers":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"sessions":{"type":"integer"}},"required":["key","sessions"]}}},"required":["avg","tiers"]},"changed":{"type":"integer"},"examples":{"type":"array","items":{"type":"object","properties":{"sessionId":{"type":"string"},"current":{"type":"integer"},"proposed":{"type":"integer"},"breakdown":{"$ref":"#/components/schemas/RelevanceBreakdown"}},"required":["sessionId","current","proposed","breakdown"]}}},"required":["sampleSessions","current","proposed","changed","examples"]},"Conversion":{"type":"object","properties":{"id":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"occurredAt":{"type":"string","format":"date-time"},"definition":{"type":["string","null"]},"source":{"type":"string","enum":["quiz","booking","whatsapp_manual","manual","event","goal","lead","api"]},"sessionId":{"type":["string","null"],"pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"sessionStartedAt":{"type":["string","null"],"format":"date-time"},"channel":{"type":["string","null"]},"entryPage":{"type":["string","null"]},"attribution":{"type":"object","properties":{"utm_source":{"type":["string","null"]},"utm_medium":{"type":["string","null"]},"utm_campaign":{"type":["string","null"]},"utm_content":{"type":["string","null"]},"utm_term":{"type":["string","null"]},"utm_id":{"type":["string","null"]},"gclid":{"type":["string","null"]},"gbraid":{"type":["string","null"]},"wbraid":{"type":["string","null"]},"fbclid":{"type":["string","null"]},"li_fat_id":{"type":["string","null"]},"ttclid":{"type":["string","null"]},"msclkid":{"type":["string","null"]}},"required":["utm_source","utm_medium","utm_campaign","utm_content","utm_term","utm_id","gclid","gbraid","wbraid","fbclid","li_fat_id","ttclid","msclkid"]},"value":{"type":["number","null"]},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"note":{"type":["string","null"]},"status":{"type":"string","enum":["held","pending","uploaded","skipped"]},"origin":{"type":"string","enum":["web","server","mcp","dashboard","import"]},"uploads":{"type":"object","additionalProperties":{"type":"object","properties":{"status":{"type":"string","enum":["pending","uploaded","feed","failed","skipped","not_configured","dry_run","error"]},"at":{"type":"string"},"ref":{"type":["string","null"]},"error":{"type":["string","null"]},"test":{"type":"boolean"},"transport":{"type":"string"}},"required":["status","at"]}},"createdBy":{"type":"string"},"eventId":{"type":"string"},"leadId":{"type":["string","null"],"pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"isTest":{"type":"boolean"},"country":{"type":["string","null"]},"identifiers":{"type":"object","properties":{"email":{"type":"boolean"},"phone":{"type":"boolean"},"firstName":{"type":"boolean"},"lastName":{"type":"boolean"},"externalId":{"type":"boolean"},"clickId":{"type":"boolean"}},"required":["email","phone","firstName","lastName","externalId","clickId"]},"attempts":{"type":"integer"},"nextAttemptAt":{"type":["string","null"],"format":"date-time"},"lastAttemptAt":{"type":["string","null"],"format":"date-time"}},"required":["id","createdAt","updatedAt","occurredAt","definition","source","sessionId","sessionStartedAt","channel","entryPage","attribution","value","currency","note","status","origin","uploads","createdBy","eventId","leadId","isTest","country","identifiers","attempts","nextAttemptAt","lastAttemptAt"]},"ConversionCreateResult":{"oneOf":[{"type":"object","properties":{"result":{"type":"string","enum":["created"]},"conversion":{"$ref":"#/components/schemas/Conversion"}},"required":["result","conversion"]},{"type":"object","properties":{"result":{"type":"string","enum":["duplicate"]},"conversion":{"$ref":"#/components/schemas/Conversion"}},"required":["result","conversion"]},{"type":"object","properties":{"result":{"type":"string","enum":["ambiguous"]},"candidates":{"type":"array","items":{"$ref":"#/components/schemas/ConversionCandidate"},"maxItems":10}},"required":["result","candidates"]},{"type":"object","properties":{"result":{"type":"string","enum":["dry_run"]},"wouldStore":{"type":"object","additionalProperties":{}}},"required":["result","wouldStore"]}]},"ConversionCandidate":{"type":"object","properties":{"sessionId":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"startedAt":{"type":"string","format":"date-time"},"entryPage":{"type":"string"},"channel":{"type":"string"},"utmCampaign":{"type":["string","null"]},"utmContent":{"type":["string","null"]},"whatsappAt":{"type":["string","null"],"format":"date-time"},"distanceMinutes":{"type":"number"}},"required":["sessionId","startedAt","entryPage","channel","utmCampaign","utmContent","whatsappAt","distanceMinutes"]},"ConversionCreate":{"type":"object","properties":{"definition":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,39}$"},"source":{"type":"string","enum":["quiz","booking","whatsapp_manual","manual","event","goal","lead","api"],"default":"manual"},"sessionId":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"pageviewId":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"match":{"type":"object","properties":{"at":{"type":"string","format":"date-time"},"windowMinutes":{"type":"integer","minimum":1,"maximum":1440,"default":60},"utmContent":{"type":"string","maxLength":200},"utmCampaign":{"type":"string","maxLength":200},"requireWhatsapp":{"type":"boolean","default":true},"includeTest":{"type":"boolean","default":false}},"required":["at"],"additionalProperties":false},"allowUnmatched":{"type":"boolean","default":false},"occurredAt":{"type":"string","format":"date-time"},"value":{"type":"number","minimum":0,"maximum":1000000000},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"note":{"type":"string","maxLength":500},"eventId":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"email":{"type":"string","maxLength":320},"phone":{"type":"string","maxLength":40},"firstName":{"type":"string","maxLength":100},"lastName":{"type":"string","maxLength":100},"externalId":{"type":"string","maxLength":200},"company":{"type":"string","maxLength":200},"clientIp":{"type":"string","maxLength":64},"clientUserAgent":{"type":"string","maxLength":500},"fbp":{"type":"string","maxLength":600},"fbc":{"type":"string","maxLength":600},"ttp":{"type":"string","maxLength":600},"eventSourceUrl":{"type":"string","maxLength":2000},"attribution":{"type":"object","additionalProperties":{"type":"string","maxLength":512}},"isTest":{"type":"boolean"},"leadId":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"upload":{"type":"boolean","default":true},"allowDuplicate":{"type":"boolean","default":false},"dryRun":{"type":"boolean","default":false}},"additionalProperties":false},"ConversionRetry":{"type":"object","properties":{"providers":{"type":"array","items":{"type":"string","enum":["meta","linkedin","google_ads","tiktok"]}},"force":{"type":"boolean","default":false}},"additionalProperties":false},"ConversionStatusUpdate":{"type":"object","properties":{"status":{"type":"string","enum":["held","pending","uploaded","skipped"]},"provider":{"type":"string","enum":["meta","linkedin","google_ads","tiktok","microsoft"]},"providerStatus":{"type":"string","enum":["pending","uploaded","feed","failed","skipped","not_configured","dry_run","error"]},"ref":{"type":"string","maxLength":200},"error":{"type":"string","maxLength":300},"note":{"type":"string","maxLength":500}},"additionalProperties":false},"ConversionDefinition":{"type":"object","properties":{"key":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,39}$"},"name":{"type":"string","minLength":1,"maxLength":100},"trigger":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["manual"]}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["beacon"]}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["event"]},"event":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,39}$"},"props":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}}},"required":["kind","event"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["goal"]},"goal":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,39}$"}},"required":["kind","goal"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["lead"]},"form":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,40}$"}},"required":["kind"],"additionalProperties":false}]},"source":{"type":"string","enum":["quiz","booking","whatsapp_manual","manual","event","goal","lead","api"]},"value":{"type":["number","null"],"minimum":0,"maximum":1000000000},"currency":{"type":["string","null"],"pattern":"^[A-Z]{3}$"},"providers":{"type":"object","properties":{"meta":{"type":"object","properties":{"enabled":{"type":"boolean"},"eventName":{"type":"string","minLength":1,"maxLength":50}},"required":["enabled","eventName"],"additionalProperties":false},"linkedin":{"type":"object","properties":{"enabled":{"type":"boolean"},"conversionRule":{"type":"string","pattern":"^(?:urn:lla:llaPartnerConversion:)?\\d{1,20}$"}},"required":["enabled","conversionRule"],"additionalProperties":false},"google_ads":{"type":"object","properties":{"enabled":{"type":"boolean"},"conversionAction":{"type":["string","null"],"maxLength":200},"feedName":{"type":["string","null"],"maxLength":100}},"required":["enabled","conversionAction","feedName"],"additionalProperties":false},"tiktok":{"type":"object","properties":{"enabled":{"type":"boolean"},"event":{"type":"string","minLength":1,"maxLength":50}},"required":["enabled","event"],"additionalProperties":false}},"additionalProperties":false},"enabled":{"type":"boolean"},"requireServerConfirmation":{"type":"boolean","default":false},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["key","name","trigger","source","value","currency","providers","enabled","createdAt","updatedAt"]},"ConversionDefinitionWrite":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"trigger":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["manual"]}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["beacon"]}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["event"]},"event":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,39}$"},"props":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}}},"required":["kind","event"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["goal"]},"goal":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,39}$"}},"required":["kind","goal"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["lead"]},"form":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,40}$"}},"required":["kind"],"additionalProperties":false}]},"source":{"type":"string","enum":["quiz","booking","whatsapp_manual","manual","event","goal","lead","api"]},"value":{"type":["number","null"],"minimum":0,"maximum":1000000000},"currency":{"type":["string","null"],"pattern":"^[A-Z]{3}$"},"providers":{"type":"object","properties":{"meta":{"type":"object","properties":{"enabled":{"type":"boolean"},"eventName":{"type":"string","minLength":1,"maxLength":50}},"required":["enabled","eventName"],"additionalProperties":false},"linkedin":{"type":"object","properties":{"enabled":{"type":"boolean"},"conversionRule":{"type":"string","pattern":"^(?:urn:lla:llaPartnerConversion:)?\\d{1,20}$"}},"required":["enabled","conversionRule"],"additionalProperties":false},"google_ads":{"type":"object","properties":{"enabled":{"type":"boolean"},"conversionAction":{"type":["string","null"],"maxLength":200},"feedName":{"type":["string","null"],"maxLength":100}},"required":["enabled","conversionAction","feedName"],"additionalProperties":false},"tiktok":{"type":"object","properties":{"enabled":{"type":"boolean"},"event":{"type":"string","minLength":1,"maxLength":50}},"required":["enabled","event"],"additionalProperties":false}},"additionalProperties":false},"enabled":{"type":"boolean"},"requireServerConfirmation":{"type":"boolean","default":false}},"required":["name","trigger","source","value","currency","providers","enabled"],"additionalProperties":false},"Destination":{"type":"object","properties":{"provider":{"type":"string","enum":["meta","linkedin","google_ads","tiktok"]},"enabled":{"type":"boolean"},"transport":{"type":"string","enum":["direct","composio","feed"]},"mode":{"type":"string","enum":["live","test","dry_run"]},"settings":{"type":"object","additionalProperties":{}},"secretsSet":{"type":"array","items":{"type":"string"}},"secretsHint":{"type":"object","additionalProperties":{"type":"string"}},"adConnectionId":{"type":["string","null"],"pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"updatedAt":{"type":["string","null"],"format":"date-time"}},"required":["provider","enabled","transport","mode","settings","secretsSet","secretsHint","adConnectionId","updatedAt"]},"DestinationWrite":{"type":"object","properties":{"enabled":{"type":"boolean"},"transport":{"type":"string","enum":["direct","composio","feed"]},"mode":{"type":"string","enum":["live","test","dry_run"]},"settings":{"type":"object","additionalProperties":{}},"secrets":{"type":"object","additionalProperties":{"type":["string","null"],"minLength":1,"maxLength":4000}},"adConnectionId":{"type":["string","null"],"pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"}},"additionalProperties":false},"DestinationTestResult":{"type":"object","properties":{"provider":{"type":"string","enum":["meta","linkedin","google_ads","tiktok"]},"ok":{"type":"boolean"},"status":{"type":"string","enum":["pending","uploaded","feed","failed","skipped","not_configured","dry_run","error"]},"detail":{"type":["string","null"]},"test":{"type":"boolean"}},"required":["provider","ok","status","detail","test"]},"Lead":{"type":"object","properties":{"id":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"createdAt":{"type":"string","format":"date-time"},"source":{"type":"string","enum":["identify","api","import"]},"form":{"type":["string","null"]},"sessionId":{"type":["string","null"],"pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"isTest":{"type":"boolean"},"email":{"type":["string","null"]},"firstName":{"type":["string","null"]},"lastName":{"type":["string","null"]},"company":{"type":["string","null"]},"identifiers":{"type":"object","properties":{"email":{"type":"boolean"},"phone":{"type":"boolean"},"firstName":{"type":"boolean"},"lastName":{"type":"boolean"},"externalId":{"type":"boolean"}},"required":["email","phone","firstName","lastName","externalId"]},"traits":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"answers":{"type":"object","additionalProperties":{"type":"object","additionalProperties":{"type":"string"}}},"score":{"type":["integer","null"]},"grade":{"type":["string","null"]},"summary":{"type":["string","null"]},"message":{"type":["string","null"]},"spam":{"type":"boolean"},"channel":{"type":["string","null"]},"entryPage":{"type":["string","null"]},"attribution":{"type":"object","properties":{"utm_source":{"type":["string","null"]},"utm_medium":{"type":["string","null"]},"utm_campaign":{"type":["string","null"]},"utm_content":{"type":["string","null"]},"utm_term":{"type":["string","null"]},"utm_id":{"type":["string","null"]},"gclid":{"type":["string","null"]},"gbraid":{"type":["string","null"]},"wbraid":{"type":["string","null"]},"fbclid":{"type":["string","null"]},"li_fat_id":{"type":["string","null"]},"ttclid":{"type":["string","null"]},"msclkid":{"type":["string","null"]}},"required":["utm_source","utm_medium","utm_campaign","utm_content","utm_term","utm_id","gclid","gbraid","wbraid","fbclid","li_fat_id","ttclid","msclkid"]},"country":{"type":["string","null"]}},"required":["id","createdAt","source","form","sessionId","isTest","email","firstName","lastName","company","identifiers","traits","answers","score","grade","summary","message","spam","channel","entryPage","attribution","country"]},"LeadCreate":{"type":"object","properties":{"form":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,40}$"},"sessionId":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"pageviewId":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"email":{"type":"string","maxLength":320},"phone":{"type":"string","maxLength":40},"firstName":{"type":"string","maxLength":100},"lastName":{"type":"string","maxLength":100},"company":{"type":"string","maxLength":200},"externalId":{"type":"string","maxLength":200},"traits":{"type":"object","additionalProperties":{"anyOf":[{"type":"string","maxLength":200},{"type":"number"},{"type":"boolean"}]}},"answers":{"type":"object","additionalProperties":{"type":"object","additionalProperties":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,40}$"}}},"score":{"type":"integer","minimum":0,"maximum":100},"grade":{"type":"string","maxLength":20},"summary":{"type":"string","maxLength":2000},"message":{"type":"string","maxLength":5000},"spam":{"type":"boolean"},"attribution":{"type":"object","additionalProperties":{"type":"string","maxLength":512}},"isTest":{"type":"boolean"},"conversion":{"type":"object","properties":{"definition":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,39}$"},"eventId":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"value":{"type":"number","minimum":0},"clientIp":{"type":"string","maxLength":64},"clientUserAgent":{"type":"string","maxLength":500},"fbp":{"type":"string","maxLength":600},"fbc":{"type":"string","maxLength":600},"ttp":{"type":"string","maxLength":600}},"required":["definition"],"additionalProperties":false}},"additionalProperties":false},"AdConnection":{"type":"object","properties":{"id":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"projectId":{"type":["string","null"],"pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"platform":{"type":"string","enum":["google_ads","meta_ads","linkedin_ads","tiktok_ads"]},"status":{"type":"string","enum":["initiated","active","expired","failed","revoked"]},"statusReason":{"type":["string","null"]},"displayLabel":{"type":["string","null"]},"loginCustomerId":{"type":["string","null"]},"accounts":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","platform","status","statusReason","displayLabel","loginCustomerId","accounts","createdAt","updatedAt"]},"AdConnectionStarted":{"type":"object","properties":{"connection":{"$ref":"#/components/schemas/AdConnection"},"redirectUrl":{"type":"string"},"expiresAt":{"type":"string","format":"date-time"}},"required":["connection","redirectUrl","expiresAt"]},"AdConnectionCreate":{"type":"object","properties":{"platform":{"type":"string","enum":["google_ads","meta_ads","linkedin_ads","tiktok_ads"]},"googleCustomerId":{"type":"string","pattern":"^\\d{10}$"}},"required":["platform"],"additionalProperties":false},"DiscoveredAdAccount":{"type":"object","properties":{"accountId":{"type":"string"},"name":{"type":["string","null"]},"currency":{"type":["string","null"],"pattern":"^[A-Z]{3}$"},"timezone":{"type":["string","null"]},"isManager":{"type":"boolean"},"accessible":{"type":"boolean"},"selected":{"type":"boolean"}},"required":["accountId","name","currency","timezone","isManager","accessible","selected"]},"AdConnectionComplete":{"type":"object","properties":{"nonce":{"type":"string","minLength":16,"maxLength":128},"connectedAccountId":{"type":"string","minLength":1,"maxLength":100},"status":{"type":"string","enum":["success","failed"]}},"required":["nonce","connectedAccountId","status"],"additionalProperties":false},"AdAccount":{"type":"object","properties":{"platform":{"type":"string","enum":["google_ads","meta_ads","linkedin_ads","tiktok_ads"]},"accountId":{"type":"string"},"connectionId":{"type":["string","null"],"pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"name":{"type":["string","null"]},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"timezone":{"type":"string"},"isManager":{"type":"boolean"},"enabled":{"type":"boolean"},"forbidden":{"type":"boolean"},"lastSyncedAt":{"type":["string","null"],"format":"date-time"}},"required":["platform","accountId","connectionId","name","currency","timezone","isManager","enabled","forbidden","lastSyncedAt"]},"AdAccountsSelect":{"type":"object","properties":{"connectionId":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"accounts":{"type":"array","items":{"type":"object","properties":{"accountId":{"type":"string","maxLength":40},"enabled":{"type":"boolean"}},"required":["accountId","enabled"],"additionalProperties":false},"minItems":1,"maxItems":100}},"required":["connectionId","accounts"],"additionalProperties":false},"AdSyncRun":{"type":"object","properties":{"id":{"type":"integer"},"platform":{"type":"string","enum":["google_ads","meta_ads","linkedin_ads","tiktok_ads"]},"accountId":{"type":["string","null"]},"job":{"type":"string"},"windowFrom":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"windowTo":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"status":{"type":"string","enum":["queued","running","ok","partial","error","skipped"]},"rows":{"type":"integer"},"errorKind":{"type":["string","null"]},"error":{"type":["string","null"]},"attempts":{"type":"integer"},"queuedAt":{"type":"string","format":"date-time"},"startedAt":{"type":["string","null"],"format":"date-time"},"finishedAt":{"type":["string","null"],"format":"date-time"},"retryAt":{"type":["string","null"],"format":"date-time"}},"required":["id","platform","accountId","job","windowFrom","windowTo","status","rows","errorKind","error","attempts","queuedAt","startedAt","finishedAt","retryAt"]},"AdSyncRequest":{"type":"object","properties":{"platform":{"type":"string","enum":["google_ads","meta_ads","linkedin_ads","tiktok_ads"]},"accountId":{"type":"string","maxLength":40},"job":{"type":"string","enum":["entities","metrics","clicks","backfill","match","all"],"default":"all"},"from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"additionalProperties":false},"AdReportRow":{"type":"object","properties":{"platform":{"type":["string","null"],"enum":["google_ads","meta_ads","linkedin_ads","tiktok_ads",null]},"accountId":{"type":["string","null"]},"campaignId":{"type":["string","null"]},"campaignName":{"type":["string","null"]},"adsetId":{"type":["string","null"]},"adsetName":{"type":["string","null"]},"adId":{"type":["string","null"]},"adName":{"type":["string","null"]},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"spend":{"type":"number"},"impressions":{"type":"number"},"clicks":{"type":"number"},"sessions":{"type":"integer"},"relevantSessions":{"type":"integer"},"engagedPlusSessions":{"type":"integer"},"hotPlusSessions":{"type":"integer"},"avgRelevance":{"type":"number"},"conversions":{"type":"integer"},"leads":{"type":"integer"},"conversionValue":{"type":"number"},"cpc":{"type":["number","null"]},"ctr":{"type":["number","null"]},"costPerSession":{"type":["number","null"]},"costPerRelevantSession":{"type":["number","null"]},"cpl":{"type":["number","null"]},"costPerConversion":{"type":["number","null"]},"roas":{"type":["number","null"]},"platformConversions":{"type":["number","null"]},"platformConversionValue":{"type":["number","null"]},"platformCpa":{"type":["number","null"]},"platformRoas":{"type":["number","null"]},"matchMethods":{"type":"object","additionalProperties":{"type":"integer"}}},"required":["platform","accountId","campaignId","campaignName","adsetId","adsetName","adId","adName","currency","spend","impressions","clicks","sessions","relevantSessions","engagedPlusSessions","hotPlusSessions","avgRelevance","conversions","leads","conversionValue","cpc","ctr","costPerSession","costPerRelevantSession","cpl","costPerConversion","roas","platformConversions","platformConversionValue","platformCpa","platformRoas","matchMethods"]},"AdTimeseriesPoint":{"type":"object","properties":{"bucket":{"type":"string"},"spend":{"type":"number"},"clicks":{"type":"number"},"impressions":{"type":"number"},"sessions":{"type":"integer"},"relevantSessions":{"type":"integer"},"conversions":{"type":"integer"}},"required":["bucket","spend","clicks","impressions","sessions","relevantSessions","conversions"]},"UnmatchedUtmRow":{"type":"object","properties":{"platform":{"type":["string","null"],"enum":["google_ads","meta_ads","linkedin_ads","tiktok_ads",null]},"utmSource":{"type":["string","null"]},"utmMedium":{"type":["string","null"]},"utmCampaign":{"type":["string","null"]},"utmContent":{"type":["string","null"]},"utmTerm":{"type":["string","null"]},"sessions":{"type":"integer"},"firstSeen":{"type":"string","format":"date-time"},"lastSeen":{"type":"string","format":"date-time"}},"required":["platform","utmSource","utmMedium","utmCampaign","utmContent","utmTerm","sessions","firstSeen","lastSeen"]},"AdEntity":{"type":"object","properties":{"platform":{"type":"string","enum":["google_ads","meta_ads","linkedin_ads","tiktok_ads"]},"accountId":{"type":"string"},"level":{"type":"string","enum":["campaign","adset","ad"]},"entityId":{"type":"string"},"campaignId":{"type":["string","null"]},"adsetId":{"type":["string","null"]},"name":{"type":["string","null"]},"status":{"type":["string","null"]},"utm":{"type":"object","additionalProperties":{"type":"string"}},"updatedAt":{"type":"string","format":"date-time"}},"required":["platform","accountId","level","entityId","campaignId","adsetId","name","status","utm","updatedAt"]},"AdMappingRule":{"type":"object","properties":{"id":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"platform":{"type":"string","enum":["google_ads","meta_ads","linkedin_ads","tiktok_ads"]},"accountId":{"type":["string","null"]},"match":{"type":"object","properties":{"utm_source":{"type":"string","maxLength":200},"utm_medium":{"type":"string","maxLength":200},"utm_campaign":{"type":"string","maxLength":200},"utm_content":{"type":"string","maxLength":200},"utm_term":{"type":"string","maxLength":200},"utm_id":{"type":"string","maxLength":200}},"additionalProperties":false},"campaignId":{"type":["string","null"]},"adsetId":{"type":["string","null"]},"adId":{"type":["string","null"]},"priority":{"type":"integer","minimum":0,"maximum":1000},"note":{"type":["string","null"],"maxLength":500},"createdAt":{"type":"string","format":"date-time"}},"required":["id","platform","accountId","match","campaignId","adsetId","adId","priority","note","createdAt"]},"AdMappingRuleWrite":{"type":"object","properties":{"platform":{"type":"string","enum":["google_ads","meta_ads","linkedin_ads","tiktok_ads"]},"accountId":{"type":["string","null"],"maxLength":40},"match":{"type":"object","properties":{"utm_source":{"type":"string","maxLength":200},"utm_medium":{"type":"string","maxLength":200},"utm_campaign":{"type":"string","maxLength":200},"utm_content":{"type":"string","maxLength":200},"utm_term":{"type":"string","maxLength":200},"utm_id":{"type":"string","maxLength":200}},"additionalProperties":false},"campaignId":{"type":["string","null"],"maxLength":100},"adsetId":{"type":["string","null"],"maxLength":100},"adId":{"type":["string","null"],"maxLength":100},"priority":{"type":"integer","minimum":0,"maximum":1000,"default":0},"note":{"type":["string","null"],"maxLength":500,"default":null}},"required":["platform","match"],"additionalProperties":false},"UtmTemplate":{"type":"object","properties":{"platform":{"type":"string","enum":["google_ads","meta_ads","linkedin_ads","tiktok_ads"]},"where":{"type":"string"},"template":{"type":"string"}},"required":["platform","where","template"]},"DetectStackResult":{"type":"object","properties":{"framework":{"type":"string","enum":["next-app","next-pages","react-vite","astro","wordpress","webflow-html","shopify","other"]},"router":{"type":"string","enum":["app","pages","history","hash","mpa","unknown"]},"typescript":{"type":"boolean"},"recommendedProxy":{"type":"string","enum":["route-handler","cloudflare-worker","nginx","netlify","wordpress","cname","none"]},"csp":{"type":"boolean"},"notes":{"type":"array","items":{"type":"string"}}},"required":["framework","router","typescript","recommendedProxy","csp","notes"]},"DetectStackInput":{"type":"object","properties":{"dependencies":{"type":"object","additionalProperties":{"type":"string"}},"files":{"type":"array","items":{"type":"string","maxLength":300},"maxItems":200},"hasCsp":{"type":"boolean"}},"additionalProperties":false},"SetupInstructions":{"type":"object","properties":{"framework":{"type":"string","enum":["next-app","next-pages","react-vite","astro","wordpress","webflow-html","shopify","other"]},"title":{"type":"string"},"steps":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"description":{"type":"string"},"files":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"language":{"type":"string"},"content":{"type":"string"},"action":{"type":"string","enum":["create","edit","append"]}},"required":["path","language","content","action"]}},"env":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"},"secret":{"type":"boolean"},"where":{"type":"string"}},"required":["name","value","secret","where"]}},"commands":{"type":"array","items":{"type":"string"}}},"required":["title","description","files","env","commands"]}},"verify":{"type":"array","items":{"type":"string"}},"docs":{"type":"array","items":{"type":"string"}}},"required":["framework","title","steps","verify","docs"]},"VerifyInstallationResult":{"type":"object","properties":{"url":{"type":"string"},"ok":{"type":"boolean"},"checks":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"ok":{"type":"boolean"},"detail":{"type":"string"},"fix":{"type":["string","null"]}},"required":["key","ok","detail","fix"]}},"recentEvents":{"type":"integer"}},"required":["url","ok","checks","recentEvents"]},"VerifyInstallationInput":{"type":"object","properties":{"url":{"type":"string","maxLength":2000,"format":"uri"}},"required":["url"],"additionalProperties":false},"EventValidateResult":{"type":"object","properties":{"valid":{"type":"boolean"},"builtIn":{"type":"boolean"},"registered":{"type":"boolean"},"normalized":{"type":["object","null"],"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"problems":{"type":"array","items":{"type":"string"}}},"required":["valid","builtIn","registered","normalized","problems"]},"EventValidate":{"type":"object","properties":{"name":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,39}$"},"props":{"type":"object","additionalProperties":{}},"project":{"type":"string","minLength":1,"maxLength":81,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)"}},"required":["name"],"additionalProperties":false},"SqlResult":{"type":"object","properties":{"columns":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"}},"required":["name","type"]}},"rows":{"type":"array","items":{"type":"array","items":{}}},"rowCount":{"type":"integer"},"truncated":{"type":"boolean"},"durationMs":{"type":"integer"}},"required":["columns","rows","rowCount","truncated","durationMs"]},"SchemaDoc":{"type":"object","properties":{"tables":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"columns":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"},"description":{"type":"string"}},"required":["name","type","description"]}}},"required":["name","description","columns"]}},"filter":{"type":"string"},"conventions":{"type":"array","items":{"type":"string"}}},"required":["tables","filter","conventions"]},"OAuthGrant":{"type":"object","properties":{"id":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"clientId":{"type":"string"},"clientName":{"type":"string"},"userId":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"userEmail":{"type":"string"},"scope":{"type":"string"},"orgIds":{"type":["array","null"],"items":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"}},"projectIds":{"type":["array","null"],"items":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"}},"createdAt":{"type":"string","format":"date-time"},"lastUsedAt":{"type":["string","null"],"format":"date-time"},"revokedAt":{"type":["string","null"],"format":"date-time"}},"required":["id","clientId","clientName","userId","userEmail","scope","projectIds","createdAt","lastUsedAt","revokedAt"]},"SetupStatus":{"type":"object","properties":{"project":{"type":"object","properties":{"id":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"orgSlug":{"type":"string","pattern":"^[a-z0-9](?:[a-z0-9-]{0,38}[a-z0-9])?$"},"slug":{"type":"string","pattern":"^[a-z0-9](?:[a-z0-9-]{0,38}[a-z0-9])?$"},"name":{"type":"string"},"preset":{"type":["string","null"]}},"required":["id","orgSlug","slug","name","preset"]},"endpoints":{"type":"object","properties":{"apiOrigin":{"type":"string"},"mcpUrl":{"type":"string"},"dashboardUrl":{"type":"string"},"docsUrl":{"type":"string"},"scriptUrl":{"type":"string"},"sdkTarballUrl":{"type":"string"}},"required":["apiOrigin","mcpUrl","dashboardUrl","docsUrl","scriptUrl","sdkTarballUrl"]},"publishableKey":{"type":["string","null"]},"testParam":{"type":"string"},"siteUrl":{"type":["string","null"]},"progress":{"type":"object","properties":{"lastStep":{"type":"string","enum":["project","install","goals","ads","conversions","ai","team","done"]},"dismissed":{"type":"boolean"},"completedAt":{"type":["string","null"],"format":"date-time"},"done":{"type":"integer"},"total":{"type":"integer"},"complete":{"type":"boolean"}},"required":["lastStep","dismissed","completedAt","done","total","complete"]},"steps":{"type":"array","items":{"$ref":"#/components/schemas/SetupStepStatus"}},"installation":{"$ref":"#/components/schemas/SetupInstallation"},"goals":{"type":"object","properties":{"presets":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"goalKey":{"type":"string"},"defined":{"type":"boolean"},"seen24h":{"type":"integer"}},"required":["key","goalKey","defined","seen24h"]}},"goals":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"name":{"type":"string"},"isConversion":{"type":"boolean"},"seen24h":{"type":"integer"}},"required":["key","name","isConversion","seen24h"]}},"relevance":{"type":"object","properties":{"version":{"type":"integer"},"preset":{"type":"string","enum":["lead","cpi","custom"]}},"required":["version","preset"]}},"required":["presets","goals","relevance"]},"ads":{"type":["object","null"],"properties":{"available":{"type":"boolean"},"platforms":{"type":"array","items":{"type":"object","properties":{"platform":{"type":"string","enum":["google_ads","meta_ads","linkedin_ads","tiktok_ads"]},"available":{"type":"boolean"},"connectionId":{"type":["string","null"],"pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"connectionStatus":{"type":["string","null"],"enum":["initiated","active","expired","failed","revoked",null]},"orgLevel":{"type":"boolean"},"accountsSelected":{"type":"integer"},"campaigns":{"type":"integer"},"spend30d":{"type":["number","null"]},"currency":{"type":"string"},"lastSyncedAt":{"type":["string","null"],"format":"date-time"},"lastRun":{"type":["object","null"],"properties":{"status":{"type":"string","enum":["queued","running","ok","partial","error","skipped"]},"errorKind":{"type":["string","null"]},"error":{"type":["string","null"]},"finishedAt":{"type":["string","null"],"format":"date-time"}},"required":["status","errorKind","error","finishedAt"]},"state":{"type":"string","enum":["not_connected","waiting","connected","error","skipped","not_applicable"]},"reason":{"type":["string","null"],"enum":["only_localhost","origin_missing","timezone_utc","no_pageview","stale_data","origin_rejected","quota_exceeded","ingest_paused","sdk_outdated","verify_failed","consent_never_granted","proxy_ip_hidden","proxy_key_derived","no_conversion_goal","goal_not_seen","event_blocked","plugin_off","composio_unavailable","platform_unavailable","connection_initiated","connection_expired","connection_failed","no_accounts_selected","sync_running","sync_error","no_spend","utm_partial","utm_missing","no_paid_traffic","unmatched_utms","no_definitions","destination_disabled","secrets_missing","settings_invalid","mode_dry_run","mode_test","test_missing","test_failed","upload_errors","no_mcp_calls","mcp_errors","no_permission",null]}},"required":["platform","available","connectionId","connectionStatus","orgLevel","accountsSelected","campaigns","spend30d","currency","lastSyncedAt","lastRun","state","reason"]}},"utm":{"type":"array","items":{"type":"object","properties":{"platform":{"type":"string","enum":["google_ads","meta_ads","linkedin_ads","tiktok_ads"]},"clicks14d":{"type":"integer"},"withUtm14d":{"type":"integer"},"coverage":{"type":["number","null"]},"state":{"type":"string","enum":["not_connected","waiting","connected","error","skipped","not_applicable"]},"reason":{"type":["string","null"],"enum":["only_localhost","origin_missing","timezone_utc","no_pageview","stale_data","origin_rejected","quota_exceeded","ingest_paused","sdk_outdated","verify_failed","consent_never_granted","proxy_ip_hidden","proxy_key_derived","no_conversion_goal","goal_not_seen","event_blocked","plugin_off","composio_unavailable","platform_unavailable","connection_initiated","connection_expired","connection_failed","no_accounts_selected","sync_running","sync_error","no_spend","utm_partial","utm_missing","no_paid_traffic","unmatched_utms","no_definitions","destination_disabled","secrets_missing","settings_invalid","mode_dry_run","mode_test","test_missing","test_failed","upload_errors","no_mcp_calls","mcp_errors","no_permission",null]}},"required":["platform","clicks14d","withUtm14d","coverage","state","reason"]}},"unmatchedUtms":{"type":"integer"}},"required":["available","platforms","utm","unmatchedUtms"]},"conversions":{"type":["object","null"],"properties":{"definitions":{"type":"integer"},"providers":{"type":"array","items":{"type":"object","properties":{"provider":{"type":"string","enum":["meta","linkedin","google_ads","tiktok"]},"configured":{"type":"boolean"},"enabled":{"type":"boolean"},"mode":{"type":"string","enum":["live","test","dry_run"]},"transport":{"type":"string","enum":["direct","composio","feed"]},"secretsMissing":{"type":"array","items":{"type":"string"}},"lastTest":{"type":["object","null"],"properties":{"ok":{"type":"boolean"},"at":{"type":"string","format":"date-time"},"status":{"type":"string"},"detail":{"type":["string","null"]}},"required":["ok","at","status","detail"]},"uploads30d":{"type":"integer"},"errors30d":{"type":"integer"},"state":{"type":"string","enum":["not_connected","waiting","connected","error","skipped","not_applicable"]},"reason":{"type":["string","null"],"enum":["only_localhost","origin_missing","timezone_utc","no_pageview","stale_data","origin_rejected","quota_exceeded","ingest_paused","sdk_outdated","verify_failed","consent_never_granted","proxy_ip_hidden","proxy_key_derived","no_conversion_goal","goal_not_seen","event_blocked","plugin_off","composio_unavailable","platform_unavailable","connection_initiated","connection_expired","connection_failed","no_accounts_selected","sync_running","sync_error","no_spend","utm_partial","utm_missing","no_paid_traffic","unmatched_utms","no_definitions","destination_disabled","secrets_missing","settings_invalid","mode_dry_run","mode_test","test_missing","test_failed","upload_errors","no_mcp_calls","mcp_errors","no_permission",null]}},"required":["provider","configured","enabled","mode","transport","secretsMissing","lastTest","uploads30d","errors30d","state","reason"]}}},"required":["definitions","providers"]},"ai":{"type":"object","properties":{"lastCallAt":{"type":["string","null"],"format":"date-time"},"calls30d":{"type":"integer"},"errors30d":{"type":"integer"},"claudeKeys":{"type":["array","null"],"items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"name":{"type":"string"},"hint":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"expiresAt":{"type":["string","null"],"format":"date-time"}},"required":["id","name","hint","createdAt","expiresAt"]}},"oauthGrants":{"type":"integer"}},"required":["lastCallAt","calls30d","errors30d","claudeKeys","oauthGrants"]},"team":{"type":["object","null"],"properties":{"members":{"type":"integer"},"pendingInvitations":{"type":"integer"}},"required":["members","pendingInvitations"]}},"required":["project","endpoints","publishableKey","testParam","siteUrl","progress","steps","installation","goals","ads","conversions","ai","team"]},"SetupStepStatus":{"type":"object","properties":{"key":{"type":"string","enum":["project","install","goals","ads","conversions","ai","team","done"]},"state":{"type":"string","enum":["not_connected","waiting","connected","error","skipped","not_applicable"]},"required":{"type":"boolean"},"skippable":{"type":"boolean"},"manual":{"type":["string","null"],"enum":["skipped","done",null]},"canEdit":{"type":"boolean"},"items":{"type":"array","items":{"$ref":"#/components/schemas/SetupItem"}},"summary":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}}},"required":["key","state","required","skippable","manual","canEdit","items","summary"]},"SetupItem":{"type":"object","properties":{"key":{"type":"string"},"state":{"type":"string","enum":["not_connected","waiting","connected","error","skipped","not_applicable"]},"reason":{"type":["string","null"],"enum":["only_localhost","origin_missing","timezone_utc","no_pageview","stale_data","origin_rejected","quota_exceeded","ingest_paused","sdk_outdated","verify_failed","consent_never_granted","proxy_ip_hidden","proxy_key_derived","no_conversion_goal","goal_not_seen","event_blocked","plugin_off","composio_unavailable","platform_unavailable","connection_initiated","connection_expired","connection_failed","no_accounts_selected","sync_running","sync_error","no_spend","utm_partial","utm_missing","no_paid_traffic","unmatched_utms","no_definitions","destination_disabled","secrets_missing","settings_invalid","mode_dry_run","mode_test","test_missing","test_failed","upload_errors","no_mcp_calls","mcp_errors","no_permission",null]},"vars":{"type":"object","additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}},"checkedAt":{"type":["string","null"],"format":"date-time"}},"required":["key","state","reason","vars","checkedAt"]},"SetupInstallation":{"type":"object","properties":{"state":{"type":"string","enum":["not_connected","waiting","connected","error","skipped","not_applicable"]},"reason":{"type":["string","null"],"enum":["only_localhost","origin_missing","timezone_utc","no_pageview","stale_data","origin_rejected","quota_exceeded","ingest_paused","sdk_outdated","verify_failed","consent_never_granted","proxy_ip_hidden","proxy_key_derived","no_conversion_goal","goal_not_seen","event_blocked","plugin_off","composio_unavailable","platform_unavailable","connection_initiated","connection_expired","connection_failed","no_accounts_selected","sync_running","sync_error","no_spend","utm_partial","utm_missing","no_paid_traffic","unmatched_utms","no_definitions","destination_disabled","secrets_missing","settings_invalid","mode_dry_run","mode_test","test_missing","test_failed","upload_errors","no_mcp_calls","mcp_errors","no_permission",null]},"firstPageviewAt":{"type":["string","null"],"format":"date-time"},"lastPageviewAt":{"type":["string","null"],"format":"date-time"},"lastEventAt":{"type":["string","null"],"format":"date-time"},"arrivedSince":{"type":"boolean"},"hosts":{"type":"array","items":{"type":"object","properties":{"host":{"type":"string"},"allowed":{"type":"boolean"},"accepted":{"type":"integer"},"rejected":{"type":"integer"},"viaProxy":{"type":"boolean"},"lastAt":{"type":"string","format":"date-time"},"knownDomain":{"type":"boolean"},"rejectedOrigin":{"type":["string","null"],"default":null}},"required":["host","allowed","accepted","rejected","viaProxy","lastAt","knownDomain"]}},"rejectedOtherHosts":{"type":"integer"},"libs":{"type":"array","items":{"type":"object","properties":{"lib":{"type":"string"},"lastAt":{"type":"string","format":"date-time"},"current":{"type":"boolean"}},"required":["lib","lastAt","current"]}},"latestSdk":{"type":"string"},"viaProxy":{"type":["boolean","null"]},"consent":{"type":"object","properties":{"mode":{"type":"string","enum":["cookieless","strict","require"]},"cmp":{"type":"array","items":{"type":"string"}},"sessions24h":{"type":"integer"},"withConsent24h":{"type":"integer"}},"required":["mode","cmp","sessions24h","withConsent24h"]},"customEvents":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"status":{"type":"string","enum":["active","observed","blocked"]},"count24h":{"type":"integer"},"lastSeenAt":{"type":["string","null"],"format":"date-time"}},"required":["name","status","count24h","lastSeenAt"]}},"testSessions15m":{"type":"integer"},"lastVerify":{"type":["object","null"],"properties":{"ok":{"type":"boolean"},"at":{"type":"string","format":"date-time"},"url":{"type":"string"},"actor":{"type":"string"},"checks":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"ok":{"type":"boolean"},"detail":{"type":"string"},"fix":{"type":["string","null"]}},"required":["key","ok","detail","fix"]}}},"required":["ok","at","url","actor","checks"]},"quota":{"type":"object","properties":{"exceeded":{"type":"boolean"},"reason":{"type":["string","null"]}},"required":["exceeded","reason"]}},"required":["state","reason","firstPageviewAt","lastPageviewAt","lastEventAt","arrivedSince","hosts","rejectedOtherHosts","libs","latestSdk","viaProxy","consent","customEvents","testSessions15m","lastVerify","quota"]},"SetupProgressUpdate":{"type":"object","properties":{"lastStep":{"type":"string","enum":["project","install","goals","ads","conversions","ai","team","done"]},"dismissed":{"type":"boolean"},"steps":{"type":"object","properties":{"goals":{"type":"string","enum":["skipped","done","open"]},"ads":{"type":"string","enum":["skipped","done","open"]},"conversions":{"type":"string","enum":["skipped","done","open"]},"ai":{"type":"string","enum":["skipped","done","open"]},"team":{"type":"string","enum":["skipped","done","open"]}}}},"additionalProperties":false},"SetupPromptList":{"type":"object","properties":{"prompts":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["install","events","server_conversions","mcp_analysis","troubleshoot","connection_test"]},"title":{"type":"string"},"description":{"type":"string"}},"required":["kind","title","description"]}}},"required":["prompts"]},"SetupPrompt":{"type":"object","properties":{"kind":{"type":"string","enum":["install","events","server_conversions","mcp_analysis","troubleshoot","connection_test"]},"title":{"type":"string"},"description":{"type":"string"},"locale":{"type":"string","enum":["de","en"]},"text":{"type":"string"},"chars":{"type":"integer"}},"required":["kind","title","description","locale","text","chars"]},"SetupTestConversionResult":{"type":"object","properties":{"provider":{"type":"string","enum":["meta","linkedin","google_ads","tiktok"]},"ok":{"type":"boolean"},"status":{"type":"string","enum":["pending","uploaded","feed","failed","skipped","not_configured","dry_run","error"]},"detail":{"type":["string","null"]},"test":{"type":"boolean"},"checkedAt":{"type":"string","format":"date-time"},"sent":{"type":"object","properties":{"eventName":{"type":["string","null"]},"eventId":{"type":"string"},"fields":{"type":"array","items":{"type":"string"}}},"required":["eventName","eventId","fields"]}},"required":["provider","ok","status","detail","test","checkedAt","sent"]},"SetupTestConversion":{"type":"object","properties":{"provider":{"type":"string","enum":["meta","linkedin","google_ads","tiktok"]},"testEventCode":{"type":"string","minLength":1,"maxLength":40}},"required":["provider"],"additionalProperties":false},"SetupMcpActivity":{"type":"object","properties":{"calls":{"type":"array","items":{"type":"object","properties":{"at":{"type":"string","format":"date-time"},"tool":{"type":"string"},"ok":{"type":"boolean"},"error":{"type":["string","null"]},"durationMs":{"type":"integer"},"client":{"type":"string","enum":["claude_code_key","oauth","other_key"]},"label":{"type":"string"}},"required":["at","tool","ok","error","durationMs","client","label"]}},"lastAt":{"type":["string","null"],"format":"date-time"},"lastUnscopedFailure":{"type":["object","null"],"properties":{"at":{"type":"string","format":"date-time"},"tool":{"type":"string"},"error":{"type":"string"}},"required":["at","tool","error"]}},"required":["calls","lastAt","lastUnscopedFailure"]},"SetupDetectStackResult":{"type":"object","properties":{"framework":{"type":"string","enum":["next-app","next-pages","react-vite","astro","wordpress","webflow-html","shopify","other","gtm","unknown"]},"signals":{"type":"array","items":{"type":"string"}}},"required":["framework","signals"]},"SetupDetectStack":{"type":"object","properties":{"url":{"type":"string","maxLength":300,"format":"uri"}},"required":["url"],"additionalProperties":false},"DocSummary":{"type":"object","properties":{"slug":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"section":{"type":"string"},"order":{"type":"number"}},"required":["slug","title","description","section","order"]},"DocSearchHit":{"type":"object","properties":{"slug":{"type":"string"},"title":{"type":"string"},"section":{"type":"string"},"score":{"type":"number"},"snippet":{"type":"string"},"anchor":{"type":["string","null"]}},"required":["slug","title","section","score","snippet","anchor"]},"Doc":{"type":"object","properties":{"slug":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"section":{"type":"string"},"order":{"type":"number"},"markdown":{"type":"string"},"headings":{"type":"array","items":{"type":"object","properties":{"depth":{"type":"integer"},"text":{"type":"string"},"id":{"type":"string"}},"required":["depth","text","id"]}}},"required":["slug","title","description","section","order","markdown","headings"]}},"parameters":{}},"paths":{"/v1/health":{"get":{"operationId":"system.health","summary":"Health check","tags":["System"],"security":[],"x-required-scopes":[],"responses":{"200":{"description":"Health check","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Health"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/cron/{job}":{"get":{"operationId":"system.cron","summary":"Run scheduled jobs (Vercel Cron / external scheduler)","description":"job = tick (all due jobs) or a single job name from the job registry. Bearer CRON_SECRET.","tags":["System"],"security":[{"CronSecret":[]}],"x-required-scopes":[],"parameters":[{"schema":{"type":"string","pattern":"^[a-z][a-z0-9_.-]{0,40}$"},"required":true,"name":"job","in":"path"}],"responses":{"200":{"description":"Run scheduled jobs (Vercel Cron / external scheduler)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CronResult"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/e":{"post":{"operationId":"ingest.collect","summary":"Collect a tracking batch (browser SDK)","description":"text/plain JSON WireBatch v2 with the publishable key in `k`. Always answers without body: 204 accepted or dropped (bots, budgets), 400 invalid, 403 origin/key, 413 too large, 429 rate limited.","tags":["Ingest"],"security":[],"x-required-scopes":[],"requestBody":{"required":true,"content":{"text/plain":{"schema":{"$ref":"#/components/schemas/WireBatch"}}}},"responses":{"204":{"description":"Collect a tracking batch (browser SDK)"},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/collect":{"post":{"operationId":"ingest.collectAlias","summary":"Alias of POST /v1/e (same handler; /v1/e is shorter and blocker-neutral)","tags":["Ingest"],"security":[],"x-required-scopes":[],"requestBody":{"required":true,"content":{"text/plain":{"schema":{"$ref":"#/components/schemas/WireBatch"}}}},"responses":{"204":{"description":"Alias of POST /v1/e (same handler; /v1/e is shorter and blocker-neutral)"},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/c/{pk}":{"get":{"operationId":"ingest.clientConfig","summary":"Client configuration for a publishable key","tags":["Ingest"],"security":[],"x-required-scopes":[],"parameters":[{"schema":{"type":"string","pattern":"^pk_3x_[0-9A-Za-z]{30}$"},"required":true,"name":"pk","in":"path"}],"responses":{"200":{"description":"Client configuration for a publishable key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientConfig"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/s/{file}":{"get":{"operationId":"ingest.script","summary":"Browser SDK script (x3.js, x3.full.js, x3.{video,sections,forms,identify,consent,bookings}.js, versioned x3@1.2.3.js); ?k=pk_… inlines the client config","tags":["Ingest"],"security":[],"x-required-scopes":[],"parameters":[{"schema":{"type":"string","pattern":"^x3(?:\\.(?:full|video|sections|forms|identify|consent|bookings))?(?:@\\d+\\.\\d+\\.\\d+)?\\.js$"},"required":true,"name":"file","in":"path"},{"schema":{"type":"string","maxLength":100},"required":false,"name":"k","in":"query"}],"responses":{"200":{"description":"Browser SDK script (x3.js, x3.full.js, x3.{video,sections,forms,identify,consent,bookings}.js, versioned x3@1.2.3.js); ?k=pk_… inlines the client config","content":{"text/javascript":{"schema":{"type":"string"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/sdk/{file}":{"get":{"operationId":"ingest.sdkPackage","summary":"npm tarball of @3x-engine/sdk built with this deployment – `npm install <api origin>/v1/sdk/3x-engine-sdk-<version>.tgz` (used by the install recipes)","tags":["Ingest"],"security":[],"x-required-scopes":[],"parameters":[{"schema":{"type":"string","pattern":"^3x-engine-sdk-\\d+\\.\\d+\\.\\d+\\.tgz$"},"required":true,"name":"file","in":"path"}],"responses":{"200":{"description":"npm tarball of @3x-engine/sdk built with this deployment – `npm install <api origin>/v1/sdk/3x-engine-sdk-<version>.tgz` (used by the install recipes)","content":{"application/gzip":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/projects/{project}/events":{"post":{"operationId":"ingest.serverEvents","summary":"Send server-side events attached to a browser session","tags":["Events"],"security":[{"SecretKey":["events:write"]},{"UserSession":["events:write"]}],"x-required-scopes":["events:write"],"x-idempotent":true,"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":81,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)"},"required":true,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)","name":"project","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServerEvents"}}}},"responses":{"202":{"description":"Send server-side events attached to a browser session","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServerEventsResult"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/auth/signup":{"post":{"operationId":"auth.signup","summary":"Create a user (self-signup when enabled, or with an invitation token)","tags":["Auth"],"security":[],"x-required-scopes":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Signup"}}}},"responses":{"201":{"description":"Create a user (self-signup when enabled, or with an invitation token)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionToken"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/auth/login":{"post":{"operationId":"auth.login","summary":"Log in with e-mail and password; returns a session token (x3s_…)","tags":["Auth"],"security":[],"x-required-scopes":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Login"}}}},"responses":{"200":{"description":"Log in with e-mail and password; returns a session token (x3s_…)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionToken"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/auth/logout":{"post":{"operationId":"auth.logout","summary":"Revoke the current session (all=true: every session of the user)","tags":["Auth"],"security":[{"UserSession":[]}],"x-required-scopes":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"all":{"type":"boolean","default":false}},"additionalProperties":false}}}},"responses":{"200":{"description":"Revoke the current session (all=true: every session of the user)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/auth/me":{"get":{"operationId":"auth.me","summary":"Current user, memberships and accessible projects","tags":["Auth"],"security":[{"UserSession":[]}],"x-required-scopes":[],"responses":{"200":{"description":"Current user, memberships and accessible projects","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Me"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/auth/sudo":{"post":{"operationId":"auth.sudo","summary":"Re-authenticate for sensitive actions (15 minutes)","tags":["Auth"],"security":[{"UserSession":[]}],"x-required-scopes":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sudo"}}}},"responses":{"200":{"description":"Re-authenticate for sensitive actions (15 minutes)","content":{"application/json":{"schema":{"type":"object","properties":{"sudoUntil":{"type":"string","format":"date-time"}},"required":["sudoUntil"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/auth/magic-link":{"post":{"operationId":"auth.magicLink","summary":"Request a magic link (same response whether the account exists)","tags":["Auth"],"security":[],"x-required-scopes":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MagicLinkRequest"}}}},"responses":{"202":{"description":"Request a magic link (same response whether the account exists)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/auth/magic-link/verify":{"post":{"operationId":"auth.magicLinkVerify","summary":"Exchange a magic-link token for a session","tags":["Auth"],"security":[],"x-required-scopes":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MagicLinkVerify"}}}},"responses":{"200":{"description":"Exchange a magic-link token for a session","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionToken"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/auth/password":{"post":{"operationId":"auth.password","summary":"Change the password (sudo)","tags":["Auth"],"security":[{"UserSession":[]}],"x-required-scopes":[],"x-sudo":true,"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasswordChange"}}}},"responses":{"200":{"description":"Change the password (sudo)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ok"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/invitations/{token}":{"get":{"operationId":"auth.invitationInfo","summary":"Invitation details for the accept page","tags":["Auth"],"security":[],"x-required-scopes":[],"parameters":[{"schema":{"type":"string","minLength":10,"maxLength":200},"required":true,"name":"token","in":"path"}],"responses":{"200":{"description":"Invitation details for the accept page","content":{"application/json":{"schema":{"type":"object","properties":{"org":{"type":"object","properties":{"slug":{"type":"string"},"name":{"type":"string"}},"required":["slug","name"]},"email":{"type":"string"},"role":{"type":"string"},"expiresAt":{"type":"string","format":"date-time"},"accountExists":{"type":"boolean"}},"required":["org","email","role","expiresAt","accountExists"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/invitations/{token}/accept":{"post":{"operationId":"auth.invitationAccept","summary":"Accept an invitation as the logged-in user","tags":["Auth"],"security":[{"UserSession":[]}],"x-required-scopes":[],"parameters":[{"schema":{"type":"string","minLength":10,"maxLength":200},"required":true,"name":"token","in":"path"}],"responses":{"200":{"description":"Accept an invitation as the logged-in user","content":{"application/json":{"schema":{"type":"object","properties":{"orgSlug":{"type":"string"}},"required":["orgSlug"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs":{"get":{"operationId":"orgs.list","summary":"Organizations of the caller","tags":["Organizations"],"security":[{"SecretKey":[]},{"UserSession":[]}],"x-required-scopes":[],"responses":{"200":{"description":"Organizations of the caller","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Organization"}}},"required":["data"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"orgs.create","summary":"Create an organization (the caller becomes owner)","tags":["Organizations"],"security":[{"UserSession":[]}],"x-required-scopes":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationCreate"}}}},"responses":{"201":{"description":"Create an organization (the caller becomes owner)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Organization"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}":{"get":{"operationId":"orgs.get","summary":"Organization","tags":["Organizations"],"security":[{"SecretKey":[]},{"UserSession":[]}],"x-required-scopes":[],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"required":true,"name":"org","in":"path"}],"responses":{"200":{"description":"Organization","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Organization"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"operationId":"orgs.update","summary":"Rename an organization","tags":["Organizations"],"security":[{"SecretKey":["org:admin"]},{"UserSession":["org:admin"]}],"x-required-scopes":["org:admin"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"required":true,"name":"org","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationUpdate"}}}},"responses":{"200":{"description":"Rename an organization","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Organization"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"operationId":"orgs.delete","summary":"Delete an organization with all projects and data (owner, sudo)","tags":["Organizations"],"security":[{"UserSession":["org:admin"]}],"x-required-scopes":["org:admin"],"x-sudo":true,"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"required":true,"name":"org","in":"path"}],"responses":{"204":{"description":"Delete an organization with all projects and data (owner, sudo)"},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/audit":{"get":{"operationId":"audit.list","summary":"Audit log (keys, members, projects, config, conversions, connections)","tags":["Organizations"],"security":[{"SecretKey":["org:admin"]},{"UserSession":["org:admin"]}],"x-required-scopes":["org:admin"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"required":true,"name":"org","in":"path"},{"schema":{"type":"string","pattern":"^\\d{1,6}$"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","maxLength":500},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"required":false,"name":"project","in":"query"},{"schema":{"type":"string","maxLength":60},"required":false,"name":"action","in":"query"}],"responses":{"200":{"description":"Audit log (keys, members, projects, config, conversions, connections)","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/AuditEntry"}},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/members":{"get":{"operationId":"members.list","summary":"Members of an organization","tags":["Members"],"security":[{"SecretKey":["org:admin"]},{"UserSession":["org:admin"]}],"x-required-scopes":["org:admin"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"required":true,"name":"org","in":"path"}],"responses":{"200":{"description":"Members of an organization","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Member"}}},"required":["data"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/members/{userId}":{"patch":{"operationId":"members.update","summary":"Change a member's role or personal-data permission (sudo)","tags":["Members"],"security":[{"UserSession":["org:admin"]}],"x-required-scopes":["org:admin"],"x-sudo":true,"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"required":true,"name":"org","in":"path"},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"required":true,"name":"userId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MemberUpdate"}}}},"responses":{"200":{"description":"Change a member's role or personal-data permission (sudo)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Member"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"operationId":"members.remove","summary":"Remove a member (sudo; the last owner cannot be removed)","tags":["Members"],"security":[{"UserSession":["org:admin"]}],"x-required-scopes":["org:admin"],"x-sudo":true,"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"required":true,"name":"org","in":"path"},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"required":true,"name":"userId","in":"path"}],"responses":{"204":{"description":"Remove a member (sudo; the last owner cannot be removed)"},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/invitations":{"get":{"operationId":"invitations.list","summary":"Open and past invitations","tags":["Members"],"security":[{"SecretKey":["org:admin"]},{"UserSession":["org:admin"]}],"x-required-scopes":["org:admin"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"required":true,"name":"org","in":"path"}],"responses":{"200":{"description":"Open and past invitations","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Invitation"}}},"required":["data"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"invitations.create","summary":"Invite a member (link valid 7 days, single use)","tags":["Members"],"security":[{"UserSession":["org:admin"]}],"x-required-scopes":["org:admin"],"x-sudo":true,"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"required":true,"name":"org","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitationCreate"}}}},"responses":{"201":{"description":"Invite a member (link valid 7 days, single use)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitationCreated"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/invitations/{id}":{"delete":{"operationId":"invitations.revoke","summary":"Revoke an invitation","tags":["Members"],"security":[{"SecretKey":["org:admin"]},{"UserSession":["org:admin"]}],"x-required-scopes":["org:admin"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"required":true,"name":"org","in":"path"},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"Revoke an invitation"},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/keys":{"get":{"operationId":"keys.list","summary":"Secret keys of the organization (never the secret)","tags":["Keys"],"security":[{"SecretKey":["org:admin"]},{"UserSession":["org:admin"]}],"x-required-scopes":["org:admin"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"required":true,"name":"org","in":"path"}],"responses":{"200":{"description":"Secret keys of the organization (never the secret)","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ApiKey"}}},"required":["data"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"keys.create","summary":"Create a secret key – the value is returned once (sudo for users; scopes ≤ caller's)","tags":["Keys"],"security":[{"SecretKey":["org:admin"]},{"UserSession":["org:admin"]}],"x-required-scopes":["org:admin"],"x-sudo":true,"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"required":true,"name":"org","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SecretKeyCreate"}}}},"responses":{"201":{"description":"Create a secret key – the value is returned once (sudo for users; scopes ≤ caller's)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyCreated"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/keys/{id}/roll":{"post":{"operationId":"keys.roll","summary":"Roll a secret key: new key now, the old one expires after the overlap (default 7 days)","tags":["Keys"],"security":[{"SecretKey":["org:admin"]},{"UserSession":["org:admin"]}],"x-required-scopes":["org:admin"],"x-sudo":true,"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"required":true,"name":"org","in":"path"},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyRoll"}}}},"responses":{"201":{"description":"Roll a secret key: new key now, the old one expires after the overlap (default 7 days)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyCreated"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/keys/{id}":{"delete":{"operationId":"keys.revoke","summary":"Revoke a secret key immediately","tags":["Keys"],"security":[{"SecretKey":["org:admin"]},{"UserSession":["org:admin"]}],"x-required-scopes":["org:admin"],"x-sudo":true,"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"required":true,"name":"org","in":"path"},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"Revoke a secret key immediately"},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/projects/{project}/proxy-keys":{"get":{"operationId":"proxyKeys.list","summary":"First-party proxy keys of the project (secret keys with exactly ingest:proxy; never the secret)","tags":["Keys"],"security":[{"SecretKey":["project:admin"]},{"UserSession":["project:admin"]}],"x-required-scopes":["project:admin"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":81,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)"},"required":true,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)","name":"project","in":"path"}],"responses":{"200":{"description":"First-party proxy keys of the project (secret keys with exactly ingest:proxy; never the secret)","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ApiKey"}}},"required":["data"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"proxyKeys.create","summary":"Create a proxy key (scope ingest:proxy, bound to this project) – the value is returned once","description":"Requires project:admin and the right to grant ingest:proxy (owners/admins; keys and OAuth grants that hold ingest:proxy). Keys created by an OAuth grant or another key are bound to it.","tags":["Keys"],"security":[{"SecretKey":["project:admin"]},{"UserSession":["project:admin"]}],"x-required-scopes":["project:admin"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":81,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)"},"required":true,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)","name":"project","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProxyKeyCreate"}}}},"responses":{"201":{"description":"Create a proxy key (scope ingest:proxy, bound to this project) – the value is returned once","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyCreated"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/projects/{project}/proxy-keys/{id}":{"delete":{"operationId":"proxyKeys.revoke","summary":"Revoke a proxy key","tags":["Keys"],"security":[{"SecretKey":["project:admin"]},{"UserSession":["project:admin"]}],"x-required-scopes":["project:admin"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":81,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)"},"required":true,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)","name":"project","in":"path"},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"Revoke a proxy key"},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/projects/{project}/publishable-keys":{"get":{"operationId":"publishableKeys.list","summary":"Publishable keys (pk_3x_…) of the project","tags":["Keys"],"security":[{"SecretKey":["analytics:read"]},{"UserSession":["analytics:read"]}],"x-required-scopes":["analytics:read"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":81,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)"},"required":true,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)","name":"project","in":"path"}],"responses":{"200":{"description":"Publishable keys (pk_3x_…) of the project","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ApiKey"}}},"required":["data"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"publishableKeys.create","summary":"Create a publishable key","tags":["Keys"],"security":[{"SecretKey":["project:admin"]},{"UserSession":["project:admin"]}],"x-required-scopes":["project:admin"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":81,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)"},"required":true,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)","name":"project","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishableKeyCreate"}}}},"responses":{"201":{"description":"Create a publishable key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyCreated"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/projects/{project}/publishable-keys/{id}/roll":{"post":{"operationId":"publishableKeys.roll","summary":"Roll a publishable key (old key keeps working during the overlap)","tags":["Keys"],"security":[{"SecretKey":["project:admin"]},{"UserSession":["project:admin"]}],"x-required-scopes":["project:admin"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":81,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)"},"required":true,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)","name":"project","in":"path"},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyRoll"}}}},"responses":{"201":{"description":"Roll a publishable key (old key keeps working during the overlap)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyCreated"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/projects/{project}/publishable-keys/{id}":{"delete":{"operationId":"publishableKeys.revoke","summary":"Revoke a publishable key","tags":["Keys"],"security":[{"SecretKey":["project:admin"]},{"UserSession":["project:admin"]}],"x-required-scopes":["project:admin"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":81,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)"},"required":true,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)","name":"project","in":"path"},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"Revoke a publishable key"},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/projects":{"get":{"operationId":"projects.list","summary":"Projects the caller can access (all orgs)","tags":["Projects"],"security":[{"SecretKey":[]},{"UserSession":[]}],"x-required-scopes":[],"parameters":[{"schema":{"type":"string","maxLength":64},"required":false,"name":"org","in":"query"},{"schema":{"type":"string","maxLength":40},"required":false,"name":"slug","in":"query"}],"responses":{"200":{"description":"Projects the caller can access (all orgs)","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Project"}}},"required":["data"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/projects":{"post":{"operationId":"projects.create","summary":"Create a project (returns it with its first publishable key); a project-narrowed key/grant gains access to it","tags":["Projects"],"security":[{"SecretKey":["project:create"]},{"UserSession":["project:create"]}],"x-required-scopes":["project:create"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"required":true,"name":"org","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectCreate"}}}},"responses":{"201":{"description":"Create a project (returns it with its first publishable key); a project-narrowed key/grant gains access to it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectCreated"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/projects/{project}":{"get":{"operationId":"projects.get","summary":"Project","tags":["Projects"],"security":[{"SecretKey":[]},{"UserSession":[]}],"x-required-scopes":[],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":81,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)"},"required":true,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)","name":"project","in":"path"}],"responses":{"200":{"description":"Project","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Project"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"operationId":"projects.update","summary":"Update project settings (name, time zone, currency, retention, limits …)","tags":["Projects"],"security":[{"SecretKey":["project:admin"]},{"UserSession":["project:admin"]}],"x-required-scopes":["project:admin"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":81,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)"},"required":true,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)","name":"project","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectUpdate"}}}},"responses":{"200":{"description":"Update project settings (name, time zone, currency, retention, limits …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Project"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"operationId":"projects.delete","summary":"Delete a project and all its data (sudo)","tags":["Projects"],"security":[{"SecretKey":["org:admin"]},{"UserSession":["org:admin"]}],"x-required-scopes":["org:admin"],"x-sudo":true,"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":81,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)"},"required":true,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)","name":"project","in":"path"}],"responses":{"204":{"description":"Delete a project and all its data (sudo)"},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/projects/{project}/config":{"get":{"operationId":"projects.getConfig","summary":"Tracking configuration (domains, origins, page groups, personal pages, consent, presets …)","tags":["Projects"],"security":[{"SecretKey":["analytics:read"]},{"UserSession":["analytics:read"]}],"x-required-scopes":["analytics:read"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":81,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)"},"required":true,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)","name":"project","in":"path"}],"responses":{"200":{"description":"Tracking configuration (domains, origins, page groups, personal pages, consent, presets …)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectTrackingConfigResponse"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"patch":{"operationId":"projects.updateConfig","summary":"Update tracking configuration (top-level keys replace stored values; bumps configRev)","tags":["Projects"],"security":[{"SecretKey":["project:admin"]},{"UserSession":["project:admin"]}],"x-required-scopes":["project:admin"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":81,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)"},"required":true,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)","name":"project","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrackingConfigPatch"}}}},"responses":{"200":{"description":"Update tracking configuration (top-level keys replace stored values; bumps configRev)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectTrackingConfigResponse"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/projects/{project}/status":{"get":{"operationId":"projects.status","summary":"Tracking status: database, storage, cleanup, rescoring progress, budgets, proxy warning, last event","tags":["Projects"],"security":[{"SecretKey":["analytics:read"]},{"UserSession":["analytics:read"]}],"x-required-scopes":["analytics:read"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":81,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)"},"required":true,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)","name":"project","in":"path"}],"responses":{"200":{"description":"Tracking status: database, storage, cleanup, rescoring progress, budgets, proxy warning, last event","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectStatus"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/projects/{project}/purge":{"post":{"operationId":"projects.purgeData","summary":"Delete tracking data in a date range or all of it (sudo)","tags":["Projects"],"security":[{"SecretKey":["project:admin"]},{"UserSession":["project:admin"]}],"x-required-scopes":["project:admin"],"x-sudo":true,"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":81,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)"},"required":true,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)","name":"project","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"scope":{"type":"string","enum":["all","range","test"]},"from":{"type":"string"},"to":{"type":"string"}},"required":["scope"],"additionalProperties":false}}}},"responses":{"200":{"description":"Delete tracking data in a date range or all of it (sudo)","content":{"application/json":{"schema":{"type":"object","properties":{"sessions":{"type":"integer"}},"required":["sessions"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/projects/{project}/analytics/overview":{"get":{"operationId":"analytics.overview","summary":"KPIs, extras, time series, default funnel, previous-period comparison","tags":["Analytics"],"security":[{"SecretKey":["analytics:read"]},{"UserSession":["analytics:read"]}],"x-required-scopes":["analytics:read"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":81,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)"},"required":true,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)","name":"project","in":"path"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Start day YYYY-MM-DD (project time zone, inclusive). Wins over preset."},"required":false,"description":"Start day YYYY-MM-DD (project time zone, inclusive). Wins over preset.","name":"from","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"End day YYYY-MM-DD (inclusive). Default today."},"required":false,"description":"End day YYYY-MM-DD (inclusive). Default today.","name":"to","in":"query"},{"schema":{"type":"string","enum":["today","yesterday","7d","14d","30d","90d","365d","this_month","last_month","all"],"description":"Date range when from/to are absent. Default 30d; all = last 731 days."},"required":false,"description":"Date range when from/to are absent. Default 30d; all = last 731 days.","name":"preset","in":"query"},{"schema":{"type":"string","pattern":"^\\/[A-Za-z0-9/._~:-]{0,199}$","description":"Canonical page path, e.g. /pricing"},"required":false,"description":"Canonical page path, e.g. /pricing","name":"page","in":"query"},{"schema":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,39}$","description":"Page group key from the project config"},"required":false,"description":"Page group key from the project config","name":"page_group","in":"query"},{"schema":{"type":"string","enum":["any","entry","exit"],"description":"Session metrics: any = a pageview on page/page_group (default), entry = entered there, exit = left there"},"required":false,"description":"Session metrics: any = a pageview on page/page_group (default), entry = entered there, exit = left there","name":"page_mode","in":"query"},{"schema":{"type":"string","enum":["google_ads","google_organic","bing","search_other","meta","linkedin","tiktok","social_other","email","ai_assistant","referral","direct","other"]},"required":false,"name":"channel","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_source","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_medium","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_campaign","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_content","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_term","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_id","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200,"description":"Entry referrer host, e.g. www.google.com"},"required":false,"description":"Entry referrer host, e.g. www.google.com","name":"ref_host","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200,"description":"Page variant of the entry pageview"},"required":false,"description":"Page variant of the entry pageview","name":"variant","in":"query"},{"schema":{"type":"string","enum":["mobile","tablet","desktop","unknown"]},"required":false,"name":"device","in":"query"},{"schema":{"type":"string","enum":["chrome","safari","firefox","edge","samsung","opera","other"]},"required":false,"name":"browser","in":"query"},{"schema":{"type":"string","enum":["windows","macos","ios","android","linux","chromeos","other"]},"required":false,"name":"os","in":"query"},{"schema":{"type":"string","pattern":"^[A-Z]{2}$","description":"ISO country code, uppercase"},"required":false,"description":"ISO country code, uppercase","name":"country","in":"query"},{"schema":{"type":"string","pattern":"^[a-z]{2}$"},"required":false,"name":"lang","in":"query"},{"schema":{"type":"string","enum":["xs","sm","md","lg","xl"]},"required":false,"name":"screen","in":"query"},{"schema":{"type":"string","enum":["0","1","true","false"]},"required":false,"name":"converted","in":"query"},{"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"required":false,"name":"has","in":"query"},{"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"required":false,"name":"goal","in":"query"},{"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"required":false,"name":"event","in":"query"},{"schema":{"type":"string","enum":["any","none","gclid","gbraid","wbraid","fbclid","li_fat_id","ttclid","msclkid"],"description":"any/none or a specific click id present on the session"},"required":false,"description":"any/none or a specific click id present on the session","name":"click_id","in":"query"},{"schema":{"type":"string","enum":["paid","organic"],"description":"paid = an ad click id or a paid utm_medium (cpc, paid, …) on the session; organic = neither"},"required":false,"description":"paid = an ad click id or a paid utm_medium (cpc, paid, …) on the session; organic = neither","name":"traffic","in":"query"},{"schema":{"type":"string","enum":["new","memory","storage","hash"]},"required":false,"name":"stitch","in":"query"},{"schema":{"type":"string","enum":["0","1","true","false"]},"required":false,"name":"consent","in":"query"},{"schema":{"type":"string","enum":["0","1","true","false"]},"required":false,"name":"include_test","in":"query"},{"schema":{"type":"string","pattern":"^-?\\d{1,9}$"},"required":false,"name":"min_relevance","in":"query"},{"schema":{"type":"string","pattern":"^-?\\d{1,9}$"},"required":false,"name":"max_relevance","in":"query"},{"schema":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,19}$","description":"Tier key, e.g. hot"},"required":false,"description":"Tier key, e.g. hot","name":"relevance_tier","in":"query"},{"schema":{"type":"string","enum":["google_ads","meta_ads","linkedin_ads","tiktok_ads"]},"required":false,"name":"ad_platform","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"ad_account_id","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"ad_campaign_id","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"ad_adset_id","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"ad_id","in":"query"},{"schema":{"type":"string","enum":["matched","unmatched"],"description":"Sessions with/without an ad-entity match"},"required":false,"description":"Sessions with/without an ad-entity match","name":"ad_match","in":"query"},{"schema":{"type":"string","enum":["hour","day","week"]},"required":false,"name":"bucket","in":"query"},{"schema":{"type":"string","enum":["0","1","true","false"]},"required":false,"name":"compare","in":"query"}],"responses":{"200":{"description":"KPIs, extras, time series, default funnel, previous-period comparison","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Overview"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/projects/{project}/analytics/timeseries":{"get":{"operationId":"analytics.timeseries","summary":"Zero-filled series of sessions, visitors, pageviews, conversions","tags":["Analytics"],"security":[{"SecretKey":["analytics:read"]},{"UserSession":["analytics:read"]}],"x-required-scopes":["analytics:read"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":81,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)"},"required":true,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)","name":"project","in":"path"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Start day YYYY-MM-DD (project time zone, inclusive). Wins over preset."},"required":false,"description":"Start day YYYY-MM-DD (project time zone, inclusive). Wins over preset.","name":"from","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"End day YYYY-MM-DD (inclusive). Default today."},"required":false,"description":"End day YYYY-MM-DD (inclusive). Default today.","name":"to","in":"query"},{"schema":{"type":"string","enum":["today","yesterday","7d","14d","30d","90d","365d","this_month","last_month","all"],"description":"Date range when from/to are absent. Default 30d; all = last 731 days."},"required":false,"description":"Date range when from/to are absent. Default 30d; all = last 731 days.","name":"preset","in":"query"},{"schema":{"type":"string","pattern":"^\\/[A-Za-z0-9/._~:-]{0,199}$","description":"Canonical page path, e.g. /pricing"},"required":false,"description":"Canonical page path, e.g. /pricing","name":"page","in":"query"},{"schema":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,39}$","description":"Page group key from the project config"},"required":false,"description":"Page group key from the project config","name":"page_group","in":"query"},{"schema":{"type":"string","enum":["any","entry","exit"],"description":"Session metrics: any = a pageview on page/page_group (default), entry = entered there, exit = left there"},"required":false,"description":"Session metrics: any = a pageview on page/page_group (default), entry = entered there, exit = left there","name":"page_mode","in":"query"},{"schema":{"type":"string","enum":["google_ads","google_organic","bing","search_other","meta","linkedin","tiktok","social_other","email","ai_assistant","referral","direct","other"]},"required":false,"name":"channel","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_source","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_medium","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_campaign","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_content","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_term","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_id","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200,"description":"Entry referrer host, e.g. www.google.com"},"required":false,"description":"Entry referrer host, e.g. www.google.com","name":"ref_host","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200,"description":"Page variant of the entry pageview"},"required":false,"description":"Page variant of the entry pageview","name":"variant","in":"query"},{"schema":{"type":"string","enum":["mobile","tablet","desktop","unknown"]},"required":false,"name":"device","in":"query"},{"schema":{"type":"string","enum":["chrome","safari","firefox","edge","samsung","opera","other"]},"required":false,"name":"browser","in":"query"},{"schema":{"type":"string","enum":["windows","macos","ios","android","linux","chromeos","other"]},"required":false,"name":"os","in":"query"},{"schema":{"type":"string","pattern":"^[A-Z]{2}$","description":"ISO country code, uppercase"},"required":false,"description":"ISO country code, uppercase","name":"country","in":"query"},{"schema":{"type":"string","pattern":"^[a-z]{2}$"},"required":false,"name":"lang","in":"query"},{"schema":{"type":"string","enum":["xs","sm","md","lg","xl"]},"required":false,"name":"screen","in":"query"},{"schema":{"type":"string","enum":["0","1","true","false"]},"required":false,"name":"converted","in":"query"},{"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"required":false,"name":"has","in":"query"},{"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"required":false,"name":"goal","in":"query"},{"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"required":false,"name":"event","in":"query"},{"schema":{"type":"string","enum":["any","none","gclid","gbraid","wbraid","fbclid","li_fat_id","ttclid","msclkid"],"description":"any/none or a specific click id present on the session"},"required":false,"description":"any/none or a specific click id present on the session","name":"click_id","in":"query"},{"schema":{"type":"string","enum":["paid","organic"],"description":"paid = an ad click id or a paid utm_medium (cpc, paid, …) on the session; organic = neither"},"required":false,"description":"paid = an ad click id or a paid utm_medium (cpc, paid, …) on the session; organic = neither","name":"traffic","in":"query"},{"schema":{"type":"string","enum":["new","memory","storage","hash"]},"required":false,"name":"stitch","in":"query"},{"schema":{"type":"string","enum":["0","1","true","false"]},"required":false,"name":"consent","in":"query"},{"schema":{"type":"string","enum":["0","1","true","false"]},"required":false,"name":"include_test","in":"query"},{"schema":{"type":"string","pattern":"^-?\\d{1,9}$"},"required":false,"name":"min_relevance","in":"query"},{"schema":{"type":"string","pattern":"^-?\\d{1,9}$"},"required":false,"name":"max_relevance","in":"query"},{"schema":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,19}$","description":"Tier key, e.g. hot"},"required":false,"description":"Tier key, e.g. hot","name":"relevance_tier","in":"query"},{"schema":{"type":"string","enum":["google_ads","meta_ads","linkedin_ads","tiktok_ads"]},"required":false,"name":"ad_platform","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"ad_account_id","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"ad_campaign_id","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"ad_adset_id","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"ad_id","in":"query"},{"schema":{"type":"string","enum":["matched","unmatched"],"description":"Sessions with/without an ad-entity match"},"required":false,"description":"Sessions with/without an ad-entity match","name":"ad_match","in":"query"},{"schema":{"type":"string","enum":["hour","day","week"]},"required":false,"name":"bucket","in":"query"}],"responses":{"200":{"description":"Zero-filled series of sessions, visitors, pageviews, conversions","content":{"application/json":{"schema":{"type":"object","properties":{"filter":{"$ref":"#/components/schemas/FilterEcho"},"bucket":{"type":"string","enum":["hour","day","week"]},"series":{"type":"array","items":{"$ref":"#/components/schemas/TimeSeriesPoint"}},"source":{"$ref":"#/components/schemas/ResultSource"}},"required":["filter","bucket","series","source"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/projects/{project}/analytics/funnel":{"get":{"operationId":"analytics.funnel","summary":"Funnel steps (default funnel or ?funnel=<key>)","tags":["Analytics"],"security":[{"SecretKey":["analytics:read"]},{"UserSession":["analytics:read"]}],"x-required-scopes":["analytics:read"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":81,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)"},"required":true,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)","name":"project","in":"path"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Start day YYYY-MM-DD (project time zone, inclusive). Wins over preset."},"required":false,"description":"Start day YYYY-MM-DD (project time zone, inclusive). Wins over preset.","name":"from","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"End day YYYY-MM-DD (inclusive). Default today."},"required":false,"description":"End day YYYY-MM-DD (inclusive). Default today.","name":"to","in":"query"},{"schema":{"type":"string","enum":["today","yesterday","7d","14d","30d","90d","365d","this_month","last_month","all"],"description":"Date range when from/to are absent. Default 30d; all = last 731 days."},"required":false,"description":"Date range when from/to are absent. Default 30d; all = last 731 days.","name":"preset","in":"query"},{"schema":{"type":"string","pattern":"^\\/[A-Za-z0-9/._~:-]{0,199}$","description":"Canonical page path, e.g. /pricing"},"required":false,"description":"Canonical page path, e.g. /pricing","name":"page","in":"query"},{"schema":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,39}$","description":"Page group key from the project config"},"required":false,"description":"Page group key from the project config","name":"page_group","in":"query"},{"schema":{"type":"string","enum":["any","entry","exit"],"description":"Session metrics: any = a pageview on page/page_group (default), entry = entered there, exit = left there"},"required":false,"description":"Session metrics: any = a pageview on page/page_group (default), entry = entered there, exit = left there","name":"page_mode","in":"query"},{"schema":{"type":"string","enum":["google_ads","google_organic","bing","search_other","meta","linkedin","tiktok","social_other","email","ai_assistant","referral","direct","other"]},"required":false,"name":"channel","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_source","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_medium","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_campaign","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_content","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_term","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_id","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200,"description":"Entry referrer host, e.g. www.google.com"},"required":false,"description":"Entry referrer host, e.g. www.google.com","name":"ref_host","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200,"description":"Page variant of the entry pageview"},"required":false,"description":"Page variant of the entry pageview","name":"variant","in":"query"},{"schema":{"type":"string","enum":["mobile","tablet","desktop","unknown"]},"required":false,"name":"device","in":"query"},{"schema":{"type":"string","enum":["chrome","safari","firefox","edge","samsung","opera","other"]},"required":false,"name":"browser","in":"query"},{"schema":{"type":"string","enum":["windows","macos","ios","android","linux","chromeos","other"]},"required":false,"name":"os","in":"query"},{"schema":{"type":"string","pattern":"^[A-Z]{2}$","description":"ISO country code, uppercase"},"required":false,"description":"ISO country code, uppercase","name":"country","in":"query"},{"schema":{"type":"string","pattern":"^[a-z]{2}$"},"required":false,"name":"lang","in":"query"},{"schema":{"type":"string","enum":["xs","sm","md","lg","xl"]},"required":false,"name":"screen","in":"query"},{"schema":{"type":"string","enum":["0","1","true","false"]},"required":false,"name":"converted","in":"query"},{"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"required":false,"name":"has","in":"query"},{"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"required":false,"name":"goal","in":"query"},{"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"required":false,"name":"event","in":"query"},{"schema":{"type":"string","enum":["any","none","gclid","gbraid","wbraid","fbclid","li_fat_id","ttclid","msclkid"],"description":"any/none or a specific click id present on the session"},"required":false,"description":"any/none or a specific click id present on the session","name":"click_id","in":"query"},{"schema":{"type":"string","enum":["paid","organic"],"description":"paid = an ad click id or a paid utm_medium (cpc, paid, …) on the session; organic = neither"},"required":false,"description":"paid = an ad click id or a paid utm_medium (cpc, paid, …) on the session; organic = neither","name":"traffic","in":"query"},{"schema":{"type":"string","enum":["new","memory","storage","hash"]},"required":false,"name":"stitch","in":"query"},{"schema":{"type":"string","enum":["0","1","true","false"]},"required":false,"name":"consent","in":"query"},{"schema":{"type":"string","enum":["0","1","true","false"]},"required":false,"name":"include_test","in":"query"},{"schema":{"type":"string","pattern":"^-?\\d{1,9}$"},"required":false,"name":"min_relevance","in":"query"},{"schema":{"type":"string","pattern":"^-?\\d{1,9}$"},"required":false,"name":"max_relevance","in":"query"},{"schema":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,19}$","description":"Tier key, e.g. hot"},"required":false,"description":"Tier key, e.g. hot","name":"relevance_tier","in":"query"},{"schema":{"type":"string","enum":["google_ads","meta_ads","linkedin_ads","tiktok_ads"]},"required":false,"name":"ad_platform","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"ad_account_id","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"ad_campaign_id","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"ad_adset_id","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"ad_id","in":"query"},{"schema":{"type":"string","enum":["matched","unmatched"],"description":"Sessions with/without an ad-entity match"},"required":false,"description":"Sessions with/without an ad-entity match","name":"ad_match","in":"query"},{"schema":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,39}$"},"required":false,"name":"funnel","in":"query"}],"responses":{"200":{"description":"Funnel steps (default funnel or ?funnel=<key>)","content":{"application/json":{"schema":{"type":"object","properties":{"funnel":{"type":"object","properties":{"key":{"type":"string"},"name":{"type":"string"},"mode":{"type":"string","enum":["independent","sequential"]}},"required":["key","name","mode"]},"steps":{"type":"array","items":{"$ref":"#/components/schemas/FunnelStepRow"}},"filter":{"$ref":"#/components/schemas/FilterEcho"}},"required":["funnel","steps","filter"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/projects/{project}/analytics/breakdown":{"get":{"operationId":"analytics.breakdown","summary":"Full session aggregate per value of a dimension","tags":["Analytics"],"security":[{"SecretKey":["analytics:read"]},{"UserSession":["analytics:read"]}],"x-required-scopes":["analytics:read"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":81,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)"},"required":true,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)","name":"project","in":"path"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Start day YYYY-MM-DD (project time zone, inclusive). Wins over preset."},"required":false,"description":"Start day YYYY-MM-DD (project time zone, inclusive). Wins over preset.","name":"from","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"End day YYYY-MM-DD (inclusive). Default today."},"required":false,"description":"End day YYYY-MM-DD (inclusive). Default today.","name":"to","in":"query"},{"schema":{"type":"string","enum":["today","yesterday","7d","14d","30d","90d","365d","this_month","last_month","all"],"description":"Date range when from/to are absent. Default 30d; all = last 731 days."},"required":false,"description":"Date range when from/to are absent. Default 30d; all = last 731 days.","name":"preset","in":"query"},{"schema":{"type":"string","pattern":"^\\/[A-Za-z0-9/._~:-]{0,199}$","description":"Canonical page path, e.g. /pricing"},"required":false,"description":"Canonical page path, e.g. /pricing","name":"page","in":"query"},{"schema":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,39}$","description":"Page group key from the project config"},"required":false,"description":"Page group key from the project config","name":"page_group","in":"query"},{"schema":{"type":"string","enum":["any","entry","exit"],"description":"Session metrics: any = a pageview on page/page_group (default), entry = entered there, exit = left there"},"required":false,"description":"Session metrics: any = a pageview on page/page_group (default), entry = entered there, exit = left there","name":"page_mode","in":"query"},{"schema":{"type":"string","enum":["google_ads","google_organic","bing","search_other","meta","linkedin","tiktok","social_other","email","ai_assistant","referral","direct","other"]},"required":false,"name":"channel","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_source","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_medium","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_campaign","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_content","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_term","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_id","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200,"description":"Entry referrer host, e.g. www.google.com"},"required":false,"description":"Entry referrer host, e.g. www.google.com","name":"ref_host","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200,"description":"Page variant of the entry pageview"},"required":false,"description":"Page variant of the entry pageview","name":"variant","in":"query"},{"schema":{"type":"string","enum":["mobile","tablet","desktop","unknown"]},"required":false,"name":"device","in":"query"},{"schema":{"type":"string","enum":["chrome","safari","firefox","edge","samsung","opera","other"]},"required":false,"name":"browser","in":"query"},{"schema":{"type":"string","enum":["windows","macos","ios","android","linux","chromeos","other"]},"required":false,"name":"os","in":"query"},{"schema":{"type":"string","pattern":"^[A-Z]{2}$","description":"ISO country code, uppercase"},"required":false,"description":"ISO country code, uppercase","name":"country","in":"query"},{"schema":{"type":"string","pattern":"^[a-z]{2}$"},"required":false,"name":"lang","in":"query"},{"schema":{"type":"string","enum":["xs","sm","md","lg","xl"]},"required":false,"name":"screen","in":"query"},{"schema":{"type":"string","enum":["0","1","true","false"]},"required":false,"name":"converted","in":"query"},{"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"required":false,"name":"has","in":"query"},{"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"required":false,"name":"goal","in":"query"},{"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"required":false,"name":"event","in":"query"},{"schema":{"type":"string","enum":["any","none","gclid","gbraid","wbraid","fbclid","li_fat_id","ttclid","msclkid"],"description":"any/none or a specific click id present on the session"},"required":false,"description":"any/none or a specific click id present on the session","name":"click_id","in":"query"},{"schema":{"type":"string","enum":["paid","organic"],"description":"paid = an ad click id or a paid utm_medium (cpc, paid, …) on the session; organic = neither"},"required":false,"description":"paid = an ad click id or a paid utm_medium (cpc, paid, …) on the session; organic = neither","name":"traffic","in":"query"},{"schema":{"type":"string","enum":["new","memory","storage","hash"]},"required":false,"name":"stitch","in":"query"},{"schema":{"type":"string","enum":["0","1","true","false"]},"required":false,"name":"consent","in":"query"},{"schema":{"type":"string","enum":["0","1","true","false"]},"required":false,"name":"include_test","in":"query"},{"schema":{"type":"string","pattern":"^-?\\d{1,9}$"},"required":false,"name":"min_relevance","in":"query"},{"schema":{"type":"string","pattern":"^-?\\d{1,9}$"},"required":false,"name":"max_relevance","in":"query"},{"schema":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,19}$","description":"Tier key, e.g. hot"},"required":false,"description":"Tier key, e.g. hot","name":"relevance_tier","in":"query"},{"schema":{"type":"string","enum":["google_ads","meta_ads","linkedin_ads","tiktok_ads"]},"required":false,"name":"ad_platform","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"ad_account_id","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"ad_campaign_id","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"ad_adset_id","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"ad_id","in":"query"},{"schema":{"type":"string","enum":["matched","unmatched"],"description":"Sessions with/without an ad-entity match"},"required":false,"description":"Sessions with/without an ad-entity match","name":"ad_match","in":"query"},{"schema":{"type":"string","enum":["channel","utm_source","utm_medium","utm_campaign","utm_content","utm_term","utm_id","ref_host","entry_page","entry_group","variant","device","browser","os","country","lang","exit_page","exit_group","entry_host","screen","stitch","attr_from","click_id","converted","quiz_answers","consent","relevance_tier","goal","ad_platform","ad_campaign","ad_adset","ad","day","week","month","hour_of_day","weekday"]},"required":true,"name":"dimension","in":"query"},{"schema":{"type":"string","pattern":"^(?:value|[a-zA-Z]{2,40})$"},"required":false,"name":"sort","in":"query"},{"schema":{"type":"string","enum":["asc","desc"]},"required":false,"name":"dir","in":"query"},{"schema":{"type":"string","pattern":"^\\d{1,6}$"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","pattern":"^\\d{1,6}$"},"required":false,"name":"min_sessions","in":"query"}],"responses":{"200":{"description":"Full session aggregate per value of a dimension","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Breakdown"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/projects/{project}/analytics/relevance-ranking":{"get":{"operationId":"analytics.relevanceRanking","summary":"Rank values of a dimension by relevance (default utm_campaign)","tags":["Analytics"],"security":[{"SecretKey":["analytics:read"]},{"UserSession":["analytics:read"]}],"x-required-scopes":["analytics:read"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":81,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)"},"required":true,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)","name":"project","in":"path"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Start day YYYY-MM-DD (project time zone, inclusive). Wins over preset."},"required":false,"description":"Start day YYYY-MM-DD (project time zone, inclusive). Wins over preset.","name":"from","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"End day YYYY-MM-DD (inclusive). Default today."},"required":false,"description":"End day YYYY-MM-DD (inclusive). Default today.","name":"to","in":"query"},{"schema":{"type":"string","enum":["today","yesterday","7d","14d","30d","90d","365d","this_month","last_month","all"],"description":"Date range when from/to are absent. Default 30d; all = last 731 days."},"required":false,"description":"Date range when from/to are absent. Default 30d; all = last 731 days.","name":"preset","in":"query"},{"schema":{"type":"string","pattern":"^\\/[A-Za-z0-9/._~:-]{0,199}$","description":"Canonical page path, e.g. /pricing"},"required":false,"description":"Canonical page path, e.g. /pricing","name":"page","in":"query"},{"schema":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,39}$","description":"Page group key from the project config"},"required":false,"description":"Page group key from the project config","name":"page_group","in":"query"},{"schema":{"type":"string","enum":["any","entry","exit"],"description":"Session metrics: any = a pageview on page/page_group (default), entry = entered there, exit = left there"},"required":false,"description":"Session metrics: any = a pageview on page/page_group (default), entry = entered there, exit = left there","name":"page_mode","in":"query"},{"schema":{"type":"string","enum":["google_ads","google_organic","bing","search_other","meta","linkedin","tiktok","social_other","email","ai_assistant","referral","direct","other"]},"required":false,"name":"channel","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_source","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_medium","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_campaign","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_content","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_term","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_id","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200,"description":"Entry referrer host, e.g. www.google.com"},"required":false,"description":"Entry referrer host, e.g. www.google.com","name":"ref_host","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200,"description":"Page variant of the entry pageview"},"required":false,"description":"Page variant of the entry pageview","name":"variant","in":"query"},{"schema":{"type":"string","enum":["mobile","tablet","desktop","unknown"]},"required":false,"name":"device","in":"query"},{"schema":{"type":"string","enum":["chrome","safari","firefox","edge","samsung","opera","other"]},"required":false,"name":"browser","in":"query"},{"schema":{"type":"string","enum":["windows","macos","ios","android","linux","chromeos","other"]},"required":false,"name":"os","in":"query"},{"schema":{"type":"string","pattern":"^[A-Z]{2}$","description":"ISO country code, uppercase"},"required":false,"description":"ISO country code, uppercase","name":"country","in":"query"},{"schema":{"type":"string","pattern":"^[a-z]{2}$"},"required":false,"name":"lang","in":"query"},{"schema":{"type":"string","enum":["xs","sm","md","lg","xl"]},"required":false,"name":"screen","in":"query"},{"schema":{"type":"string","enum":["0","1","true","false"]},"required":false,"name":"converted","in":"query"},{"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"required":false,"name":"has","in":"query"},{"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"required":false,"name":"goal","in":"query"},{"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"required":false,"name":"event","in":"query"},{"schema":{"type":"string","enum":["any","none","gclid","gbraid","wbraid","fbclid","li_fat_id","ttclid","msclkid"],"description":"any/none or a specific click id present on the session"},"required":false,"description":"any/none or a specific click id present on the session","name":"click_id","in":"query"},{"schema":{"type":"string","enum":["paid","organic"],"description":"paid = an ad click id or a paid utm_medium (cpc, paid, …) on the session; organic = neither"},"required":false,"description":"paid = an ad click id or a paid utm_medium (cpc, paid, …) on the session; organic = neither","name":"traffic","in":"query"},{"schema":{"type":"string","enum":["new","memory","storage","hash"]},"required":false,"name":"stitch","in":"query"},{"schema":{"type":"string","enum":["0","1","true","false"]},"required":false,"name":"consent","in":"query"},{"schema":{"type":"string","enum":["0","1","true","false"]},"required":false,"name":"include_test","in":"query"},{"schema":{"type":"string","pattern":"^-?\\d{1,9}$"},"required":false,"name":"min_relevance","in":"query"},{"schema":{"type":"string","pattern":"^-?\\d{1,9}$"},"required":false,"name":"max_relevance","in":"query"},{"schema":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,19}$","description":"Tier key, e.g. hot"},"required":false,"description":"Tier key, e.g. hot","name":"relevance_tier","in":"query"},{"schema":{"type":"string","enum":["google_ads","meta_ads","linkedin_ads","tiktok_ads"]},"required":false,"name":"ad_platform","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"ad_account_id","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"ad_campaign_id","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"ad_adset_id","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"ad_id","in":"query"},{"schema":{"type":"string","enum":["matched","unmatched"],"description":"Sessions with/without an ad-entity match"},"required":false,"description":"Sessions with/without an ad-entity match","name":"ad_match","in":"query"},{"schema":{"type":"string","enum":["channel","utm_source","utm_medium","utm_campaign","utm_content","utm_term","utm_id","ref_host","entry_page","entry_group","variant","device","browser","os","country","lang"]},"required":false,"name":"dimension","in":"query"},{"schema":{"type":"string","enum":["avg","hot","hot_rate","engaged_rate","sessions"]},"required":false,"name":"sort","in":"query"},{"schema":{"type":"string","pattern":"^\\d{1,6}$"},"required":false,"name":"min_sessions","in":"query"},{"schema":{"type":"string","pattern":"^\\d{1,6}$"},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"Rank values of a dimension by relevance (default utm_campaign)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RelevanceRanking"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/projects/{project}/analytics/pages":{"get":{"operationId":"analytics.pages","summary":"Pages: pageviews, sessions, entries, exits, engagement, scroll, fold-only, clicks, video","tags":["Analytics"],"security":[{"SecretKey":["analytics:read"]},{"UserSession":["analytics:read"]}],"x-required-scopes":["analytics:read"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":81,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)"},"required":true,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)","name":"project","in":"path"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Start day YYYY-MM-DD (project time zone, inclusive). Wins over preset."},"required":false,"description":"Start day YYYY-MM-DD (project time zone, inclusive). Wins over preset.","name":"from","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"End day YYYY-MM-DD (inclusive). Default today."},"required":false,"description":"End day YYYY-MM-DD (inclusive). Default today.","name":"to","in":"query"},{"schema":{"type":"string","enum":["today","yesterday","7d","14d","30d","90d","365d","this_month","last_month","all"],"description":"Date range when from/to are absent. Default 30d; all = last 731 days."},"required":false,"description":"Date range when from/to are absent. Default 30d; all = last 731 days.","name":"preset","in":"query"},{"schema":{"type":"string","pattern":"^\\/[A-Za-z0-9/._~:-]{0,199}$","description":"Canonical page path, e.g. /pricing"},"required":false,"description":"Canonical page path, e.g. /pricing","name":"page","in":"query"},{"schema":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,39}$","description":"Page group key from the project config"},"required":false,"description":"Page group key from the project config","name":"page_group","in":"query"},{"schema":{"type":"string","enum":["any","entry","exit"],"description":"Session metrics: any = a pageview on page/page_group (default), entry = entered there, exit = left there"},"required":false,"description":"Session metrics: any = a pageview on page/page_group (default), entry = entered there, exit = left there","name":"page_mode","in":"query"},{"schema":{"type":"string","enum":["google_ads","google_organic","bing","search_other","meta","linkedin","tiktok","social_other","email","ai_assistant","referral","direct","other"]},"required":false,"name":"channel","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_source","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_medium","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_campaign","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_content","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_term","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_id","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200,"description":"Entry referrer host, e.g. www.google.com"},"required":false,"description":"Entry referrer host, e.g. www.google.com","name":"ref_host","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200,"description":"Page variant of the entry pageview"},"required":false,"description":"Page variant of the entry pageview","name":"variant","in":"query"},{"schema":{"type":"string","enum":["mobile","tablet","desktop","unknown"]},"required":false,"name":"device","in":"query"},{"schema":{"type":"string","enum":["chrome","safari","firefox","edge","samsung","opera","other"]},"required":false,"name":"browser","in":"query"},{"schema":{"type":"string","enum":["windows","macos","ios","android","linux","chromeos","other"]},"required":false,"name":"os","in":"query"},{"schema":{"type":"string","pattern":"^[A-Z]{2}$","description":"ISO country code, uppercase"},"required":false,"description":"ISO country code, uppercase","name":"country","in":"query"},{"schema":{"type":"string","pattern":"^[a-z]{2}$"},"required":false,"name":"lang","in":"query"},{"schema":{"type":"string","enum":["xs","sm","md","lg","xl"]},"required":false,"name":"screen","in":"query"},{"schema":{"type":"string","enum":["0","1","true","false"]},"required":false,"name":"converted","in":"query"},{"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"required":false,"name":"has","in":"query"},{"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"required":false,"name":"goal","in":"query"},{"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"required":false,"name":"event","in":"query"},{"schema":{"type":"string","enum":["any","none","gclid","gbraid","wbraid","fbclid","li_fat_id","ttclid","msclkid"],"description":"any/none or a specific click id present on the session"},"required":false,"description":"any/none or a specific click id present on the session","name":"click_id","in":"query"},{"schema":{"type":"string","enum":["paid","organic"],"description":"paid = an ad click id or a paid utm_medium (cpc, paid, …) on the session; organic = neither"},"required":false,"description":"paid = an ad click id or a paid utm_medium (cpc, paid, …) on the session; organic = neither","name":"traffic","in":"query"},{"schema":{"type":"string","enum":["new","memory","storage","hash"]},"required":false,"name":"stitch","in":"query"},{"schema":{"type":"string","enum":["0","1","true","false"]},"required":false,"name":"consent","in":"query"},{"schema":{"type":"string","enum":["0","1","true","false"]},"required":false,"name":"include_test","in":"query"},{"schema":{"type":"string","pattern":"^-?\\d{1,9}$"},"required":false,"name":"min_relevance","in":"query"},{"schema":{"type":"string","pattern":"^-?\\d{1,9}$"},"required":false,"name":"max_relevance","in":"query"},{"schema":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,19}$","description":"Tier key, e.g. hot"},"required":false,"description":"Tier key, e.g. hot","name":"relevance_tier","in":"query"},{"schema":{"type":"string","enum":["google_ads","meta_ads","linkedin_ads","tiktok_ads"]},"required":false,"name":"ad_platform","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"ad_account_id","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"ad_campaign_id","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"ad_adset_id","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"ad_id","in":"query"},{"schema":{"type":"string","enum":["matched","unmatched"],"description":"Sessions with/without an ad-entity match"},"required":false,"description":"Sessions with/without an ad-entity match","name":"ad_match","in":"query"},{"schema":{"type":"string","pattern":"^\\d{1,6}$"},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"Pages: pageviews, sessions, entries, exits, engagement, scroll, fold-only, clicks, video","content":{"application/json":{"schema":{"type":"object","properties":{"filter":{"$ref":"#/components/schemas/FilterEcho"},"rows":{"type":"array","items":{"$ref":"#/components/schemas/PageRow"}}},"required":["filter","rows"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/projects/{project}/analytics/scroll":{"get":{"operationId":"analytics.scroll","summary":"Scroll curve, fold-only rate, fold share, milestones (restored scroll positions excluded)","tags":["Analytics"],"security":[{"SecretKey":["analytics:read"]},{"UserSession":["analytics:read"]}],"x-required-scopes":["analytics:read"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":81,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)"},"required":true,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)","name":"project","in":"path"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Start day YYYY-MM-DD (project time zone, inclusive). Wins over preset."},"required":false,"description":"Start day YYYY-MM-DD (project time zone, inclusive). Wins over preset.","name":"from","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"End day YYYY-MM-DD (inclusive). Default today."},"required":false,"description":"End day YYYY-MM-DD (inclusive). Default today.","name":"to","in":"query"},{"schema":{"type":"string","enum":["today","yesterday","7d","14d","30d","90d","365d","this_month","last_month","all"],"description":"Date range when from/to are absent. Default 30d; all = last 731 days."},"required":false,"description":"Date range when from/to are absent. Default 30d; all = last 731 days.","name":"preset","in":"query"},{"schema":{"type":"string","pattern":"^\\/[A-Za-z0-9/._~:-]{0,199}$","description":"Canonical page path, e.g. /pricing"},"required":false,"description":"Canonical page path, e.g. /pricing","name":"page","in":"query"},{"schema":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,39}$","description":"Page group key from the project config"},"required":false,"description":"Page group key from the project config","name":"page_group","in":"query"},{"schema":{"type":"string","enum":["any","entry","exit"],"description":"Session metrics: any = a pageview on page/page_group (default), entry = entered there, exit = left there"},"required":false,"description":"Session metrics: any = a pageview on page/page_group (default), entry = entered there, exit = left there","name":"page_mode","in":"query"},{"schema":{"type":"string","enum":["google_ads","google_organic","bing","search_other","meta","linkedin","tiktok","social_other","email","ai_assistant","referral","direct","other"]},"required":false,"name":"channel","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_source","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_medium","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_campaign","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_content","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_term","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_id","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200,"description":"Entry referrer host, e.g. www.google.com"},"required":false,"description":"Entry referrer host, e.g. www.google.com","name":"ref_host","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200,"description":"Page variant of the entry pageview"},"required":false,"description":"Page variant of the entry pageview","name":"variant","in":"query"},{"schema":{"type":"string","enum":["mobile","tablet","desktop","unknown"]},"required":false,"name":"device","in":"query"},{"schema":{"type":"string","enum":["chrome","safari","firefox","edge","samsung","opera","other"]},"required":false,"name":"browser","in":"query"},{"schema":{"type":"string","enum":["windows","macos","ios","android","linux","chromeos","other"]},"required":false,"name":"os","in":"query"},{"schema":{"type":"string","pattern":"^[A-Z]{2}$","description":"ISO country code, uppercase"},"required":false,"description":"ISO country code, uppercase","name":"country","in":"query"},{"schema":{"type":"string","pattern":"^[a-z]{2}$"},"required":false,"name":"lang","in":"query"},{"schema":{"type":"string","enum":["xs","sm","md","lg","xl"]},"required":false,"name":"screen","in":"query"},{"schema":{"type":"string","enum":["0","1","true","false"]},"required":false,"name":"converted","in":"query"},{"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"required":false,"name":"has","in":"query"},{"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"required":false,"name":"goal","in":"query"},{"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"required":false,"name":"event","in":"query"},{"schema":{"type":"string","enum":["any","none","gclid","gbraid","wbraid","fbclid","li_fat_id","ttclid","msclkid"],"description":"any/none or a specific click id present on the session"},"required":false,"description":"any/none or a specific click id present on the session","name":"click_id","in":"query"},{"schema":{"type":"string","enum":["paid","organic"],"description":"paid = an ad click id or a paid utm_medium (cpc, paid, …) on the session; organic = neither"},"required":false,"description":"paid = an ad click id or a paid utm_medium (cpc, paid, …) on the session; organic = neither","name":"traffic","in":"query"},{"schema":{"type":"string","enum":["new","memory","storage","hash"]},"required":false,"name":"stitch","in":"query"},{"schema":{"type":"string","enum":["0","1","true","false"]},"required":false,"name":"consent","in":"query"},{"schema":{"type":"string","enum":["0","1","true","false"]},"required":false,"name":"include_test","in":"query"},{"schema":{"type":"string","pattern":"^-?\\d{1,9}$"},"required":false,"name":"min_relevance","in":"query"},{"schema":{"type":"string","pattern":"^-?\\d{1,9}$"},"required":false,"name":"max_relevance","in":"query"},{"schema":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,19}$","description":"Tier key, e.g. hot"},"required":false,"description":"Tier key, e.g. hot","name":"relevance_tier","in":"query"},{"schema":{"type":"string","enum":["google_ads","meta_ads","linkedin_ads","tiktok_ads"]},"required":false,"name":"ad_platform","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"ad_account_id","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"ad_campaign_id","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"ad_adset_id","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"ad_id","in":"query"},{"schema":{"type":"string","enum":["matched","unmatched"],"description":"Sessions with/without an ad-entity match"},"required":false,"description":"Sessions with/without an ad-entity match","name":"ad_match","in":"query"}],"responses":{"200":{"description":"Scroll curve, fold-only rate, fold share, milestones (restored scroll positions excluded)","content":{"application/json":{"schema":{"type":"object","properties":{"pageviews":{"type":"integer"},"curve":{"type":"array","items":{"type":"object","properties":{"pct":{"type":"integer"},"pageviews":{"type":"integer"},"share":{"type":"number"}},"required":["pct","pageviews","share"]}},"foldOnlyRate":{"type":"number"},"medianFoldPct":{"type":"number"},"medianViewportH":{"type":"number"},"medianPageH":{"type":"number"},"milestones":{"type":"array","items":{"type":"object","properties":{"pct":{"type":"integer"},"share":{"type":"number"},"medianSeconds":{"type":["number","null"]}},"required":["pct","share","medianSeconds"]}},"filter":{"$ref":"#/components/schemas/FilterEcho"}},"required":["pageviews","curve","foldOnlyRate","medianFoldPct","medianViewportH","medianPageH","milestones","filter"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/projects/{project}/analytics/sections":{"get":{"operationId":"analytics.sections","summary":"Section reach per page","tags":["Analytics"],"security":[{"SecretKey":["analytics:read"]},{"UserSession":["analytics:read"]}],"x-required-scopes":["analytics:read"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":81,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)"},"required":true,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)","name":"project","in":"path"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Start day YYYY-MM-DD (project time zone, inclusive). Wins over preset."},"required":false,"description":"Start day YYYY-MM-DD (project time zone, inclusive). Wins over preset.","name":"from","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"End day YYYY-MM-DD (inclusive). Default today."},"required":false,"description":"End day YYYY-MM-DD (inclusive). Default today.","name":"to","in":"query"},{"schema":{"type":"string","enum":["today","yesterday","7d","14d","30d","90d","365d","this_month","last_month","all"],"description":"Date range when from/to are absent. Default 30d; all = last 731 days."},"required":false,"description":"Date range when from/to are absent. Default 30d; all = last 731 days.","name":"preset","in":"query"},{"schema":{"type":"string","pattern":"^\\/[A-Za-z0-9/._~:-]{0,199}$","description":"Canonical page path, e.g. /pricing"},"required":false,"description":"Canonical page path, e.g. /pricing","name":"page","in":"query"},{"schema":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,39}$","description":"Page group key from the project config"},"required":false,"description":"Page group key from the project config","name":"page_group","in":"query"},{"schema":{"type":"string","enum":["any","entry","exit"],"description":"Session metrics: any = a pageview on page/page_group (default), entry = entered there, exit = left there"},"required":false,"description":"Session metrics: any = a pageview on page/page_group (default), entry = entered there, exit = left there","name":"page_mode","in":"query"},{"schema":{"type":"string","enum":["google_ads","google_organic","bing","search_other","meta","linkedin","tiktok","social_other","email","ai_assistant","referral","direct","other"]},"required":false,"name":"channel","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_source","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_medium","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_campaign","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_content","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_term","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_id","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200,"description":"Entry referrer host, e.g. www.google.com"},"required":false,"description":"Entry referrer host, e.g. www.google.com","name":"ref_host","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200,"description":"Page variant of the entry pageview"},"required":false,"description":"Page variant of the entry pageview","name":"variant","in":"query"},{"schema":{"type":"string","enum":["mobile","tablet","desktop","unknown"]},"required":false,"name":"device","in":"query"},{"schema":{"type":"string","enum":["chrome","safari","firefox","edge","samsung","opera","other"]},"required":false,"name":"browser","in":"query"},{"schema":{"type":"string","enum":["windows","macos","ios","android","linux","chromeos","other"]},"required":false,"name":"os","in":"query"},{"schema":{"type":"string","pattern":"^[A-Z]{2}$","description":"ISO country code, uppercase"},"required":false,"description":"ISO country code, uppercase","name":"country","in":"query"},{"schema":{"type":"string","pattern":"^[a-z]{2}$"},"required":false,"name":"lang","in":"query"},{"schema":{"type":"string","enum":["xs","sm","md","lg","xl"]},"required":false,"name":"screen","in":"query"},{"schema":{"type":"string","enum":["0","1","true","false"]},"required":false,"name":"converted","in":"query"},{"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"required":false,"name":"has","in":"query"},{"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"required":false,"name":"goal","in":"query"},{"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"required":false,"name":"event","in":"query"},{"schema":{"type":"string","enum":["any","none","gclid","gbraid","wbraid","fbclid","li_fat_id","ttclid","msclkid"],"description":"any/none or a specific click id present on the session"},"required":false,"description":"any/none or a specific click id present on the session","name":"click_id","in":"query"},{"schema":{"type":"string","enum":["paid","organic"],"description":"paid = an ad click id or a paid utm_medium (cpc, paid, …) on the session; organic = neither"},"required":false,"description":"paid = an ad click id or a paid utm_medium (cpc, paid, …) on the session; organic = neither","name":"traffic","in":"query"},{"schema":{"type":"string","enum":["new","memory","storage","hash"]},"required":false,"name":"stitch","in":"query"},{"schema":{"type":"string","enum":["0","1","true","false"]},"required":false,"name":"consent","in":"query"},{"schema":{"type":"string","enum":["0","1","true","false"]},"required":false,"name":"include_test","in":"query"},{"schema":{"type":"string","pattern":"^-?\\d{1,9}$"},"required":false,"name":"min_relevance","in":"query"},{"schema":{"type":"string","pattern":"^-?\\d{1,9}$"},"required":false,"name":"max_relevance","in":"query"},{"schema":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,19}$","description":"Tier key, e.g. hot"},"required":false,"description":"Tier key, e.g. hot","name":"relevance_tier","in":"query"},{"schema":{"type":"string","enum":["google_ads","meta_ads","linkedin_ads","tiktok_ads"]},"required":false,"name":"ad_platform","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"ad_account_id","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"ad_campaign_id","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"ad_adset_id","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"ad_id","in":"query"},{"schema":{"type":"string","enum":["matched","unmatched"],"description":"Sessions with/without an ad-entity match"},"required":false,"description":"Sessions with/without an ad-entity match","name":"ad_match","in":"query"},{"schema":{"type":"string","pattern":"^\\d{1,6}$"},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"Section reach per page","content":{"application/json":{"schema":{"type":"object","properties":{"filter":{"$ref":"#/components/schemas/FilterEcho"},"rows":{"type":"array","items":{"$ref":"#/components/schemas/SectionRow"}}},"required":["filter","rows"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/projects/{project}/analytics/engagement":{"get":{"operationId":"analytics.engagement","summary":"Engaged-time distribution per pageview or session","tags":["Analytics"],"security":[{"SecretKey":["analytics:read"]},{"UserSession":["analytics:read"]}],"x-required-scopes":["analytics:read"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":81,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)"},"required":true,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)","name":"project","in":"path"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Start day YYYY-MM-DD (project time zone, inclusive). Wins over preset."},"required":false,"description":"Start day YYYY-MM-DD (project time zone, inclusive). Wins over preset.","name":"from","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"End day YYYY-MM-DD (inclusive). Default today."},"required":false,"description":"End day YYYY-MM-DD (inclusive). Default today.","name":"to","in":"query"},{"schema":{"type":"string","enum":["today","yesterday","7d","14d","30d","90d","365d","this_month","last_month","all"],"description":"Date range when from/to are absent. Default 30d; all = last 731 days."},"required":false,"description":"Date range when from/to are absent. Default 30d; all = last 731 days.","name":"preset","in":"query"},{"schema":{"type":"string","pattern":"^\\/[A-Za-z0-9/._~:-]{0,199}$","description":"Canonical page path, e.g. /pricing"},"required":false,"description":"Canonical page path, e.g. /pricing","name":"page","in":"query"},{"schema":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,39}$","description":"Page group key from the project config"},"required":false,"description":"Page group key from the project config","name":"page_group","in":"query"},{"schema":{"type":"string","enum":["any","entry","exit"],"description":"Session metrics: any = a pageview on page/page_group (default), entry = entered there, exit = left there"},"required":false,"description":"Session metrics: any = a pageview on page/page_group (default), entry = entered there, exit = left there","name":"page_mode","in":"query"},{"schema":{"type":"string","enum":["google_ads","google_organic","bing","search_other","meta","linkedin","tiktok","social_other","email","ai_assistant","referral","direct","other"]},"required":false,"name":"channel","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_source","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_medium","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_campaign","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_content","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_term","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_id","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200,"description":"Entry referrer host, e.g. www.google.com"},"required":false,"description":"Entry referrer host, e.g. www.google.com","name":"ref_host","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200,"description":"Page variant of the entry pageview"},"required":false,"description":"Page variant of the entry pageview","name":"variant","in":"query"},{"schema":{"type":"string","enum":["mobile","tablet","desktop","unknown"]},"required":false,"name":"device","in":"query"},{"schema":{"type":"string","enum":["chrome","safari","firefox","edge","samsung","opera","other"]},"required":false,"name":"browser","in":"query"},{"schema":{"type":"string","enum":["windows","macos","ios","android","linux","chromeos","other"]},"required":false,"name":"os","in":"query"},{"schema":{"type":"string","pattern":"^[A-Z]{2}$","description":"ISO country code, uppercase"},"required":false,"description":"ISO country code, uppercase","name":"country","in":"query"},{"schema":{"type":"string","pattern":"^[a-z]{2}$"},"required":false,"name":"lang","in":"query"},{"schema":{"type":"string","enum":["xs","sm","md","lg","xl"]},"required":false,"name":"screen","in":"query"},{"schema":{"type":"string","enum":["0","1","true","false"]},"required":false,"name":"converted","in":"query"},{"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"required":false,"name":"has","in":"query"},{"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"required":false,"name":"goal","in":"query"},{"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"required":false,"name":"event","in":"query"},{"schema":{"type":"string","enum":["any","none","gclid","gbraid","wbraid","fbclid","li_fat_id","ttclid","msclkid"],"description":"any/none or a specific click id present on the session"},"required":false,"description":"any/none or a specific click id present on the session","name":"click_id","in":"query"},{"schema":{"type":"string","enum":["paid","organic"],"description":"paid = an ad click id or a paid utm_medium (cpc, paid, …) on the session; organic = neither"},"required":false,"description":"paid = an ad click id or a paid utm_medium (cpc, paid, …) on the session; organic = neither","name":"traffic","in":"query"},{"schema":{"type":"string","enum":["new","memory","storage","hash"]},"required":false,"name":"stitch","in":"query"},{"schema":{"type":"string","enum":["0","1","true","false"]},"required":false,"name":"consent","in":"query"},{"schema":{"type":"string","enum":["0","1","true","false"]},"required":false,"name":"include_test","in":"query"},{"schema":{"type":"string","pattern":"^-?\\d{1,9}$"},"required":false,"name":"min_relevance","in":"query"},{"schema":{"type":"string","pattern":"^-?\\d{1,9}$"},"required":false,"name":"max_relevance","in":"query"},{"schema":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,19}$","description":"Tier key, e.g. hot"},"required":false,"description":"Tier key, e.g. hot","name":"relevance_tier","in":"query"},{"schema":{"type":"string","enum":["google_ads","meta_ads","linkedin_ads","tiktok_ads"]},"required":false,"name":"ad_platform","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"ad_account_id","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"ad_campaign_id","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"ad_adset_id","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"ad_id","in":"query"},{"schema":{"type":"string","enum":["matched","unmatched"],"description":"Sessions with/without an ad-entity match"},"required":false,"description":"Sessions with/without an ad-entity match","name":"ad_match","in":"query"},{"schema":{"type":"string","enum":["pageview","session"]},"required":false,"name":"level","in":"query"}],"responses":{"200":{"description":"Engaged-time distribution per pageview or session","content":{"application/json":{"schema":{"type":"object","properties":{"filter":{"$ref":"#/components/schemas/FilterEcho"},"level":{"type":"string","enum":["pageview","session"]},"buckets":{"type":"array","items":{"$ref":"#/components/schemas/DistributionBucket"}}},"required":["filter","level","buckets"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/projects/{project}/analytics/clicks":{"get":{"operationId":"analytics.clicks","summary":"Top clicks by label/kind/tag/href/section","tags":["Analytics"],"security":[{"SecretKey":["analytics:read"]},{"UserSession":["analytics:read"]}],"x-required-scopes":["analytics:read"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":81,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)"},"required":true,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)","name":"project","in":"path"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Start day YYYY-MM-DD (project time zone, inclusive). Wins over preset."},"required":false,"description":"Start day YYYY-MM-DD (project time zone, inclusive). Wins over preset.","name":"from","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"End day YYYY-MM-DD (inclusive). Default today."},"required":false,"description":"End day YYYY-MM-DD (inclusive). Default today.","name":"to","in":"query"},{"schema":{"type":"string","enum":["today","yesterday","7d","14d","30d","90d","365d","this_month","last_month","all"],"description":"Date range when from/to are absent. Default 30d; all = last 731 days."},"required":false,"description":"Date range when from/to are absent. Default 30d; all = last 731 days.","name":"preset","in":"query"},{"schema":{"type":"string","pattern":"^\\/[A-Za-z0-9/._~:-]{0,199}$","description":"Canonical page path, e.g. /pricing"},"required":false,"description":"Canonical page path, e.g. /pricing","name":"page","in":"query"},{"schema":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,39}$","description":"Page group key from the project config"},"required":false,"description":"Page group key from the project config","name":"page_group","in":"query"},{"schema":{"type":"string","enum":["any","entry","exit"],"description":"Session metrics: any = a pageview on page/page_group (default), entry = entered there, exit = left there"},"required":false,"description":"Session metrics: any = a pageview on page/page_group (default), entry = entered there, exit = left there","name":"page_mode","in":"query"},{"schema":{"type":"string","enum":["google_ads","google_organic","bing","search_other","meta","linkedin","tiktok","social_other","email","ai_assistant","referral","direct","other"]},"required":false,"name":"channel","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_source","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_medium","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_campaign","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_content","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_term","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_id","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200,"description":"Entry referrer host, e.g. www.google.com"},"required":false,"description":"Entry referrer host, e.g. www.google.com","name":"ref_host","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200,"description":"Page variant of the entry pageview"},"required":false,"description":"Page variant of the entry pageview","name":"variant","in":"query"},{"schema":{"type":"string","enum":["mobile","tablet","desktop","unknown"]},"required":false,"name":"device","in":"query"},{"schema":{"type":"string","enum":["chrome","safari","firefox","edge","samsung","opera","other"]},"required":false,"name":"browser","in":"query"},{"schema":{"type":"string","enum":["windows","macos","ios","android","linux","chromeos","other"]},"required":false,"name":"os","in":"query"},{"schema":{"type":"string","pattern":"^[A-Z]{2}$","description":"ISO country code, uppercase"},"required":false,"description":"ISO country code, uppercase","name":"country","in":"query"},{"schema":{"type":"string","pattern":"^[a-z]{2}$"},"required":false,"name":"lang","in":"query"},{"schema":{"type":"string","enum":["xs","sm","md","lg","xl"]},"required":false,"name":"screen","in":"query"},{"schema":{"type":"string","enum":["0","1","true","false"]},"required":false,"name":"converted","in":"query"},{"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"required":false,"name":"has","in":"query"},{"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"required":false,"name":"goal","in":"query"},{"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"required":false,"name":"event","in":"query"},{"schema":{"type":"string","enum":["any","none","gclid","gbraid","wbraid","fbclid","li_fat_id","ttclid","msclkid"],"description":"any/none or a specific click id present on the session"},"required":false,"description":"any/none or a specific click id present on the session","name":"click_id","in":"query"},{"schema":{"type":"string","enum":["paid","organic"],"description":"paid = an ad click id or a paid utm_medium (cpc, paid, …) on the session; organic = neither"},"required":false,"description":"paid = an ad click id or a paid utm_medium (cpc, paid, …) on the session; organic = neither","name":"traffic","in":"query"},{"schema":{"type":"string","enum":["new","memory","storage","hash"]},"required":false,"name":"stitch","in":"query"},{"schema":{"type":"string","enum":["0","1","true","false"]},"required":false,"name":"consent","in":"query"},{"schema":{"type":"string","enum":["0","1","true","false"]},"required":false,"name":"include_test","in":"query"},{"schema":{"type":"string","pattern":"^-?\\d{1,9}$"},"required":false,"name":"min_relevance","in":"query"},{"schema":{"type":"string","pattern":"^-?\\d{1,9}$"},"required":false,"name":"max_relevance","in":"query"},{"schema":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,19}$","description":"Tier key, e.g. hot"},"required":false,"description":"Tier key, e.g. hot","name":"relevance_tier","in":"query"},{"schema":{"type":"string","enum":["google_ads","meta_ads","linkedin_ads","tiktok_ads"]},"required":false,"name":"ad_platform","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"ad_account_id","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"ad_campaign_id","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"ad_adset_id","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"ad_id","in":"query"},{"schema":{"type":"string","enum":["matched","unmatched"],"description":"Sessions with/without an ad-entity match"},"required":false,"description":"Sessions with/without an ad-entity match","name":"ad_match","in":"query"},{"schema":{"type":"string","pattern":"^\\d{1,6}$"},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"Top clicks by label/kind/tag/href/section","content":{"application/json":{"schema":{"type":"object","properties":{"filter":{"$ref":"#/components/schemas/FilterEcho"},"rows":{"type":"array","items":{"$ref":"#/components/schemas/ClickRow"}}},"required":["filter","rows"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/projects/{project}/analytics/videos":{"get":{"operationId":"analytics.videos","summary":"Video plays, start rate, watched time, coverage, completion, retention","tags":["Analytics"],"security":[{"SecretKey":["analytics:read"]},{"UserSession":["analytics:read"]}],"x-required-scopes":["analytics:read"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":81,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)"},"required":true,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)","name":"project","in":"path"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Start day YYYY-MM-DD (project time zone, inclusive). Wins over preset."},"required":false,"description":"Start day YYYY-MM-DD (project time zone, inclusive). Wins over preset.","name":"from","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"End day YYYY-MM-DD (inclusive). Default today."},"required":false,"description":"End day YYYY-MM-DD (inclusive). Default today.","name":"to","in":"query"},{"schema":{"type":"string","enum":["today","yesterday","7d","14d","30d","90d","365d","this_month","last_month","all"],"description":"Date range when from/to are absent. Default 30d; all = last 731 days."},"required":false,"description":"Date range when from/to are absent. Default 30d; all = last 731 days.","name":"preset","in":"query"},{"schema":{"type":"string","pattern":"^\\/[A-Za-z0-9/._~:-]{0,199}$","description":"Canonical page path, e.g. /pricing"},"required":false,"description":"Canonical page path, e.g. /pricing","name":"page","in":"query"},{"schema":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,39}$","description":"Page group key from the project config"},"required":false,"description":"Page group key from the project config","name":"page_group","in":"query"},{"schema":{"type":"string","enum":["any","entry","exit"],"description":"Session metrics: any = a pageview on page/page_group (default), entry = entered there, exit = left there"},"required":false,"description":"Session metrics: any = a pageview on page/page_group (default), entry = entered there, exit = left there","name":"page_mode","in":"query"},{"schema":{"type":"string","enum":["google_ads","google_organic","bing","search_other","meta","linkedin","tiktok","social_other","email","ai_assistant","referral","direct","other"]},"required":false,"name":"channel","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_source","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_medium","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_campaign","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_content","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_term","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_id","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200,"description":"Entry referrer host, e.g. www.google.com"},"required":false,"description":"Entry referrer host, e.g. www.google.com","name":"ref_host","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200,"description":"Page variant of the entry pageview"},"required":false,"description":"Page variant of the entry pageview","name":"variant","in":"query"},{"schema":{"type":"string","enum":["mobile","tablet","desktop","unknown"]},"required":false,"name":"device","in":"query"},{"schema":{"type":"string","enum":["chrome","safari","firefox","edge","samsung","opera","other"]},"required":false,"name":"browser","in":"query"},{"schema":{"type":"string","enum":["windows","macos","ios","android","linux","chromeos","other"]},"required":false,"name":"os","in":"query"},{"schema":{"type":"string","pattern":"^[A-Z]{2}$","description":"ISO country code, uppercase"},"required":false,"description":"ISO country code, uppercase","name":"country","in":"query"},{"schema":{"type":"string","pattern":"^[a-z]{2}$"},"required":false,"name":"lang","in":"query"},{"schema":{"type":"string","enum":["xs","sm","md","lg","xl"]},"required":false,"name":"screen","in":"query"},{"schema":{"type":"string","enum":["0","1","true","false"]},"required":false,"name":"converted","in":"query"},{"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"required":false,"name":"has","in":"query"},{"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"required":false,"name":"goal","in":"query"},{"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"required":false,"name":"event","in":"query"},{"schema":{"type":"string","enum":["any","none","gclid","gbraid","wbraid","fbclid","li_fat_id","ttclid","msclkid"],"description":"any/none or a specific click id present on the session"},"required":false,"description":"any/none or a specific click id present on the session","name":"click_id","in":"query"},{"schema":{"type":"string","enum":["paid","organic"],"description":"paid = an ad click id or a paid utm_medium (cpc, paid, …) on the session; organic = neither"},"required":false,"description":"paid = an ad click id or a paid utm_medium (cpc, paid, …) on the session; organic = neither","name":"traffic","in":"query"},{"schema":{"type":"string","enum":["new","memory","storage","hash"]},"required":false,"name":"stitch","in":"query"},{"schema":{"type":"string","enum":["0","1","true","false"]},"required":false,"name":"consent","in":"query"},{"schema":{"type":"string","enum":["0","1","true","false"]},"required":false,"name":"include_test","in":"query"},{"schema":{"type":"string","pattern":"^-?\\d{1,9}$"},"required":false,"name":"min_relevance","in":"query"},{"schema":{"type":"string","pattern":"^-?\\d{1,9}$"},"required":false,"name":"max_relevance","in":"query"},{"schema":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,19}$","description":"Tier key, e.g. hot"},"required":false,"description":"Tier key, e.g. hot","name":"relevance_tier","in":"query"},{"schema":{"type":"string","enum":["google_ads","meta_ads","linkedin_ads","tiktok_ads"]},"required":false,"name":"ad_platform","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"ad_account_id","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"ad_campaign_id","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"ad_adset_id","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"ad_id","in":"query"},{"schema":{"type":"string","enum":["matched","unmatched"],"description":"Sessions with/without an ad-entity match"},"required":false,"description":"Sessions with/without an ad-entity match","name":"ad_match","in":"query"}],"responses":{"200":{"description":"Video plays, start rate, watched time, coverage, completion, retention","content":{"application/json":{"schema":{"type":"object","properties":{"filter":{"$ref":"#/components/schemas/FilterEcho"},"rows":{"type":"array","items":{"$ref":"#/components/schemas/VideoStatsRow"}}},"required":["filter","rows"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/projects/{project}/analytics/videos/{video}/retention":{"get":{"operationId":"analytics.videoRetention","summary":"Downsampled retention curve of one video, overall and per format","tags":["Analytics"],"security":[{"SecretKey":["analytics:read"]},{"UserSession":["analytics:read"]}],"x-required-scopes":["analytics:read"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":81,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)"},"required":true,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)","name":"project","in":"path"},{"schema":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,40}$"},"required":true,"name":"video","in":"path"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Start day YYYY-MM-DD (project time zone, inclusive). Wins over preset."},"required":false,"description":"Start day YYYY-MM-DD (project time zone, inclusive). Wins over preset.","name":"from","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"End day YYYY-MM-DD (inclusive). Default today."},"required":false,"description":"End day YYYY-MM-DD (inclusive). Default today.","name":"to","in":"query"},{"schema":{"type":"string","enum":["today","yesterday","7d","14d","30d","90d","365d","this_month","last_month","all"],"description":"Date range when from/to are absent. Default 30d; all = last 731 days."},"required":false,"description":"Date range when from/to are absent. Default 30d; all = last 731 days.","name":"preset","in":"query"},{"schema":{"type":"string","pattern":"^\\/[A-Za-z0-9/._~:-]{0,199}$","description":"Canonical page path, e.g. /pricing"},"required":false,"description":"Canonical page path, e.g. /pricing","name":"page","in":"query"},{"schema":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,39}$","description":"Page group key from the project config"},"required":false,"description":"Page group key from the project config","name":"page_group","in":"query"},{"schema":{"type":"string","enum":["any","entry","exit"],"description":"Session metrics: any = a pageview on page/page_group (default), entry = entered there, exit = left there"},"required":false,"description":"Session metrics: any = a pageview on page/page_group (default), entry = entered there, exit = left there","name":"page_mode","in":"query"},{"schema":{"type":"string","enum":["google_ads","google_organic","bing","search_other","meta","linkedin","tiktok","social_other","email","ai_assistant","referral","direct","other"]},"required":false,"name":"channel","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_source","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_medium","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_campaign","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_content","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_term","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_id","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200,"description":"Entry referrer host, e.g. www.google.com"},"required":false,"description":"Entry referrer host, e.g. www.google.com","name":"ref_host","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200,"description":"Page variant of the entry pageview"},"required":false,"description":"Page variant of the entry pageview","name":"variant","in":"query"},{"schema":{"type":"string","enum":["mobile","tablet","desktop","unknown"]},"required":false,"name":"device","in":"query"},{"schema":{"type":"string","enum":["chrome","safari","firefox","edge","samsung","opera","other"]},"required":false,"name":"browser","in":"query"},{"schema":{"type":"string","enum":["windows","macos","ios","android","linux","chromeos","other"]},"required":false,"name":"os","in":"query"},{"schema":{"type":"string","pattern":"^[A-Z]{2}$","description":"ISO country code, uppercase"},"required":false,"description":"ISO country code, uppercase","name":"country","in":"query"},{"schema":{"type":"string","pattern":"^[a-z]{2}$"},"required":false,"name":"lang","in":"query"},{"schema":{"type":"string","enum":["xs","sm","md","lg","xl"]},"required":false,"name":"screen","in":"query"},{"schema":{"type":"string","enum":["0","1","true","false"]},"required":false,"name":"converted","in":"query"},{"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"required":false,"name":"has","in":"query"},{"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"required":false,"name":"goal","in":"query"},{"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"required":false,"name":"event","in":"query"},{"schema":{"type":"string","enum":["any","none","gclid","gbraid","wbraid","fbclid","li_fat_id","ttclid","msclkid"],"description":"any/none or a specific click id present on the session"},"required":false,"description":"any/none or a specific click id present on the session","name":"click_id","in":"query"},{"schema":{"type":"string","enum":["paid","organic"],"description":"paid = an ad click id or a paid utm_medium (cpc, paid, …) on the session; organic = neither"},"required":false,"description":"paid = an ad click id or a paid utm_medium (cpc, paid, …) on the session; organic = neither","name":"traffic","in":"query"},{"schema":{"type":"string","enum":["new","memory","storage","hash"]},"required":false,"name":"stitch","in":"query"},{"schema":{"type":"string","enum":["0","1","true","false"]},"required":false,"name":"consent","in":"query"},{"schema":{"type":"string","enum":["0","1","true","false"]},"required":false,"name":"include_test","in":"query"},{"schema":{"type":"string","pattern":"^-?\\d{1,9}$"},"required":false,"name":"min_relevance","in":"query"},{"schema":{"type":"string","pattern":"^-?\\d{1,9}$"},"required":false,"name":"max_relevance","in":"query"},{"schema":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,19}$","description":"Tier key, e.g. hot"},"required":false,"description":"Tier key, e.g. hot","name":"relevance_tier","in":"query"},{"schema":{"type":"string","enum":["google_ads","meta_ads","linkedin_ads","tiktok_ads"]},"required":false,"name":"ad_platform","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"ad_account_id","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"ad_campaign_id","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"ad_adset_id","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"ad_id","in":"query"},{"schema":{"type":"string","enum":["matched","unmatched"],"description":"Sessions with/without an ad-entity match"},"required":false,"description":"Sessions with/without an ad-entity match","name":"ad_match","in":"query"},{"schema":{"type":"string","pattern":"^\\d{1,6}$"},"required":false,"name":"step","in":"query"}],"responses":{"200":{"description":"Downsampled retention curve of one video, overall and per format","content":{"application/json":{"schema":{"type":"object","properties":{"video":{"type":["string","null"]},"step":{"type":"integer"},"plays":{"type":"integer"},"overall":{"type":"array","items":{"type":"object","properties":{"pct":{"type":"integer"},"share":{"type":"number"}},"required":["pct","share"]}},"byFormat":{"type":"array","items":{"type":"object","properties":{"format":{"type":"string","enum":["landscape","portrait","unknown"]},"plays":{"type":"integer"},"points":{"type":"array","items":{"type":"object","properties":{"pct":{"type":"integer"},"share":{"type":"number"}},"required":["pct","share"]}}},"required":["format","plays","points"]}},"availableVideos":{"type":"array","items":{"type":"object","properties":{"video":{"type":"string"},"plays":{"type":"integer"}},"required":["video","plays"]}},"filter":{"$ref":"#/components/schemas/FilterEcho"}},"required":["video","step","plays","overall","byFormat","availableVideos","filter"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/projects/{project}/analytics/answers":{"get":{"operationId":"analytics.answers","summary":"Questionnaire (quiz) funnel and option distribution per question","tags":["Analytics"],"security":[{"SecretKey":["analytics:read"]},{"UserSession":["analytics:read"]}],"x-required-scopes":["analytics:read"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":81,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)"},"required":true,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)","name":"project","in":"path"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Start day YYYY-MM-DD (project time zone, inclusive). Wins over preset."},"required":false,"description":"Start day YYYY-MM-DD (project time zone, inclusive). Wins over preset.","name":"from","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"End day YYYY-MM-DD (inclusive). Default today."},"required":false,"description":"End day YYYY-MM-DD (inclusive). Default today.","name":"to","in":"query"},{"schema":{"type":"string","enum":["today","yesterday","7d","14d","30d","90d","365d","this_month","last_month","all"],"description":"Date range when from/to are absent. Default 30d; all = last 731 days."},"required":false,"description":"Date range when from/to are absent. Default 30d; all = last 731 days.","name":"preset","in":"query"},{"schema":{"type":"string","pattern":"^\\/[A-Za-z0-9/._~:-]{0,199}$","description":"Canonical page path, e.g. /pricing"},"required":false,"description":"Canonical page path, e.g. /pricing","name":"page","in":"query"},{"schema":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,39}$","description":"Page group key from the project config"},"required":false,"description":"Page group key from the project config","name":"page_group","in":"query"},{"schema":{"type":"string","enum":["any","entry","exit"],"description":"Session metrics: any = a pageview on page/page_group (default), entry = entered there, exit = left there"},"required":false,"description":"Session metrics: any = a pageview on page/page_group (default), entry = entered there, exit = left there","name":"page_mode","in":"query"},{"schema":{"type":"string","enum":["google_ads","google_organic","bing","search_other","meta","linkedin","tiktok","social_other","email","ai_assistant","referral","direct","other"]},"required":false,"name":"channel","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_source","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_medium","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_campaign","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_content","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_term","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_id","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200,"description":"Entry referrer host, e.g. www.google.com"},"required":false,"description":"Entry referrer host, e.g. www.google.com","name":"ref_host","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200,"description":"Page variant of the entry pageview"},"required":false,"description":"Page variant of the entry pageview","name":"variant","in":"query"},{"schema":{"type":"string","enum":["mobile","tablet","desktop","unknown"]},"required":false,"name":"device","in":"query"},{"schema":{"type":"string","enum":["chrome","safari","firefox","edge","samsung","opera","other"]},"required":false,"name":"browser","in":"query"},{"schema":{"type":"string","enum":["windows","macos","ios","android","linux","chromeos","other"]},"required":false,"name":"os","in":"query"},{"schema":{"type":"string","pattern":"^[A-Z]{2}$","description":"ISO country code, uppercase"},"required":false,"description":"ISO country code, uppercase","name":"country","in":"query"},{"schema":{"type":"string","pattern":"^[a-z]{2}$"},"required":false,"name":"lang","in":"query"},{"schema":{"type":"string","enum":["xs","sm","md","lg","xl"]},"required":false,"name":"screen","in":"query"},{"schema":{"type":"string","enum":["0","1","true","false"]},"required":false,"name":"converted","in":"query"},{"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"required":false,"name":"has","in":"query"},{"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"required":false,"name":"goal","in":"query"},{"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"required":false,"name":"event","in":"query"},{"schema":{"type":"string","enum":["any","none","gclid","gbraid","wbraid","fbclid","li_fat_id","ttclid","msclkid"],"description":"any/none or a specific click id present on the session"},"required":false,"description":"any/none or a specific click id present on the session","name":"click_id","in":"query"},{"schema":{"type":"string","enum":["paid","organic"],"description":"paid = an ad click id or a paid utm_medium (cpc, paid, …) on the session; organic = neither"},"required":false,"description":"paid = an ad click id or a paid utm_medium (cpc, paid, …) on the session; organic = neither","name":"traffic","in":"query"},{"schema":{"type":"string","enum":["new","memory","storage","hash"]},"required":false,"name":"stitch","in":"query"},{"schema":{"type":"string","enum":["0","1","true","false"]},"required":false,"name":"consent","in":"query"},{"schema":{"type":"string","enum":["0","1","true","false"]},"required":false,"name":"include_test","in":"query"},{"schema":{"type":"string","pattern":"^-?\\d{1,9}$"},"required":false,"name":"min_relevance","in":"query"},{"schema":{"type":"string","pattern":"^-?\\d{1,9}$"},"required":false,"name":"max_relevance","in":"query"},{"schema":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,19}$","description":"Tier key, e.g. hot"},"required":false,"description":"Tier key, e.g. hot","name":"relevance_tier","in":"query"},{"schema":{"type":"string","enum":["google_ads","meta_ads","linkedin_ads","tiktok_ads"]},"required":false,"name":"ad_platform","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"ad_account_id","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"ad_campaign_id","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"ad_adset_id","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"ad_id","in":"query"},{"schema":{"type":"string","enum":["matched","unmatched"],"description":"Sessions with/without an ad-entity match"},"required":false,"description":"Sessions with/without an ad-entity match","name":"ad_match","in":"query"},{"schema":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,40}$"},"required":false,"name":"questionnaire","in":"query"}],"responses":{"200":{"description":"Questionnaire (quiz) funnel and option distribution per question","content":{"application/json":{"schema":{"type":"object","properties":{"filter":{"$ref":"#/components/schemas/FilterEcho"},"rows":{"type":"array","items":{"$ref":"#/components/schemas/AnswerStatsRow"}}},"required":["filter","rows"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/projects/{project}/analytics/flow":{"get":{"operationId":"analytics.flow","summary":"Entry pages, exit pages and page transitions","tags":["Analytics"],"security":[{"SecretKey":["analytics:read"]},{"UserSession":["analytics:read"]}],"x-required-scopes":["analytics:read"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":81,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)"},"required":true,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)","name":"project","in":"path"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Start day YYYY-MM-DD (project time zone, inclusive). Wins over preset."},"required":false,"description":"Start day YYYY-MM-DD (project time zone, inclusive). Wins over preset.","name":"from","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"End day YYYY-MM-DD (inclusive). Default today."},"required":false,"description":"End day YYYY-MM-DD (inclusive). Default today.","name":"to","in":"query"},{"schema":{"type":"string","enum":["today","yesterday","7d","14d","30d","90d","365d","this_month","last_month","all"],"description":"Date range when from/to are absent. Default 30d; all = last 731 days."},"required":false,"description":"Date range when from/to are absent. Default 30d; all = last 731 days.","name":"preset","in":"query"},{"schema":{"type":"string","pattern":"^\\/[A-Za-z0-9/._~:-]{0,199}$","description":"Canonical page path, e.g. /pricing"},"required":false,"description":"Canonical page path, e.g. /pricing","name":"page","in":"query"},{"schema":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,39}$","description":"Page group key from the project config"},"required":false,"description":"Page group key from the project config","name":"page_group","in":"query"},{"schema":{"type":"string","enum":["any","entry","exit"],"description":"Session metrics: any = a pageview on page/page_group (default), entry = entered there, exit = left there"},"required":false,"description":"Session metrics: any = a pageview on page/page_group (default), entry = entered there, exit = left there","name":"page_mode","in":"query"},{"schema":{"type":"string","enum":["google_ads","google_organic","bing","search_other","meta","linkedin","tiktok","social_other","email","ai_assistant","referral","direct","other"]},"required":false,"name":"channel","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_source","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_medium","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_campaign","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_content","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_term","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_id","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200,"description":"Entry referrer host, e.g. www.google.com"},"required":false,"description":"Entry referrer host, e.g. www.google.com","name":"ref_host","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200,"description":"Page variant of the entry pageview"},"required":false,"description":"Page variant of the entry pageview","name":"variant","in":"query"},{"schema":{"type":"string","enum":["mobile","tablet","desktop","unknown"]},"required":false,"name":"device","in":"query"},{"schema":{"type":"string","enum":["chrome","safari","firefox","edge","samsung","opera","other"]},"required":false,"name":"browser","in":"query"},{"schema":{"type":"string","enum":["windows","macos","ios","android","linux","chromeos","other"]},"required":false,"name":"os","in":"query"},{"schema":{"type":"string","pattern":"^[A-Z]{2}$","description":"ISO country code, uppercase"},"required":false,"description":"ISO country code, uppercase","name":"country","in":"query"},{"schema":{"type":"string","pattern":"^[a-z]{2}$"},"required":false,"name":"lang","in":"query"},{"schema":{"type":"string","enum":["xs","sm","md","lg","xl"]},"required":false,"name":"screen","in":"query"},{"schema":{"type":"string","enum":["0","1","true","false"]},"required":false,"name":"converted","in":"query"},{"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"required":false,"name":"has","in":"query"},{"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"required":false,"name":"goal","in":"query"},{"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"required":false,"name":"event","in":"query"},{"schema":{"type":"string","enum":["any","none","gclid","gbraid","wbraid","fbclid","li_fat_id","ttclid","msclkid"],"description":"any/none or a specific click id present on the session"},"required":false,"description":"any/none or a specific click id present on the session","name":"click_id","in":"query"},{"schema":{"type":"string","enum":["paid","organic"],"description":"paid = an ad click id or a paid utm_medium (cpc, paid, …) on the session; organic = neither"},"required":false,"description":"paid = an ad click id or a paid utm_medium (cpc, paid, …) on the session; organic = neither","name":"traffic","in":"query"},{"schema":{"type":"string","enum":["new","memory","storage","hash"]},"required":false,"name":"stitch","in":"query"},{"schema":{"type":"string","enum":["0","1","true","false"]},"required":false,"name":"consent","in":"query"},{"schema":{"type":"string","enum":["0","1","true","false"]},"required":false,"name":"include_test","in":"query"},{"schema":{"type":"string","pattern":"^-?\\d{1,9}$"},"required":false,"name":"min_relevance","in":"query"},{"schema":{"type":"string","pattern":"^-?\\d{1,9}$"},"required":false,"name":"max_relevance","in":"query"},{"schema":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,19}$","description":"Tier key, e.g. hot"},"required":false,"description":"Tier key, e.g. hot","name":"relevance_tier","in":"query"},{"schema":{"type":"string","enum":["google_ads","meta_ads","linkedin_ads","tiktok_ads"]},"required":false,"name":"ad_platform","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"ad_account_id","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"ad_campaign_id","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"ad_adset_id","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"ad_id","in":"query"},{"schema":{"type":"string","enum":["matched","unmatched"],"description":"Sessions with/without an ad-entity match"},"required":false,"description":"Sessions with/without an ad-entity match","name":"ad_match","in":"query"},{"schema":{"type":"string","pattern":"^\\d{1,6}$"},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"Entry pages, exit pages and page transitions","content":{"application/json":{"schema":{"type":"object","properties":{"entries":{"type":"array","items":{"type":"object","properties":{"page":{"type":"string"},"sessions":{"type":"integer"}},"required":["page","sessions"]}},"exits":{"type":"array","items":{"type":"object","properties":{"page":{"type":"string"},"sessions":{"type":"integer"}},"required":["page","sessions"]}},"transitions":{"type":"array","items":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":["string","null"]},"count":{"type":"integer"}},"required":["from","to","count"]}},"filter":{"$ref":"#/components/schemas/FilterEcho"}},"required":["entries","exits","transitions","filter"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/projects/{project}/analytics/goals":{"get":{"operationId":"analytics.goals","summary":"Goal completions (sessions, rate, value)","tags":["Analytics"],"security":[{"SecretKey":["analytics:read"]},{"UserSession":["analytics:read"]}],"x-required-scopes":["analytics:read"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":81,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)"},"required":true,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)","name":"project","in":"path"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Start day YYYY-MM-DD (project time zone, inclusive). Wins over preset."},"required":false,"description":"Start day YYYY-MM-DD (project time zone, inclusive). Wins over preset.","name":"from","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"End day YYYY-MM-DD (inclusive). Default today."},"required":false,"description":"End day YYYY-MM-DD (inclusive). Default today.","name":"to","in":"query"},{"schema":{"type":"string","enum":["today","yesterday","7d","14d","30d","90d","365d","this_month","last_month","all"],"description":"Date range when from/to are absent. Default 30d; all = last 731 days."},"required":false,"description":"Date range when from/to are absent. Default 30d; all = last 731 days.","name":"preset","in":"query"},{"schema":{"type":"string","pattern":"^\\/[A-Za-z0-9/._~:-]{0,199}$","description":"Canonical page path, e.g. /pricing"},"required":false,"description":"Canonical page path, e.g. /pricing","name":"page","in":"query"},{"schema":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,39}$","description":"Page group key from the project config"},"required":false,"description":"Page group key from the project config","name":"page_group","in":"query"},{"schema":{"type":"string","enum":["any","entry","exit"],"description":"Session metrics: any = a pageview on page/page_group (default), entry = entered there, exit = left there"},"required":false,"description":"Session metrics: any = a pageview on page/page_group (default), entry = entered there, exit = left there","name":"page_mode","in":"query"},{"schema":{"type":"string","enum":["google_ads","google_organic","bing","search_other","meta","linkedin","tiktok","social_other","email","ai_assistant","referral","direct","other"]},"required":false,"name":"channel","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_source","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_medium","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_campaign","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_content","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_term","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_id","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200,"description":"Entry referrer host, e.g. www.google.com"},"required":false,"description":"Entry referrer host, e.g. www.google.com","name":"ref_host","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200,"description":"Page variant of the entry pageview"},"required":false,"description":"Page variant of the entry pageview","name":"variant","in":"query"},{"schema":{"type":"string","enum":["mobile","tablet","desktop","unknown"]},"required":false,"name":"device","in":"query"},{"schema":{"type":"string","enum":["chrome","safari","firefox","edge","samsung","opera","other"]},"required":false,"name":"browser","in":"query"},{"schema":{"type":"string","enum":["windows","macos","ios","android","linux","chromeos","other"]},"required":false,"name":"os","in":"query"},{"schema":{"type":"string","pattern":"^[A-Z]{2}$","description":"ISO country code, uppercase"},"required":false,"description":"ISO country code, uppercase","name":"country","in":"query"},{"schema":{"type":"string","pattern":"^[a-z]{2}$"},"required":false,"name":"lang","in":"query"},{"schema":{"type":"string","enum":["xs","sm","md","lg","xl"]},"required":false,"name":"screen","in":"query"},{"schema":{"type":"string","enum":["0","1","true","false"]},"required":false,"name":"converted","in":"query"},{"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"required":false,"name":"has","in":"query"},{"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"required":false,"name":"goal","in":"query"},{"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"required":false,"name":"event","in":"query"},{"schema":{"type":"string","enum":["any","none","gclid","gbraid","wbraid","fbclid","li_fat_id","ttclid","msclkid"],"description":"any/none or a specific click id present on the session"},"required":false,"description":"any/none or a specific click id present on the session","name":"click_id","in":"query"},{"schema":{"type":"string","enum":["paid","organic"],"description":"paid = an ad click id or a paid utm_medium (cpc, paid, …) on the session; organic = neither"},"required":false,"description":"paid = an ad click id or a paid utm_medium (cpc, paid, …) on the session; organic = neither","name":"traffic","in":"query"},{"schema":{"type":"string","enum":["new","memory","storage","hash"]},"required":false,"name":"stitch","in":"query"},{"schema":{"type":"string","enum":["0","1","true","false"]},"required":false,"name":"consent","in":"query"},{"schema":{"type":"string","enum":["0","1","true","false"]},"required":false,"name":"include_test","in":"query"},{"schema":{"type":"string","pattern":"^-?\\d{1,9}$"},"required":false,"name":"min_relevance","in":"query"},{"schema":{"type":"string","pattern":"^-?\\d{1,9}$"},"required":false,"name":"max_relevance","in":"query"},{"schema":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,19}$","description":"Tier key, e.g. hot"},"required":false,"description":"Tier key, e.g. hot","name":"relevance_tier","in":"query"},{"schema":{"type":"string","enum":["google_ads","meta_ads","linkedin_ads","tiktok_ads"]},"required":false,"name":"ad_platform","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"ad_account_id","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"ad_campaign_id","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"ad_adset_id","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"ad_id","in":"query"},{"schema":{"type":"string","enum":["matched","unmatched"],"description":"Sessions with/without an ad-entity match"},"required":false,"description":"Sessions with/without an ad-entity match","name":"ad_match","in":"query"}],"responses":{"200":{"description":"Goal completions (sessions, rate, value)","content":{"application/json":{"schema":{"type":"object","properties":{"filter":{"$ref":"#/components/schemas/FilterEcho"},"rows":{"type":"array","items":{"$ref":"#/components/schemas/GoalStatsRow"}}},"required":["filter","rows"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/projects/{project}/analytics/filter-options":{"get":{"operationId":"analytics.filterOptions","summary":"Top values per filter dimension for the date range","tags":["Analytics"],"security":[{"SecretKey":["analytics:read"]},{"UserSession":["analytics:read"]}],"x-required-scopes":["analytics:read"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":81,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)"},"required":true,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)","name":"project","in":"path"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Start day YYYY-MM-DD (project time zone, inclusive). Wins over preset."},"required":false,"description":"Start day YYYY-MM-DD (project time zone, inclusive). Wins over preset.","name":"from","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"End day YYYY-MM-DD (inclusive). Default today."},"required":false,"description":"End day YYYY-MM-DD (inclusive). Default today.","name":"to","in":"query"},{"schema":{"type":"string","enum":["today","yesterday","7d","14d","30d","90d","365d","this_month","last_month","all"],"description":"Date range when from/to are absent. Default 30d; all = last 731 days."},"required":false,"description":"Date range when from/to are absent. Default 30d; all = last 731 days.","name":"preset","in":"query"},{"schema":{"type":"string","pattern":"^\\/[A-Za-z0-9/._~:-]{0,199}$","description":"Canonical page path, e.g. /pricing"},"required":false,"description":"Canonical page path, e.g. /pricing","name":"page","in":"query"},{"schema":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,39}$","description":"Page group key from the project config"},"required":false,"description":"Page group key from the project config","name":"page_group","in":"query"},{"schema":{"type":"string","enum":["any","entry","exit"],"description":"Session metrics: any = a pageview on page/page_group (default), entry = entered there, exit = left there"},"required":false,"description":"Session metrics: any = a pageview on page/page_group (default), entry = entered there, exit = left there","name":"page_mode","in":"query"},{"schema":{"type":"string","enum":["google_ads","google_organic","bing","search_other","meta","linkedin","tiktok","social_other","email","ai_assistant","referral","direct","other"]},"required":false,"name":"channel","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_source","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_medium","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_campaign","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_content","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_term","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_id","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200,"description":"Entry referrer host, e.g. www.google.com"},"required":false,"description":"Entry referrer host, e.g. www.google.com","name":"ref_host","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200,"description":"Page variant of the entry pageview"},"required":false,"description":"Page variant of the entry pageview","name":"variant","in":"query"},{"schema":{"type":"string","enum":["mobile","tablet","desktop","unknown"]},"required":false,"name":"device","in":"query"},{"schema":{"type":"string","enum":["chrome","safari","firefox","edge","samsung","opera","other"]},"required":false,"name":"browser","in":"query"},{"schema":{"type":"string","enum":["windows","macos","ios","android","linux","chromeos","other"]},"required":false,"name":"os","in":"query"},{"schema":{"type":"string","pattern":"^[A-Z]{2}$","description":"ISO country code, uppercase"},"required":false,"description":"ISO country code, uppercase","name":"country","in":"query"},{"schema":{"type":"string","pattern":"^[a-z]{2}$"},"required":false,"name":"lang","in":"query"},{"schema":{"type":"string","enum":["xs","sm","md","lg","xl"]},"required":false,"name":"screen","in":"query"},{"schema":{"type":"string","enum":["0","1","true","false"]},"required":false,"name":"converted","in":"query"},{"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"required":false,"name":"has","in":"query"},{"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"required":false,"name":"goal","in":"query"},{"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"required":false,"name":"event","in":"query"},{"schema":{"type":"string","enum":["any","none","gclid","gbraid","wbraid","fbclid","li_fat_id","ttclid","msclkid"],"description":"any/none or a specific click id present on the session"},"required":false,"description":"any/none or a specific click id present on the session","name":"click_id","in":"query"},{"schema":{"type":"string","enum":["paid","organic"],"description":"paid = an ad click id or a paid utm_medium (cpc, paid, …) on the session; organic = neither"},"required":false,"description":"paid = an ad click id or a paid utm_medium (cpc, paid, …) on the session; organic = neither","name":"traffic","in":"query"},{"schema":{"type":"string","enum":["new","memory","storage","hash"]},"required":false,"name":"stitch","in":"query"},{"schema":{"type":"string","enum":["0","1","true","false"]},"required":false,"name":"consent","in":"query"},{"schema":{"type":"string","enum":["0","1","true","false"]},"required":false,"name":"include_test","in":"query"},{"schema":{"type":"string","pattern":"^-?\\d{1,9}$"},"required":false,"name":"min_relevance","in":"query"},{"schema":{"type":"string","pattern":"^-?\\d{1,9}$"},"required":false,"name":"max_relevance","in":"query"},{"schema":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,19}$","description":"Tier key, e.g. hot"},"required":false,"description":"Tier key, e.g. hot","name":"relevance_tier","in":"query"},{"schema":{"type":"string","enum":["google_ads","meta_ads","linkedin_ads","tiktok_ads"]},"required":false,"name":"ad_platform","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"ad_account_id","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"ad_campaign_id","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"ad_adset_id","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"ad_id","in":"query"},{"schema":{"type":"string","enum":["matched","unmatched"],"description":"Sessions with/without an ad-entity match"},"required":false,"description":"Sessions with/without an ad-entity match","name":"ad_match","in":"query"}],"responses":{"200":{"description":"Top values per filter dimension for the date range","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FilterOptions"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/projects/{project}/analytics/events":{"get":{"operationId":"analytics.events","summary":"Raw events with session context (names, prop containment, prop text search)","tags":["Analytics"],"security":[{"SecretKey":["analytics:read"]},{"UserSession":["analytics:read"]}],"x-required-scopes":["analytics:read"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":81,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)"},"required":true,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)","name":"project","in":"path"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Start day YYYY-MM-DD (project time zone, inclusive). Wins over preset."},"required":false,"description":"Start day YYYY-MM-DD (project time zone, inclusive). Wins over preset.","name":"from","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"End day YYYY-MM-DD (inclusive). Default today."},"required":false,"description":"End day YYYY-MM-DD (inclusive). Default today.","name":"to","in":"query"},{"schema":{"type":"string","enum":["today","yesterday","7d","14d","30d","90d","365d","this_month","last_month","all"],"description":"Date range when from/to are absent. Default 30d; all = last 731 days."},"required":false,"description":"Date range when from/to are absent. Default 30d; all = last 731 days.","name":"preset","in":"query"},{"schema":{"type":"string","pattern":"^\\/[A-Za-z0-9/._~:-]{0,199}$","description":"Canonical page path, e.g. /pricing"},"required":false,"description":"Canonical page path, e.g. /pricing","name":"page","in":"query"},{"schema":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,39}$","description":"Page group key from the project config"},"required":false,"description":"Page group key from the project config","name":"page_group","in":"query"},{"schema":{"type":"string","enum":["any","entry","exit"],"description":"Session metrics: any = a pageview on page/page_group (default), entry = entered there, exit = left there"},"required":false,"description":"Session metrics: any = a pageview on page/page_group (default), entry = entered there, exit = left there","name":"page_mode","in":"query"},{"schema":{"type":"string","enum":["google_ads","google_organic","bing","search_other","meta","linkedin","tiktok","social_other","email","ai_assistant","referral","direct","other"]},"required":false,"name":"channel","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_source","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_medium","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_campaign","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_content","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_term","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_id","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200,"description":"Entry referrer host, e.g. www.google.com"},"required":false,"description":"Entry referrer host, e.g. www.google.com","name":"ref_host","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200,"description":"Page variant of the entry pageview"},"required":false,"description":"Page variant of the entry pageview","name":"variant","in":"query"},{"schema":{"type":"string","enum":["mobile","tablet","desktop","unknown"]},"required":false,"name":"device","in":"query"},{"schema":{"type":"string","enum":["chrome","safari","firefox","edge","samsung","opera","other"]},"required":false,"name":"browser","in":"query"},{"schema":{"type":"string","enum":["windows","macos","ios","android","linux","chromeos","other"]},"required":false,"name":"os","in":"query"},{"schema":{"type":"string","pattern":"^[A-Z]{2}$","description":"ISO country code, uppercase"},"required":false,"description":"ISO country code, uppercase","name":"country","in":"query"},{"schema":{"type":"string","pattern":"^[a-z]{2}$"},"required":false,"name":"lang","in":"query"},{"schema":{"type":"string","enum":["xs","sm","md","lg","xl"]},"required":false,"name":"screen","in":"query"},{"schema":{"type":"string","enum":["0","1","true","false"]},"required":false,"name":"converted","in":"query"},{"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"required":false,"name":"has","in":"query"},{"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"required":false,"name":"goal","in":"query"},{"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"required":false,"name":"event","in":"query"},{"schema":{"type":"string","enum":["any","none","gclid","gbraid","wbraid","fbclid","li_fat_id","ttclid","msclkid"],"description":"any/none or a specific click id present on the session"},"required":false,"description":"any/none or a specific click id present on the session","name":"click_id","in":"query"},{"schema":{"type":"string","enum":["paid","organic"],"description":"paid = an ad click id or a paid utm_medium (cpc, paid, …) on the session; organic = neither"},"required":false,"description":"paid = an ad click id or a paid utm_medium (cpc, paid, …) on the session; organic = neither","name":"traffic","in":"query"},{"schema":{"type":"string","enum":["new","memory","storage","hash"]},"required":false,"name":"stitch","in":"query"},{"schema":{"type":"string","enum":["0","1","true","false"]},"required":false,"name":"consent","in":"query"},{"schema":{"type":"string","enum":["0","1","true","false"]},"required":false,"name":"include_test","in":"query"},{"schema":{"type":"string","pattern":"^-?\\d{1,9}$"},"required":false,"name":"min_relevance","in":"query"},{"schema":{"type":"string","pattern":"^-?\\d{1,9}$"},"required":false,"name":"max_relevance","in":"query"},{"schema":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,19}$","description":"Tier key, e.g. hot"},"required":false,"description":"Tier key, e.g. hot","name":"relevance_tier","in":"query"},{"schema":{"type":"string","enum":["google_ads","meta_ads","linkedin_ads","tiktok_ads"]},"required":false,"name":"ad_platform","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"ad_account_id","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"ad_campaign_id","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"ad_adset_id","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"ad_id","in":"query"},{"schema":{"type":"string","enum":["matched","unmatched"],"description":"Sessions with/without an ad-entity match"},"required":false,"description":"Sessions with/without an ad-entity match","name":"ad_match","in":"query"},{"schema":{"anyOf":[{"type":"string","pattern":"^[a-z][a-z0-9_]{0,39}(?:,[a-z][a-z0-9_]{0,39}){0,19}$"},{"type":"array","items":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,39}$"}}]},"required":false,"name":"names","in":"query"},{"schema":{"type":"string","maxLength":1000},"required":false,"name":"props","in":"query"},{"schema":{"type":"string","maxLength":40},"required":false,"name":"prop_key","in":"query"},{"schema":{"type":"string","maxLength":100},"required":false,"name":"prop_text","in":"query"},{"schema":{"type":"string","maxLength":36},"required":false,"name":"session_id","in":"query"},{"schema":{"type":"string","enum":["asc","desc"]},"required":false,"name":"order","in":"query"},{"schema":{"type":"string","pattern":"^\\d{1,6}$"},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"Raw events with session context (names, prop containment, prop text search)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventsQueryResult"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/projects/{project}/events/live":{"get":{"operationId":"analytics.liveEvents","summary":"Events received since a cursor (long-poll up to ?wait=20 seconds, ≤ 200 rows)","tags":["Events"],"security":[{"SecretKey":["analytics:read"]},{"UserSession":["analytics:read"]}],"x-required-scopes":["analytics:read"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":81,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)"},"required":true,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)","name":"project","in":"path"},{"schema":{"type":"string","maxLength":200},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"string","pattern":"^\\d{1,6}$"},"required":false,"name":"wait","in":"query"},{"schema":{"anyOf":[{"type":"string","pattern":"^[a-z][a-z0-9_]{0,39}(?:,[a-z][a-z0-9_]{0,39}){0,19}$"},{"type":"array","items":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,39}$"}}]},"required":false,"name":"names","in":"query"},{"schema":{"type":"string","pattern":"^\\d{1,6}$"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","enum":["0","1","true","false"]},"required":false,"name":"include_test","in":"query"}],"responses":{"200":{"description":"Events received since a cursor (long-poll up to ?wait=20 seconds, ≤ 200 rows)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LiveEvents"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/projects/{project}/sessions":{"get":{"operationId":"sessions.list","summary":"Sessions explorer (sortable, paginated)","tags":["Sessions"],"security":[{"SecretKey":["analytics:read"]},{"UserSession":["analytics:read"]}],"x-required-scopes":["analytics:read"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":81,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)"},"required":true,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)","name":"project","in":"path"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Start day YYYY-MM-DD (project time zone, inclusive). Wins over preset."},"required":false,"description":"Start day YYYY-MM-DD (project time zone, inclusive). Wins over preset.","name":"from","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"End day YYYY-MM-DD (inclusive). Default today."},"required":false,"description":"End day YYYY-MM-DD (inclusive). Default today.","name":"to","in":"query"},{"schema":{"type":"string","enum":["today","yesterday","7d","14d","30d","90d","365d","this_month","last_month","all"],"description":"Date range when from/to are absent. Default 30d; all = last 731 days."},"required":false,"description":"Date range when from/to are absent. Default 30d; all = last 731 days.","name":"preset","in":"query"},{"schema":{"type":"string","pattern":"^\\/[A-Za-z0-9/._~:-]{0,199}$","description":"Canonical page path, e.g. /pricing"},"required":false,"description":"Canonical page path, e.g. /pricing","name":"page","in":"query"},{"schema":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,39}$","description":"Page group key from the project config"},"required":false,"description":"Page group key from the project config","name":"page_group","in":"query"},{"schema":{"type":"string","enum":["any","entry","exit"],"description":"Session metrics: any = a pageview on page/page_group (default), entry = entered there, exit = left there"},"required":false,"description":"Session metrics: any = a pageview on page/page_group (default), entry = entered there, exit = left there","name":"page_mode","in":"query"},{"schema":{"type":"string","enum":["google_ads","google_organic","bing","search_other","meta","linkedin","tiktok","social_other","email","ai_assistant","referral","direct","other"]},"required":false,"name":"channel","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_source","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_medium","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_campaign","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_content","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_term","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_id","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200,"description":"Entry referrer host, e.g. www.google.com"},"required":false,"description":"Entry referrer host, e.g. www.google.com","name":"ref_host","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200,"description":"Page variant of the entry pageview"},"required":false,"description":"Page variant of the entry pageview","name":"variant","in":"query"},{"schema":{"type":"string","enum":["mobile","tablet","desktop","unknown"]},"required":false,"name":"device","in":"query"},{"schema":{"type":"string","enum":["chrome","safari","firefox","edge","samsung","opera","other"]},"required":false,"name":"browser","in":"query"},{"schema":{"type":"string","enum":["windows","macos","ios","android","linux","chromeos","other"]},"required":false,"name":"os","in":"query"},{"schema":{"type":"string","pattern":"^[A-Z]{2}$","description":"ISO country code, uppercase"},"required":false,"description":"ISO country code, uppercase","name":"country","in":"query"},{"schema":{"type":"string","pattern":"^[a-z]{2}$"},"required":false,"name":"lang","in":"query"},{"schema":{"type":"string","enum":["xs","sm","md","lg","xl"]},"required":false,"name":"screen","in":"query"},{"schema":{"type":"string","enum":["0","1","true","false"]},"required":false,"name":"converted","in":"query"},{"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"required":false,"name":"has","in":"query"},{"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"required":false,"name":"goal","in":"query"},{"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"required":false,"name":"event","in":"query"},{"schema":{"type":"string","enum":["any","none","gclid","gbraid","wbraid","fbclid","li_fat_id","ttclid","msclkid"],"description":"any/none or a specific click id present on the session"},"required":false,"description":"any/none or a specific click id present on the session","name":"click_id","in":"query"},{"schema":{"type":"string","enum":["paid","organic"],"description":"paid = an ad click id or a paid utm_medium (cpc, paid, …) on the session; organic = neither"},"required":false,"description":"paid = an ad click id or a paid utm_medium (cpc, paid, …) on the session; organic = neither","name":"traffic","in":"query"},{"schema":{"type":"string","enum":["new","memory","storage","hash"]},"required":false,"name":"stitch","in":"query"},{"schema":{"type":"string","enum":["0","1","true","false"]},"required":false,"name":"consent","in":"query"},{"schema":{"type":"string","enum":["0","1","true","false"]},"required":false,"name":"include_test","in":"query"},{"schema":{"type":"string","pattern":"^-?\\d{1,9}$"},"required":false,"name":"min_relevance","in":"query"},{"schema":{"type":"string","pattern":"^-?\\d{1,9}$"},"required":false,"name":"max_relevance","in":"query"},{"schema":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,19}$","description":"Tier key, e.g. hot"},"required":false,"description":"Tier key, e.g. hot","name":"relevance_tier","in":"query"},{"schema":{"type":"string","enum":["google_ads","meta_ads","linkedin_ads","tiktok_ads"]},"required":false,"name":"ad_platform","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"ad_account_id","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"ad_campaign_id","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"ad_adset_id","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"ad_id","in":"query"},{"schema":{"type":"string","enum":["matched","unmatched"],"description":"Sessions with/without an ad-entity match"},"required":false,"description":"Sessions with/without an ad-entity match","name":"ad_match","in":"query"},{"schema":{"type":"string","enum":["started_at","relevance","engaged","pages","clicks","scroll","video"]},"required":false,"name":"sort","in":"query"},{"schema":{"type":"string","enum":["asc","desc"]},"required":false,"name":"dir","in":"query"},{"schema":{"type":"string","pattern":"^\\d{1,6}$"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","pattern":"^\\d{1,7}$"},"required":false,"name":"offset","in":"query"}],"responses":{"200":{"description":"Sessions explorer (sortable, paginated)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionList"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/projects/{project}/sessions/{sessionId}":{"get":{"operationId":"sessions.get","summary":"One session: attribution, relevance breakdown, pageviews with merged timeline, conversions, leads","tags":["Sessions"],"security":[{"SecretKey":["analytics:read"]},{"UserSession":["analytics:read"]}],"x-required-scopes":["analytics:read"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":81,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)"},"required":true,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)","name":"project","in":"path"},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"required":true,"name":"sessionId","in":"path"},{"schema":{"type":"string","enum":["0","1","true","false"]},"required":false,"name":"sections","in":"query"},{"schema":{"type":"string","enum":["en","de"]},"required":false,"name":"locale","in":"query"}],"responses":{"200":{"description":"One session: attribution, relevance breakdown, pageviews with merged timeline, conversions, leads","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionDetail"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/projects/{project}/event-catalog":{"get":{"operationId":"events.catalog","summary":"Built-in events, presets, registered and observed custom events","tags":["Events"],"security":[{"SecretKey":["analytics:read"]},{"UserSession":["analytics:read"]}],"x-required-scopes":["analytics:read"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":81,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)"},"required":true,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)","name":"project","in":"path"}],"responses":{"200":{"description":"Built-in events, presets, registered and observed custom events","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/EventCatalogEntry"}}},"required":["data"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/projects/{project}/event-schemas/{name}":{"put":{"operationId":"eventSchemas.upsert","summary":"Register or update a custom event schema","tags":["Events"],"security":[{"SecretKey":["config:write"]},{"UserSession":["config:write"]}],"x-required-scopes":["config:write"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":81,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)"},"required":true,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)","name":"project","in":"path"},{"schema":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,39}$"},"required":true,"name":"name","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventSchemaWrite"}}}},"responses":{"200":{"description":"Register or update a custom event schema","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventSchema"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"operationId":"eventSchemas.delete","summary":"Remove a custom event schema (events stay; they become unregistered)","tags":["Events"],"security":[{"SecretKey":["config:write"]},{"UserSession":["config:write"]}],"x-required-scopes":["config:write"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":81,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)"},"required":true,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)","name":"project","in":"path"},{"schema":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,39}$"},"required":true,"name":"name","in":"path"}],"responses":{"204":{"description":"Remove a custom event schema (events stay; they become unregistered)"},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/projects/{project}/goals":{"get":{"operationId":"goals.list","summary":"Goals","tags":["Goals & funnels"],"security":[{"SecretKey":["analytics:read"]},{"UserSession":["analytics:read"]}],"x-required-scopes":["analytics:read"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":81,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)"},"required":true,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)","name":"project","in":"path"},{"schema":{"type":"string","enum":["0","1","true","false"]},"required":false,"name":"archived","in":"query"}],"responses":{"200":{"description":"Goals","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Goal"}},"goalsVersion":{"type":"integer"}},"required":["data","goalsVersion"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"goals.create","summary":"Create a goal (bumps goalsVersion → sessions are recomputed in the background)","tags":["Goals & funnels"],"security":[{"SecretKey":["config:write"]},{"UserSession":["config:write"]}],"x-required-scopes":["config:write"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":81,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)"},"required":true,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)","name":"project","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoalWrite"}}}},"responses":{"201":{"description":"Create a goal (bumps goalsVersion → sessions are recomputed in the background)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Goal"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/projects/{project}/goals/{key}":{"patch":{"operationId":"goals.update","summary":"Update a goal","tags":["Goals & funnels"],"security":[{"SecretKey":["config:write"]},{"UserSession":["config:write"]}],"x-required-scopes":["config:write"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":81,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)"},"required":true,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)","name":"project","in":"path"},{"schema":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,39}$"},"required":true,"name":"key","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"match":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["event"]},"event":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,39}$"},"props":{"type":"object","additionalProperties":{"anyOf":[{"type":"string","maxLength":200},{"type":"number"},{"type":"boolean"}]}}},"required":["kind","event"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["page"]},"page":{"type":"string","pattern":"^\\/[A-Za-z0-9/._~:-]{0,199}$"},"mode":{"type":"string","enum":["exact","prefix"]}},"required":["kind","page","mode"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["lead"]},"form":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,40}$"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["conversion"]},"definition":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,39}$"}},"required":["kind"],"additionalProperties":false}]},"isConversion":{"type":"boolean"},"value":{"type":["number","null"],"minimum":0,"maximum":1000000000,"default":null},"sort":{"type":"integer","minimum":0,"maximum":1000,"default":0},"archived":{"type":"boolean","default":false}},"additionalProperties":false}}}},"responses":{"200":{"description":"Update a goal","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Goal"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"operationId":"goals.delete","summary":"Delete a goal","tags":["Goals & funnels"],"security":[{"SecretKey":["config:write"]},{"UserSession":["config:write"]}],"x-required-scopes":["config:write"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":81,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)"},"required":true,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)","name":"project","in":"path"},{"schema":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,39}$"},"required":true,"name":"key","in":"path"}],"responses":{"204":{"description":"Delete a goal"},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/projects/{project}/funnels":{"get":{"operationId":"funnels.list","summary":"Funnel definitions","tags":["Goals & funnels"],"security":[{"SecretKey":["analytics:read"]},{"UserSession":["analytics:read"]}],"x-required-scopes":["analytics:read"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":81,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)"},"required":true,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)","name":"project","in":"path"}],"responses":{"200":{"description":"Funnel definitions","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Funnel"}}},"required":["data"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"funnels.create","summary":"Create a funnel","tags":["Goals & funnels"],"security":[{"SecretKey":["config:write"]},{"UserSession":["config:write"]}],"x-required-scopes":["config:write"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":81,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)"},"required":true,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)","name":"project","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FunnelWrite"}}}},"responses":{"201":{"description":"Create a funnel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Funnel"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/projects/{project}/funnels/{key}":{"patch":{"operationId":"funnels.update","summary":"Update a funnel","tags":["Goals & funnels"],"security":[{"SecretKey":["config:write"]},{"UserSession":["config:write"]}],"x-required-scopes":["config:write"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":81,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)"},"required":true,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)","name":"project","in":"path"},{"schema":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,39}$"},"required":true,"name":"key","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"mode":{"type":"string","enum":["independent","sequential"]},"steps":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,39}$"},"label":{"anyOf":[{"type":"string","minLength":1,"maxLength":80},{"type":"object","properties":{"en":{"type":"string","minLength":1,"maxLength":80},"de":{"type":"string","minLength":1,"maxLength":80}},"required":["en"],"additionalProperties":false}]},"match":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["sessions"]}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["event"]},"event":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,39}$"},"props":{"type":"object","additionalProperties":{"anyOf":[{"type":"string","maxLength":200},{"type":"number"},{"type":"boolean"}]}}},"required":["kind","event"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["page"]},"page":{"type":"string","pattern":"^\\/[A-Za-z0-9/._~:-]{0,199}$"},"mode":{"type":"string","enum":["exact","prefix"]}},"required":["kind","page","mode"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["goal"]},"goal":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,39}$"}},"required":["kind","goal"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["answered"]},"count":{"type":"integer","minimum":1,"maximum":50},"questionnaire":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,40}$"}},"required":["kind","count"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["funnel_step"]},"step":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,39}$"}},"required":["kind","step"],"additionalProperties":false}]}},"required":["key","label","match"],"additionalProperties":false},"minItems":2,"maxItems":20},"isDefault":{"type":"boolean","default":false},"sort":{"type":"integer","minimum":0,"maximum":1000,"default":0}},"additionalProperties":false}}}},"responses":{"200":{"description":"Update a funnel","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Funnel"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"operationId":"funnels.delete","summary":"Delete a funnel","tags":["Goals & funnels"],"security":[{"SecretKey":["config:write"]},{"UserSession":["config:write"]}],"x-required-scopes":["config:write"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":81,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)"},"required":true,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)","name":"project","in":"path"},{"schema":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,39}$"},"required":true,"name":"key","in":"path"}],"responses":{"204":{"description":"Delete a funnel"},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/projects/{project}/questionnaires":{"get":{"operationId":"questionnaires.list","summary":"Questionnaire (quiz) definitions","tags":["Goals & funnels"],"security":[{"SecretKey":["analytics:read"]},{"UserSession":["analytics:read"]}],"x-required-scopes":["analytics:read"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":81,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)"},"required":true,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)","name":"project","in":"path"}],"responses":{"200":{"description":"Questionnaire (quiz) definitions","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Questionnaire"}}},"required":["data"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/projects/{project}/questionnaires/{id}":{"put":{"operationId":"questionnaires.upsert","summary":"Create or replace a questionnaire (validates quiz_answer events, labels answer analytics)","tags":["Goals & funnels"],"security":[{"SecretKey":["config:write"]},{"UserSession":["config:write"]}],"x-required-scopes":["config:write"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":81,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)"},"required":true,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)","name":"project","in":"path"},{"schema":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,40}$"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"anyOf":[{"type":"string","minLength":1,"maxLength":80},{"type":"object","properties":{"en":{"type":"string","minLength":1,"maxLength":80},"de":{"type":"string","minLength":1,"maxLength":80}},"required":["en"],"additionalProperties":false}]},"questions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,40}$"},"label":{"anyOf":[{"type":"string","minLength":1,"maxLength":80},{"type":"object","properties":{"en":{"type":"string","minLength":1,"maxLength":80},"de":{"type":"string","minLength":1,"maxLength":80}},"required":["en"],"additionalProperties":false}]},"summaryLabel":{"anyOf":[{"type":"string","minLength":1,"maxLength":80},{"type":"object","properties":{"en":{"type":"string","minLength":1,"maxLength":80},"de":{"type":"string","minLength":1,"maxLength":80}},"required":["en"],"additionalProperties":false}]},"options":{"type":"array","items":{"type":"array","prefixItems":[{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,40}$"},{"anyOf":[{"type":"string","minLength":1,"maxLength":80},{"type":"object","properties":{"en":{"type":"string","minLength":1,"maxLength":80},"de":{"type":"string","minLength":1,"maxLength":80}},"required":["en"],"additionalProperties":false}]}]},"minItems":1,"maxItems":30}},"required":["id","label","options"],"additionalProperties":false},"minItems":1,"maxItems":50}},"required":["label","questions"],"additionalProperties":false}}}},"responses":{"200":{"description":"Create or replace a questionnaire (validates quiz_answer events, labels answer analytics)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Questionnaire"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"operationId":"questionnaires.delete","summary":"Delete a questionnaire","tags":["Goals & funnels"],"security":[{"SecretKey":["config:write"]},{"UserSession":["config:write"]}],"x-required-scopes":["config:write"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":81,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)"},"required":true,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)","name":"project","in":"path"},{"schema":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,40}$"},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"Delete a questionnaire"},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/projects/{project}/relevance":{"get":{"operationId":"relevance.get","summary":"Active relevance model, version history and rescoring progress","tags":["Relevance"],"security":[{"SecretKey":["analytics:read"]},{"UserSession":["analytics:read"]}],"x-required-scopes":["analytics:read"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":81,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)"},"required":true,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)","name":"project","in":"path"}],"responses":{"200":{"description":"Active relevance model, version history and rescoring progress","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RelevanceState"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"put":{"operationId":"relevance.update","summary":"Save a new relevance model version (all sessions are rescored retroactively)","tags":["Relevance"],"security":[{"SecretKey":["config:write"]},{"UserSession":["config:write"]}],"x-required-scopes":["config:write"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":81,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)"},"required":true,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)","name":"project","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"config":{"$ref":"#/components/schemas/RelevanceConfig"},"note":{"type":"string","maxLength":200}},"required":["config"],"additionalProperties":false}}}},"responses":{"200":{"description":"Save a new relevance model version (all sessions are rescored retroactively)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RelevanceState"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/projects/{project}/relevance/preview":{"post":{"operationId":"relevance.preview","summary":"Score distribution of a proposed model on recent sessions (nothing is stored)","tags":["Relevance"],"security":[{"SecretKey":["analytics:read"]},{"UserSession":["analytics:read"]}],"x-required-scopes":["analytics:read"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":81,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)"},"required":true,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)","name":"project","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"config":{"$ref":"#/components/schemas/RelevanceConfig"},"sample":{"type":"integer","minimum":100,"maximum":10000,"default":5000}},"required":["config"],"additionalProperties":false}}}},"responses":{"200":{"description":"Score distribution of a proposed model on recent sessions (nothing is stored)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RelevancePreview"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/projects/{project}/relevance/rescore":{"post":{"operationId":"relevance.rescore","summary":"Run a rescoring chunk now (normally done by the scheduler)","tags":["Relevance"],"security":[{"SecretKey":["config:write"]},{"UserSession":["config:write"]}],"x-required-scopes":["config:write"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":81,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)"},"required":true,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)","name":"project","in":"path"}],"responses":{"200":{"description":"Run a rescoring chunk now (normally done by the scheduler)","content":{"application/json":{"schema":{"type":"object","properties":{"rescored":{"type":"integer"},"pendingSessions":{"type":"integer"}},"required":["rescored","pendingSessions"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/projects/{project}/conversions":{"get":{"operationId":"conversions.list","summary":"Conversions with per-provider upload status (never hashes, IP, user agent)","tags":["Conversions"],"security":[{"SecretKey":["conversions:read"]},{"UserSession":["conversions:read"]}],"x-required-scopes":["conversions:read"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":81,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)"},"required":true,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)","name":"project","in":"path"},{"schema":{"type":"string","enum":["held","pending","uploaded","skipped"]},"required":false,"name":"status","in":"query"},{"schema":{"type":"string","enum":["quiz","booking","whatsapp_manual","manual","event","goal","lead","api"]},"required":false,"name":"source","in":"query"},{"schema":{"type":"string","maxLength":40},"required":false,"name":"definition","in":"query"},{"schema":{"type":"string","maxLength":36},"required":false,"name":"session_id","in":"query"},{"schema":{"type":"string","enum":["meta","linkedin","google_ads","tiktok"]},"required":false,"name":"provider","in":"query"},{"schema":{"type":"string","enum":["pending","uploaded","feed","failed","skipped","not_configured","dry_run","error"]},"required":false,"name":"provider_status","in":"query"},{"schema":{"type":"string","pattern":"^\\d{1,6}$"},"required":false,"name":"days","in":"query"},{"schema":{"type":"string","enum":["0","1","true","false"]},"required":false,"name":"include_test","in":"query"},{"schema":{"type":"string","pattern":"^\\d{1,6}$"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","maxLength":500},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"Conversions with per-provider upload status (never hashes, IP, user agent)","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Conversion"}},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"conversions.create","summary":"Record a conversion and upload it to the configured destinations","description":"sessionId (from the browser's getIds()) or match {at, windowMinutes, …} to find the session; contact data is hashed on receipt. Ambiguous matches return ≤ 10 candidates. Idempotent via eventId and the Idempotency-Key header.","tags":["Conversions"],"security":[{"SecretKey":["conversions:write"]},{"UserSession":["conversions:write"]}],"x-required-scopes":["conversions:write"],"x-idempotent":true,"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":81,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)"},"required":true,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)","name":"project","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversionCreate"}}}},"responses":{"200":{"description":"Record a conversion and upload it to the configured destinations","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversionCreateResult"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/projects/{project}/conversions/{id}":{"get":{"operationId":"conversions.get","summary":"One conversion","tags":["Conversions"],"security":[{"SecretKey":["conversions:read"]},{"UserSession":["conversions:read"]}],"x-required-scopes":["conversions:read"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":81,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)"},"required":true,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)","name":"project","in":"path"},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"One conversion","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Conversion"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/projects/{project}/conversions/{id}/retry":{"post":{"operationId":"conversions.retry","summary":"Retry uploads (default: every provider not uploaded/feed); force resets attempts","tags":["Conversions"],"security":[{"SecretKey":["conversions:write"]},{"UserSession":["conversions:write"]}],"x-required-scopes":["conversions:write"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":81,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)"},"required":true,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)","name":"project","in":"path"},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversionRetry"}}}},"responses":{"200":{"description":"Retry uploads (default: every provider not uploaded/feed); force resets attempts","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Conversion"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/projects/{project}/conversions/{id}/status":{"patch":{"operationId":"conversions.updateStatus","summary":"Manual bookkeeping of conversion/provider status","tags":["Conversions"],"security":[{"SecretKey":["conversions:write"]},{"UserSession":["conversions:write"]}],"x-required-scopes":["conversions:write"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":81,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)"},"required":true,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)","name":"project","in":"path"},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversionStatusUpdate"}}}},"responses":{"200":{"description":"Manual bookkeeping of conversion/provider status","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Conversion"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/cb":{"post":{"operationId":"conversions.beacon","summary":"Browser conversion beacon (booking parity): allowed origins only, ≤ 4 KB, 4/min/IP, one per session and definition","tags":["Conversions"],"security":[],"x-required-scopes":[],"requestBody":{"required":true,"content":{"text/plain":{"schema":{"type":"object","properties":{"k":{"type":"string","maxLength":100},"definition":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,39}$"},"eventId":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{8,100}$"},"sid":{"type":["string","null"],"pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"pv":{"type":["string","null"],"pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"url":{"type":["string","null"],"maxLength":2000},"attr":{"type":["object","null"],"additionalProperties":{"type":"string","maxLength":512}},"test":{"type":"boolean"},"em":{"type":"string","pattern":"^[0-9a-f]{64}$"},"emg":{"type":"string","pattern":"^[0-9a-f]{64}$"},"fn":{"type":"string","pattern":"^[0-9a-f]{64}$"},"ln":{"type":"string","pattern":"^[0-9a-f]{64}$"},"ph":{"type":"string","pattern":"^[0-9a-f]{64}$"},"fbp":{"type":"string","pattern":"^fb\\.\\d\\.\\d{10,13}\\.\\d{1,30}$"},"fbc":{"type":"string","maxLength":600,"pattern":"^fb\\.\\d\\.\\d{10,13}\\.[\\w-]{10,500}$"},"ttp":{"type":"string","pattern":"^[\\w.-]{8,200}$"}},"required":["k","definition","eventId","sid","pv","url","attr","test"],"additionalProperties":false}}}},"responses":{"202":{"description":"Browser conversion beacon (booking parity): allowed origins only, ≤ 4 KB, 4/min/IP, one per session and definition"},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/projects/{project}/feeds/google-ads.csv":{"get":{"operationId":"conversions.googleAdsFeed","summary":"Google Ads scheduled-upload CSV (HTTP Basic with the feed credentials; last 60 days)","tags":["Conversions"],"security":[],"x-required-scopes":[],"parameters":[{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"required":true,"name":"project","in":"path"},{"schema":{"type":"string","maxLength":40},"required":false,"name":"source","in":"query"},{"schema":{"type":"string","maxLength":40},"required":false,"name":"definition","in":"query"}],"responses":{"200":{"description":"Google Ads scheduled-upload CSV (HTTP Basic with the feed credentials; last 60 days)","content":{"text/csv":{"schema":{"type":"string"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/projects/{project}/conversion-definitions":{"get":{"operationId":"conversionDefinitions.list","summary":"Conversion definitions (trigger → provider events)","tags":["Conversions"],"security":[{"SecretKey":["conversions:read"]},{"UserSession":["conversions:read"]}],"x-required-scopes":["conversions:read"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":81,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)"},"required":true,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)","name":"project","in":"path"}],"responses":{"200":{"description":"Conversion definitions (trigger → provider events)","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ConversionDefinition"}}},"required":["data"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/projects/{project}/conversion-definitions/{key}":{"put":{"operationId":"conversionDefinitions.upsert","summary":"Create or replace a conversion definition","tags":["Conversions"],"security":[{"SecretKey":["conversions:write","config:write"]},{"UserSession":["conversions:write","config:write"]}],"x-required-scopes":["conversions:write","config:write"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":81,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)"},"required":true,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)","name":"project","in":"path"},{"schema":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,39}$"},"required":true,"name":"key","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversionDefinitionWrite"}}}},"responses":{"200":{"description":"Create or replace a conversion definition","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversionDefinition"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"operationId":"conversionDefinitions.delete","summary":"Delete a conversion definition (existing conversions keep it as text)","tags":["Conversions"],"security":[{"SecretKey":["conversions:write","config:write"]},{"UserSession":["conversions:write","config:write"]}],"x-required-scopes":["conversions:write","config:write"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":81,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)"},"required":true,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)","name":"project","in":"path"},{"schema":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,39}$"},"required":true,"name":"key","in":"path"}],"responses":{"204":{"description":"Delete a conversion definition (existing conversions keep it as text)"},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/projects/{project}/destinations":{"get":{"operationId":"destinations.list","summary":"Conversion destinations (Meta, LinkedIn, Google Ads, TikTok) – secrets are never returned","tags":["Conversions"],"security":[{"SecretKey":["conversions:read"]},{"UserSession":["conversions:read"]}],"x-required-scopes":["conversions:read"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":81,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)"},"required":true,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)","name":"project","in":"path"}],"responses":{"200":{"description":"Conversion destinations (Meta, LinkedIn, Google Ads, TikTok) – secrets are never returned","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Destination"}},"deploymentMode":{"type":"string","enum":["live","test","dry_run"]},"disabled":{"type":"boolean"}},"required":["data","deploymentMode","disabled"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/projects/{project}/destinations/{provider}":{"put":{"operationId":"destinations.update","summary":"Configure a destination (settings, encrypted secrets, transport direct/composio/feed, mode)","tags":["Conversions"],"security":[{"SecretKey":["project:admin"]},{"UserSession":["project:admin"]}],"x-required-scopes":["project:admin"],"x-sudo":true,"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":81,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)"},"required":true,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)","name":"project","in":"path"},{"schema":{"type":"string","enum":["meta","linkedin","google_ads","tiktok"]},"required":true,"name":"provider","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestinationWrite"}}}},"responses":{"200":{"description":"Configure a destination (settings, encrypted secrets, transport direct/composio/feed, mode)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Destination"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/projects/{project}/destinations/{provider}/test":{"post":{"operationId":"destinations.test","summary":"Send a test event (Meta test_event_code, Google validateOnly, LinkedIn/TikTok validation)","tags":["Conversions"],"security":[{"SecretKey":["project:admin"]},{"UserSession":["project:admin"]}],"x-required-scopes":["project:admin"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":81,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)"},"required":true,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)","name":"project","in":"path"},{"schema":{"type":"string","enum":["meta","linkedin","google_ads","tiktok"]},"required":true,"name":"provider","in":"path"}],"responses":{"200":{"description":"Send a test event (Meta test_event_code, Google validateOnly, LinkedIn/TikTok validation)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DestinationTestResult"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/projects/{project}/leads":{"get":{"operationId":"leads.list","summary":"Leads (personal data)","tags":["Leads"],"security":[{"SecretKey":["leads:read"]},{"UserSession":["leads:read"]}],"x-required-scopes":["leads:read"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":81,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)"},"required":true,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)","name":"project","in":"path"},{"schema":{"type":"string","pattern":"^\\d{1,6}$"},"required":false,"name":"days","in":"query"},{"schema":{"type":"string","maxLength":40},"required":false,"name":"form","in":"query"},{"schema":{"type":"string","enum":["identify","api","import"]},"required":false,"name":"source","in":"query"},{"schema":{"type":"string","enum":["0","1","true","false"]},"required":false,"name":"include_test","in":"query"},{"schema":{"type":"string","enum":["0","1","true","false"]},"required":false,"name":"include_spam","in":"query"},{"schema":{"type":"string","pattern":"^\\d{1,6}$"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","maxLength":500},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"Leads (personal data)","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Lead"}},"nextCursor":{"type":["string","null"]}},"required":["data","nextCursor"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"leads.create","summary":"Record a lead from the site's server (optionally with a conversion)","tags":["Leads"],"security":[{"SecretKey":["leads:write"]},{"UserSession":["leads:write"]}],"x-required-scopes":["leads:write"],"x-idempotent":true,"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":81,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)"},"required":true,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)","name":"project","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadCreate"}}}},"responses":{"201":{"description":"Record a lead from the site's server (optionally with a conversion)","content":{"application/json":{"schema":{"type":"object","properties":{"lead":{"$ref":"#/components/schemas/Lead"},"conversionId":{"type":["string","null"]}},"required":["lead","conversionId"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/projects/{project}/leads/{id}":{"get":{"operationId":"leads.get","summary":"One lead","tags":["Leads"],"security":[{"SecretKey":["leads:read"]},{"UserSession":["leads:read"]}],"x-required-scopes":["leads:read"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":81,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)"},"required":true,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)","name":"project","in":"path"},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"One lead","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Lead"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"delete":{"operationId":"leads.delete","summary":"Erase a lead (GDPR); linked conversions lose their hashed identifiers","tags":["Leads"],"security":[{"SecretKey":["leads:write"]},{"UserSession":["leads:write"]}],"x-required-scopes":["leads:write"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":81,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)"},"required":true,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)","name":"project","in":"path"},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"Erase a lead (GDPR); linked conversions lose their hashed identifiers"},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/projects/{project}/leads.csv":{"get":{"operationId":"leads.export","summary":"CSV export of leads","tags":["Leads"],"security":[{"SecretKey":["leads:read"]},{"UserSession":["leads:read"]}],"x-required-scopes":["leads:read"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":81,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)"},"required":true,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)","name":"project","in":"path"},{"schema":{"type":"string","pattern":"^\\d{1,6}$"},"required":false,"name":"days","in":"query"},{"schema":{"type":"string","enum":["0","1","true","false"]},"required":false,"name":"include_test","in":"query"},{"schema":{"type":"string","enum":["0","1","true","false"]},"required":false,"name":"include_spam","in":"query"}],"responses":{"200":{"description":"CSV export of leads","content":{"text/csv":{"schema":{"type":"string"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/projects/{project}/ad-connections":{"get":{"operationId":"ads.connections.list","summary":"Ad-platform connections of the project","tags":["Ads"],"security":[{"SecretKey":["ads:read"]},{"UserSession":["ads:read"]}],"x-required-scopes":["ads:read"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":81,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)"},"required":true,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)","name":"project","in":"path"}],"responses":{"200":{"description":"Ad-platform connections of the project","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/AdConnection"}}},"required":["data"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"ads.connections.create","summary":"Start connecting an ad platform (returns the hosted OAuth URL, valid 10 minutes)","tags":["Ads"],"security":[{"UserSession":["ads:write"]}],"x-required-scopes":["ads:write"],"x-sudo":true,"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":81,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)"},"required":true,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)","name":"project","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdConnectionCreate"}}}},"responses":{"201":{"description":"Start connecting an ad platform (returns the hosted OAuth URL, valid 10 minutes)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdConnectionStarted"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/projects/{project}/ad-connections/{id}/complete":{"post":{"operationId":"ads.connections.complete","summary":"Finish the OAuth callback (nonce + connected account verified) and discover ad accounts","tags":["Ads"],"security":[{"UserSession":["ads:write"]}],"x-required-scopes":["ads:write"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":81,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)"},"required":true,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)","name":"project","in":"path"},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdConnectionComplete"}}}},"responses":{"200":{"description":"Finish the OAuth callback (nonce + connected account verified) and discover ad accounts","content":{"application/json":{"schema":{"type":"object","properties":{"connection":{"$ref":"#/components/schemas/AdConnection"},"accounts":{"type":"array","items":{"$ref":"#/components/schemas/DiscoveredAdAccount"}}},"required":["connection","accounts"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/projects/{project}/ad-connections/{id}/accounts":{"get":{"operationId":"ads.connections.discover","summary":"Ad accounts reachable through a connection","tags":["Ads"],"security":[{"SecretKey":["ads:write"]},{"UserSession":["ads:write"]}],"x-required-scopes":["ads:write"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":81,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)"},"required":true,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)","name":"project","in":"path"},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Ad accounts reachable through a connection","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/DiscoveredAdAccount"}}},"required":["data"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/projects/{project}/ad-connections/{id}":{"delete":{"operationId":"ads.connections.delete","summary":"Disconnect (revoke at Composio); cost data is kept unless purge=true","tags":["Ads"],"security":[{"SecretKey":["ads:write"]},{"UserSession":["ads:write"]}],"x-required-scopes":["ads:write"],"x-sudo":true,"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":81,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)"},"required":true,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)","name":"project","in":"path"},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","enum":["true","false"]},"required":false,"name":"purge","in":"query"}],"responses":{"204":{"description":"Disconnect (revoke at Composio); cost data is kept unless purge=true"},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/ad-connections":{"get":{"operationId":"ads.orgConnections.list","summary":"Org-level ad-platform connections (usable by every project of the organization)","tags":["Ads"],"security":[{"SecretKey":["org:admin"]},{"UserSession":["org:admin"]}],"x-required-scopes":["org:admin"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"required":true,"name":"org","in":"path"}],"responses":{"200":{"description":"Org-level ad-platform connections (usable by every project of the organization)","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/AdConnection"}}},"required":["data"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"ads.orgConnections.create","summary":"Start an org-level ad-platform connection (returns the hosted OAuth URL, valid 10 minutes)","tags":["Ads"],"security":[{"UserSession":["org:admin"]}],"x-required-scopes":["org:admin"],"x-sudo":true,"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"required":true,"name":"org","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdConnectionCreate"}}}},"responses":{"201":{"description":"Start an org-level ad-platform connection (returns the hosted OAuth URL, valid 10 minutes)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdConnectionStarted"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/ad-connections/{id}/complete":{"post":{"operationId":"ads.orgConnections.complete","summary":"Finish the OAuth callback of an org-level connection and discover ad accounts","tags":["Ads"],"security":[{"UserSession":["org:admin"]}],"x-required-scopes":["org:admin"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"required":true,"name":"org","in":"path"},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdConnectionComplete"}}}},"responses":{"200":{"description":"Finish the OAuth callback of an org-level connection and discover ad accounts","content":{"application/json":{"schema":{"type":"object","properties":{"connection":{"$ref":"#/components/schemas/AdConnection"},"accounts":{"type":"array","items":{"$ref":"#/components/schemas/DiscoveredAdAccount"}}},"required":["connection","accounts"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/ad-connections/{id}/accounts":{"get":{"operationId":"ads.orgConnections.discover","summary":"Ad accounts reachable through an org-level connection","tags":["Ads"],"security":[{"SecretKey":["org:admin"]},{"UserSession":["org:admin"]}],"x-required-scopes":["org:admin"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"required":true,"name":"org","in":"path"},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Ad accounts reachable through an org-level connection","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/DiscoveredAdAccount"}}},"required":["data"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/ad-connections/{id}":{"delete":{"operationId":"ads.orgConnections.delete","summary":"Disconnect an org-level connection (its accounts are removed from every project); cost data is kept unless purge=true","tags":["Ads"],"security":[{"UserSession":["org:admin"]}],"x-required-scopes":["org:admin"],"x-sudo":true,"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"required":true,"name":"org","in":"path"},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","enum":["true","false"]},"required":false,"name":"purge","in":"query"}],"responses":{"204":{"description":"Disconnect an org-level connection (its accounts are removed from every project); cost data is kept unless purge=true"},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/projects/{project}/ad-accounts":{"get":{"operationId":"ads.accounts.list","summary":"Ad accounts assigned to the project","tags":["Ads"],"security":[{"SecretKey":["ads:read"]},{"UserSession":["ads:read"]}],"x-required-scopes":["ads:read"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":81,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)"},"required":true,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)","name":"project","in":"path"}],"responses":{"200":{"description":"Ad accounts assigned to the project","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/AdAccount"}}},"required":["data"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"put":{"operationId":"ads.accounts.select","summary":"Assign ad accounts of a connection to the project (starts a 90-day backfill)","tags":["Ads"],"security":[{"SecretKey":["ads:write"]},{"UserSession":["ads:write"]}],"x-required-scopes":["ads:write"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":81,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)"},"required":true,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)","name":"project","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdAccountsSelect"}}}},"responses":{"200":{"description":"Assign ad accounts of a connection to the project (starts a 90-day backfill)","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/AdAccount"}}},"required":["data"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/projects/{project}/ads/sync":{"post":{"operationId":"ads.sync.run","summary":"Queue a sync (entities, metrics, Google click_view, backfill, session matching)","tags":["Ads"],"security":[{"SecretKey":["ads:write"]},{"UserSession":["ads:write"]}],"x-required-scopes":["ads:write"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":81,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)"},"required":true,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)","name":"project","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdSyncRequest"}}}},"responses":{"202":{"description":"Queue a sync (entities, metrics, Google click_view, backfill, session matching)","content":{"application/json":{"schema":{"type":"object","properties":{"queued":{"type":"array","items":{"$ref":"#/components/schemas/AdSyncRun"}}},"required":["queued"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/projects/{project}/ads/sync-runs":{"get":{"operationId":"ads.sync.runs","summary":"Recent sync runs and their status","tags":["Ads"],"security":[{"SecretKey":["ads:read"]},{"UserSession":["ads:read"]}],"x-required-scopes":["ads:read"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":81,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)"},"required":true,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)","name":"project","in":"path"},{"schema":{"type":"string","pattern":"^\\d{1,6}$"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","enum":["google_ads","meta_ads","linkedin_ads","tiktok_ads"]},"required":false,"name":"platform","in":"query"}],"responses":{"200":{"description":"Recent sync runs and their status","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/AdSyncRun"}}},"required":["data"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/projects/{project}/ads/report":{"get":{"operationId":"ads.report","summary":"Spend × sessions × conversions: CPC, cost per session, cost per relevant session, CPL, ROAS","tags":["Ads"],"security":[{"SecretKey":["ads:read"]},{"UserSession":["ads:read"]}],"x-required-scopes":["ads:read"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":81,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)"},"required":true,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)","name":"project","in":"path"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Start day YYYY-MM-DD (project time zone, inclusive). Wins over preset."},"required":false,"description":"Start day YYYY-MM-DD (project time zone, inclusive). Wins over preset.","name":"from","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"End day YYYY-MM-DD (inclusive). Default today."},"required":false,"description":"End day YYYY-MM-DD (inclusive). Default today.","name":"to","in":"query"},{"schema":{"type":"string","enum":["today","yesterday","7d","14d","30d","90d","365d","this_month","last_month","all"],"description":"Date range when from/to are absent. Default 30d; all = last 731 days."},"required":false,"description":"Date range when from/to are absent. Default 30d; all = last 731 days.","name":"preset","in":"query"},{"schema":{"type":"string","pattern":"^\\/[A-Za-z0-9/._~:-]{0,199}$","description":"Canonical page path, e.g. /pricing"},"required":false,"description":"Canonical page path, e.g. /pricing","name":"page","in":"query"},{"schema":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,39}$","description":"Page group key from the project config"},"required":false,"description":"Page group key from the project config","name":"page_group","in":"query"},{"schema":{"type":"string","enum":["any","entry","exit"],"description":"Session metrics: any = a pageview on page/page_group (default), entry = entered there, exit = left there"},"required":false,"description":"Session metrics: any = a pageview on page/page_group (default), entry = entered there, exit = left there","name":"page_mode","in":"query"},{"schema":{"type":"string","enum":["google_ads","google_organic","bing","search_other","meta","linkedin","tiktok","social_other","email","ai_assistant","referral","direct","other"]},"required":false,"name":"channel","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_source","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_medium","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_campaign","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_content","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_term","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_id","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200,"description":"Entry referrer host, e.g. www.google.com"},"required":false,"description":"Entry referrer host, e.g. www.google.com","name":"ref_host","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200,"description":"Page variant of the entry pageview"},"required":false,"description":"Page variant of the entry pageview","name":"variant","in":"query"},{"schema":{"type":"string","enum":["mobile","tablet","desktop","unknown"]},"required":false,"name":"device","in":"query"},{"schema":{"type":"string","enum":["chrome","safari","firefox","edge","samsung","opera","other"]},"required":false,"name":"browser","in":"query"},{"schema":{"type":"string","enum":["windows","macos","ios","android","linux","chromeos","other"]},"required":false,"name":"os","in":"query"},{"schema":{"type":"string","pattern":"^[A-Z]{2}$","description":"ISO country code, uppercase"},"required":false,"description":"ISO country code, uppercase","name":"country","in":"query"},{"schema":{"type":"string","pattern":"^[a-z]{2}$"},"required":false,"name":"lang","in":"query"},{"schema":{"type":"string","enum":["xs","sm","md","lg","xl"]},"required":false,"name":"screen","in":"query"},{"schema":{"type":"string","enum":["0","1","true","false"]},"required":false,"name":"converted","in":"query"},{"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"required":false,"name":"has","in":"query"},{"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"required":false,"name":"goal","in":"query"},{"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"required":false,"name":"event","in":"query"},{"schema":{"type":"string","enum":["any","none","gclid","gbraid","wbraid","fbclid","li_fat_id","ttclid","msclkid"],"description":"any/none or a specific click id present on the session"},"required":false,"description":"any/none or a specific click id present on the session","name":"click_id","in":"query"},{"schema":{"type":"string","enum":["paid","organic"],"description":"paid = an ad click id or a paid utm_medium (cpc, paid, …) on the session; organic = neither"},"required":false,"description":"paid = an ad click id or a paid utm_medium (cpc, paid, …) on the session; organic = neither","name":"traffic","in":"query"},{"schema":{"type":"string","enum":["new","memory","storage","hash"]},"required":false,"name":"stitch","in":"query"},{"schema":{"type":"string","enum":["0","1","true","false"]},"required":false,"name":"consent","in":"query"},{"schema":{"type":"string","enum":["0","1","true","false"]},"required":false,"name":"include_test","in":"query"},{"schema":{"type":"string","pattern":"^-?\\d{1,9}$"},"required":false,"name":"min_relevance","in":"query"},{"schema":{"type":"string","pattern":"^-?\\d{1,9}$"},"required":false,"name":"max_relevance","in":"query"},{"schema":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,19}$","description":"Tier key, e.g. hot"},"required":false,"description":"Tier key, e.g. hot","name":"relevance_tier","in":"query"},{"schema":{"type":"string","enum":["google_ads","meta_ads","linkedin_ads","tiktok_ads"]},"required":false,"name":"ad_platform","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"ad_account_id","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"ad_campaign_id","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"ad_adset_id","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"ad_id","in":"query"},{"schema":{"type":"string","enum":["matched","unmatched"],"description":"Sessions with/without an ad-entity match"},"required":false,"description":"Sessions with/without an ad-entity match","name":"ad_match","in":"query"},{"schema":{"type":"string","enum":["platform","campaign","adset","ad"]},"required":false,"name":"level","in":"query"},{"schema":{"type":"string","maxLength":40},"required":false,"name":"sort","in":"query"},{"schema":{"type":"string","enum":["asc","desc"]},"required":false,"name":"dir","in":"query"},{"schema":{"type":"string","pattern":"^\\d{1,6}$"},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","pattern":"^\\d{1,6}$"},"required":false,"name":"relevant_min","in":"query"}],"responses":{"200":{"description":"Spend × sessions × conversions: CPC, cost per session, cost per relevant session, CPL, ROAS","content":{"application/json":{"schema":{"type":"object","properties":{"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"level":{"type":"string","enum":["platform","campaign","adset","ad"]},"relevantMinScore":{"type":"integer"},"totals":{"$ref":"#/components/schemas/AdReportRow"},"rows":{"type":"array","items":{"$ref":"#/components/schemas/AdReportRow"}},"unmatchedSessions":{"type":"integer"},"notes":{"type":"array","items":{"type":"string"}},"filter":{"$ref":"#/components/schemas/FilterEcho"}},"required":["currency","level","relevantMinScore","totals","rows","unmatchedSessions","notes","filter"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/projects/{project}/ads/timeseries":{"get":{"operationId":"ads.timeseries","summary":"Daily/weekly spend next to sessions, relevant sessions and conversions","tags":["Ads"],"security":[{"SecretKey":["ads:read"]},{"UserSession":["ads:read"]}],"x-required-scopes":["ads:read"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":81,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)"},"required":true,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)","name":"project","in":"path"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Start day YYYY-MM-DD (project time zone, inclusive). Wins over preset."},"required":false,"description":"Start day YYYY-MM-DD (project time zone, inclusive). Wins over preset.","name":"from","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"End day YYYY-MM-DD (inclusive). Default today."},"required":false,"description":"End day YYYY-MM-DD (inclusive). Default today.","name":"to","in":"query"},{"schema":{"type":"string","enum":["today","yesterday","7d","14d","30d","90d","365d","this_month","last_month","all"],"description":"Date range when from/to are absent. Default 30d; all = last 731 days."},"required":false,"description":"Date range when from/to are absent. Default 30d; all = last 731 days.","name":"preset","in":"query"},{"schema":{"type":"string","pattern":"^\\/[A-Za-z0-9/._~:-]{0,199}$","description":"Canonical page path, e.g. /pricing"},"required":false,"description":"Canonical page path, e.g. /pricing","name":"page","in":"query"},{"schema":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,39}$","description":"Page group key from the project config"},"required":false,"description":"Page group key from the project config","name":"page_group","in":"query"},{"schema":{"type":"string","enum":["any","entry","exit"],"description":"Session metrics: any = a pageview on page/page_group (default), entry = entered there, exit = left there"},"required":false,"description":"Session metrics: any = a pageview on page/page_group (default), entry = entered there, exit = left there","name":"page_mode","in":"query"},{"schema":{"type":"string","enum":["google_ads","google_organic","bing","search_other","meta","linkedin","tiktok","social_other","email","ai_assistant","referral","direct","other"]},"required":false,"name":"channel","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_source","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_medium","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_campaign","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_content","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_term","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_id","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200,"description":"Entry referrer host, e.g. www.google.com"},"required":false,"description":"Entry referrer host, e.g. www.google.com","name":"ref_host","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200,"description":"Page variant of the entry pageview"},"required":false,"description":"Page variant of the entry pageview","name":"variant","in":"query"},{"schema":{"type":"string","enum":["mobile","tablet","desktop","unknown"]},"required":false,"name":"device","in":"query"},{"schema":{"type":"string","enum":["chrome","safari","firefox","edge","samsung","opera","other"]},"required":false,"name":"browser","in":"query"},{"schema":{"type":"string","enum":["windows","macos","ios","android","linux","chromeos","other"]},"required":false,"name":"os","in":"query"},{"schema":{"type":"string","pattern":"^[A-Z]{2}$","description":"ISO country code, uppercase"},"required":false,"description":"ISO country code, uppercase","name":"country","in":"query"},{"schema":{"type":"string","pattern":"^[a-z]{2}$"},"required":false,"name":"lang","in":"query"},{"schema":{"type":"string","enum":["xs","sm","md","lg","xl"]},"required":false,"name":"screen","in":"query"},{"schema":{"type":"string","enum":["0","1","true","false"]},"required":false,"name":"converted","in":"query"},{"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"required":false,"name":"has","in":"query"},{"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"required":false,"name":"goal","in":"query"},{"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"required":false,"name":"event","in":"query"},{"schema":{"type":"string","enum":["any","none","gclid","gbraid","wbraid","fbclid","li_fat_id","ttclid","msclkid"],"description":"any/none or a specific click id present on the session"},"required":false,"description":"any/none or a specific click id present on the session","name":"click_id","in":"query"},{"schema":{"type":"string","enum":["paid","organic"],"description":"paid = an ad click id or a paid utm_medium (cpc, paid, …) on the session; organic = neither"},"required":false,"description":"paid = an ad click id or a paid utm_medium (cpc, paid, …) on the session; organic = neither","name":"traffic","in":"query"},{"schema":{"type":"string","enum":["new","memory","storage","hash"]},"required":false,"name":"stitch","in":"query"},{"schema":{"type":"string","enum":["0","1","true","false"]},"required":false,"name":"consent","in":"query"},{"schema":{"type":"string","enum":["0","1","true","false"]},"required":false,"name":"include_test","in":"query"},{"schema":{"type":"string","pattern":"^-?\\d{1,9}$"},"required":false,"name":"min_relevance","in":"query"},{"schema":{"type":"string","pattern":"^-?\\d{1,9}$"},"required":false,"name":"max_relevance","in":"query"},{"schema":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,19}$","description":"Tier key, e.g. hot"},"required":false,"description":"Tier key, e.g. hot","name":"relevance_tier","in":"query"},{"schema":{"type":"string","enum":["google_ads","meta_ads","linkedin_ads","tiktok_ads"]},"required":false,"name":"ad_platform","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"ad_account_id","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"ad_campaign_id","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"ad_adset_id","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"ad_id","in":"query"},{"schema":{"type":"string","enum":["matched","unmatched"],"description":"Sessions with/without an ad-entity match"},"required":false,"description":"Sessions with/without an ad-entity match","name":"ad_match","in":"query"},{"schema":{"type":"string","enum":["day","week"]},"required":false,"name":"bucket","in":"query"}],"responses":{"200":{"description":"Daily/weekly spend next to sessions, relevant sessions and conversions","content":{"application/json":{"schema":{"type":"object","properties":{"filter":{"$ref":"#/components/schemas/FilterEcho"},"currency":{"type":"string"},"series":{"type":"array","items":{"$ref":"#/components/schemas/AdTimeseriesPoint"}},"notes":{"type":"array","items":{"type":"string"}}},"required":["filter","currency","series","notes"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/projects/{project}/ads/unmatched":{"get":{"operationId":"ads.unmatched","summary":"Paid sessions whose UTMs could not be tied to an ad entity (for manual mapping)","tags":["Ads"],"security":[{"SecretKey":["ads:read"]},{"UserSession":["ads:read"]}],"x-required-scopes":["ads:read"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":81,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)"},"required":true,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)","name":"project","in":"path"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Start day YYYY-MM-DD (project time zone, inclusive). Wins over preset."},"required":false,"description":"Start day YYYY-MM-DD (project time zone, inclusive). Wins over preset.","name":"from","in":"query"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"End day YYYY-MM-DD (inclusive). Default today."},"required":false,"description":"End day YYYY-MM-DD (inclusive). Default today.","name":"to","in":"query"},{"schema":{"type":"string","enum":["today","yesterday","7d","14d","30d","90d","365d","this_month","last_month","all"],"description":"Date range when from/to are absent. Default 30d; all = last 731 days."},"required":false,"description":"Date range when from/to are absent. Default 30d; all = last 731 days.","name":"preset","in":"query"},{"schema":{"type":"string","pattern":"^\\/[A-Za-z0-9/._~:-]{0,199}$","description":"Canonical page path, e.g. /pricing"},"required":false,"description":"Canonical page path, e.g. /pricing","name":"page","in":"query"},{"schema":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,39}$","description":"Page group key from the project config"},"required":false,"description":"Page group key from the project config","name":"page_group","in":"query"},{"schema":{"type":"string","enum":["any","entry","exit"],"description":"Session metrics: any = a pageview on page/page_group (default), entry = entered there, exit = left there"},"required":false,"description":"Session metrics: any = a pageview on page/page_group (default), entry = entered there, exit = left there","name":"page_mode","in":"query"},{"schema":{"type":"string","enum":["google_ads","google_organic","bing","search_other","meta","linkedin","tiktok","social_other","email","ai_assistant","referral","direct","other"]},"required":false,"name":"channel","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_source","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_medium","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_campaign","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_content","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_term","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"utm_id","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200,"description":"Entry referrer host, e.g. www.google.com"},"required":false,"description":"Entry referrer host, e.g. www.google.com","name":"ref_host","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200,"description":"Page variant of the entry pageview"},"required":false,"description":"Page variant of the entry pageview","name":"variant","in":"query"},{"schema":{"type":"string","enum":["mobile","tablet","desktop","unknown"]},"required":false,"name":"device","in":"query"},{"schema":{"type":"string","enum":["chrome","safari","firefox","edge","samsung","opera","other"]},"required":false,"name":"browser","in":"query"},{"schema":{"type":"string","enum":["windows","macos","ios","android","linux","chromeos","other"]},"required":false,"name":"os","in":"query"},{"schema":{"type":"string","pattern":"^[A-Z]{2}$","description":"ISO country code, uppercase"},"required":false,"description":"ISO country code, uppercase","name":"country","in":"query"},{"schema":{"type":"string","pattern":"^[a-z]{2}$"},"required":false,"name":"lang","in":"query"},{"schema":{"type":"string","enum":["xs","sm","md","lg","xl"]},"required":false,"name":"screen","in":"query"},{"schema":{"type":"string","enum":["0","1","true","false"]},"required":false,"name":"converted","in":"query"},{"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"required":false,"name":"has","in":"query"},{"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"required":false,"name":"goal","in":"query"},{"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"required":false,"name":"event","in":"query"},{"schema":{"type":"string","enum":["any","none","gclid","gbraid","wbraid","fbclid","li_fat_id","ttclid","msclkid"],"description":"any/none or a specific click id present on the session"},"required":false,"description":"any/none or a specific click id present on the session","name":"click_id","in":"query"},{"schema":{"type":"string","enum":["paid","organic"],"description":"paid = an ad click id or a paid utm_medium (cpc, paid, …) on the session; organic = neither"},"required":false,"description":"paid = an ad click id or a paid utm_medium (cpc, paid, …) on the session; organic = neither","name":"traffic","in":"query"},{"schema":{"type":"string","enum":["new","memory","storage","hash"]},"required":false,"name":"stitch","in":"query"},{"schema":{"type":"string","enum":["0","1","true","false"]},"required":false,"name":"consent","in":"query"},{"schema":{"type":"string","enum":["0","1","true","false"]},"required":false,"name":"include_test","in":"query"},{"schema":{"type":"string","pattern":"^-?\\d{1,9}$"},"required":false,"name":"min_relevance","in":"query"},{"schema":{"type":"string","pattern":"^-?\\d{1,9}$"},"required":false,"name":"max_relevance","in":"query"},{"schema":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,19}$","description":"Tier key, e.g. hot"},"required":false,"description":"Tier key, e.g. hot","name":"relevance_tier","in":"query"},{"schema":{"type":"string","enum":["google_ads","meta_ads","linkedin_ads","tiktok_ads"]},"required":false,"name":"ad_platform","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"ad_account_id","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"ad_campaign_id","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"ad_adset_id","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":200},"required":false,"name":"ad_id","in":"query"},{"schema":{"type":"string","enum":["matched","unmatched"],"description":"Sessions with/without an ad-entity match"},"required":false,"description":"Sessions with/without an ad-entity match","name":"ad_match","in":"query"},{"schema":{"type":"string","pattern":"^\\d{1,6}$"},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"Paid sessions whose UTMs could not be tied to an ad entity (for manual mapping)","content":{"application/json":{"schema":{"type":"object","properties":{"filter":{"$ref":"#/components/schemas/FilterEcho"},"rows":{"type":"array","items":{"$ref":"#/components/schemas/UnmatchedUtmRow"}}},"required":["filter","rows"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/projects/{project}/ads/entities":{"get":{"operationId":"ads.entities","summary":"Synced campaigns, ad sets and ads (search by name/id)","tags":["Ads"],"security":[{"SecretKey":["ads:read"]},{"UserSession":["ads:read"]}],"x-required-scopes":["ads:read"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":81,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)"},"required":true,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)","name":"project","in":"path"},{"schema":{"type":"string","enum":["google_ads","meta_ads","linkedin_ads","tiktok_ads"]},"required":false,"name":"platform","in":"query"},{"schema":{"type":"string","enum":["campaign","adset","ad"]},"required":false,"name":"level","in":"query"},{"schema":{"type":"string","maxLength":100},"required":false,"name":"q","in":"query"},{"schema":{"type":"string","pattern":"^\\d{1,6}$"},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"Synced campaigns, ad sets and ads (search by name/id)","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/AdEntity"}}},"required":["data"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/projects/{project}/ads/mapping-rules":{"get":{"operationId":"ads.mappingRules.list","summary":"Manual UTM → ad entity mapping rules","tags":["Ads"],"security":[{"SecretKey":["ads:read"]},{"UserSession":["ads:read"]}],"x-required-scopes":["ads:read"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":81,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)"},"required":true,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)","name":"project","in":"path"}],"responses":{"200":{"description":"Manual UTM → ad entity mapping rules","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/AdMappingRule"}}},"required":["data"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"post":{"operationId":"ads.mappingRules.create","summary":"Create a mapping rule (sessions are re-matched in the background)","tags":["Ads"],"security":[{"SecretKey":["ads:write"]},{"UserSession":["ads:write"]}],"x-required-scopes":["ads:write"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":81,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)"},"required":true,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)","name":"project","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdMappingRuleWrite"}}}},"responses":{"201":{"description":"Create a mapping rule (sessions are re-matched in the background)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdMappingRule"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/projects/{project}/ads/mapping-rules/{id}":{"delete":{"operationId":"ads.mappingRules.delete","summary":"Delete a mapping rule","tags":["Ads"],"security":[{"SecretKey":["ads:write"]},{"UserSession":["ads:write"]}],"x-required-scopes":["ads:write"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":81,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)"},"required":true,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)","name":"project","in":"path"},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"Delete a mapping rule"},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/projects/{project}/ads/utm-templates":{"get":{"operationId":"ads.utmTemplates","summary":"Recommended ID-based UTM templates per platform","tags":["Ads"],"security":[{"SecretKey":["ads:read"]},{"UserSession":["ads:read"]}],"x-required-scopes":["ads:read"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":81,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)"},"required":true,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)","name":"project","in":"path"}],"responses":{"200":{"description":"Recommended ID-based UTM templates per platform","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/UtmTemplate"}}},"required":["data"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/webhooks/composio":{"post":{"operationId":"ads.webhook","summary":"Composio webhook (connected account expired/activated); signature verified","tags":["Ads"],"security":[],"x-required-scopes":[],"responses":{"204":{"description":"Composio webhook (connected account expired/activated); signature verified"},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/setup/frameworks":{"get":{"operationId":"setup.frameworks","summary":"Supported frameworks and proxy options","tags":["Setup"],"security":[],"x-required-scopes":[],"responses":{"200":{"description":"Supported frameworks and proxy options","content":{"application/json":{"schema":{"type":"object","properties":{"frameworks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["next-app","next-pages","react-vite","astro","wordpress","webflow-html","shopify","other"]},"name":{"type":"string"},"docs":{"type":"string"}},"required":["id","name","docs"]}}},"required":["frameworks"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/setup/detect":{"post":{"operationId":"setup.detect","summary":"Detect framework/router/proxy option from package.json dependencies and a file list","tags":["Setup"],"security":[],"x-required-scopes":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetectStackInput"}}}},"responses":{"200":{"description":"Detect framework/router/proxy option from package.json dependencies and a file list","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetectStackResult"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/setup/instructions":{"get":{"operationId":"setup.instructions","summary":"Ordered install steps (files, code, env vars, commands) for a framework","tags":["Setup"],"security":[],"x-required-scopes":[],"parameters":[{"schema":{"type":"string","enum":["next-app","next-pages","react-vite","astro","wordpress","webflow-html","shopify","other"]},"required":true,"name":"framework","in":"query"},{"schema":{"type":"string","enum":["route-handler","cloudflare-worker","nginx","netlify","wordpress","cname","none"],"default":"none"},"required":false,"name":"proxy","in":"query"},{"schema":{"type":"string","enum":["none","custom","cookiebot","usercentrics","complianz","borlabs","google_consent_mode"],"default":"none"},"required":false,"name":"consent","in":"query"},{"schema":{"type":"string","enum":["true","false"],"default":true},"required":false,"name":"typescript","in":"query"},{"schema":{"type":"string","maxLength":100},"required":false,"name":"project","in":"query"}],"responses":{"200":{"description":"Ordered install steps (files, code, env vars, commands) for a framework","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetupInstructions"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/projects/{project}/setup/snippet":{"get":{"operationId":"setup.snippet","summary":"Install code with the project's real publishable key, API origin and proxy path","tags":["Setup"],"security":[{"SecretKey":["project:admin"]},{"UserSession":["project:admin"]}],"x-required-scopes":["project:admin"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":81,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)"},"required":true,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)","name":"project","in":"path"},{"schema":{"type":"string","enum":["next-app","next-pages","react-vite","astro","wordpress","webflow-html","shopify","other"]},"required":true,"name":"framework","in":"query"},{"schema":{"type":"string","enum":["route-handler","cloudflare-worker","nginx","netlify","wordpress","cname","none"],"default":"none"},"required":false,"name":"proxy","in":"query"},{"schema":{"type":"string","enum":["none","custom","cookiebot","usercentrics","complianz","borlabs","google_consent_mode"],"default":"none"},"required":false,"name":"consent","in":"query"},{"schema":{"type":"string","enum":["true","false"],"default":true},"required":false,"name":"typescript","in":"query"}],"responses":{"200":{"description":"Install code with the project's real publishable key, API origin and proxy path","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetupInstructions"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/projects/{project}/setup/verify":{"post":{"operationId":"setup.verify","summary":"Verify an installation: fetch the page (SSRF-guarded), check snippet/proxy/CSP, look for recent events","tags":["Setup"],"security":[{"SecretKey":["project:admin"]},{"UserSession":["project:admin"]}],"x-required-scopes":["project:admin"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":81,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)"},"required":true,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)","name":"project","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyInstallationInput"}}}},"responses":{"200":{"description":"Verify an installation: fetch the page (SSRF-guarded), check snippet/proxy/CSP, look for recent events","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyInstallationResult"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/events/validate":{"post":{"operationId":"events.validate","summary":"Validate a custom event payload against the built-in catalog (and a project's schemas when authorized)","tags":["Events"],"security":[],"x-required-scopes":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventValidate"}}}},"responses":{"200":{"description":"Validate a custom event payload against the built-in catalog (and a project's schemas when authorized)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventValidateResult"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/projects/{project}/sql":{"post":{"operationId":"sql.query","summary":"Read-only SQL over the project's analytics tables (one SELECT/WITH, row-level isolated)","tags":["Analytics"],"security":[{"SecretKey":["analytics:read"]},{"UserSession":["analytics:read"]}],"x-required-scopes":["analytics:read"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":81,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)"},"required":true,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)","name":"project","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"query":{"type":"string","minLength":1,"maxLength":8000},"maxRows":{"type":"integer","minimum":1,"maximum":500,"default":200}},"required":["query"],"additionalProperties":false}}}},"responses":{"200":{"description":"Read-only SQL over the project's analytics tables (one SELECT/WITH, row-level isolated)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SqlResult"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/projects/{project}/schema":{"get":{"operationId":"schema.get","summary":"Tables and columns available to SQL, filter semantics, conventions","tags":["Analytics"],"security":[{"SecretKey":["analytics:read"]},{"UserSession":["analytics:read"]}],"x-required-scopes":["analytics:read"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":81,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)"},"required":true,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)","name":"project","in":"path"}],"responses":{"200":{"description":"Tables and columns available to SQL, filter semantics, conventions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SchemaDoc"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/auth/oauth-grants":{"get":{"operationId":"oauthGrants.mine","summary":"Connected apps (OAuth grants) of the logged-in user","tags":["Auth"],"security":[{"UserSession":[]}],"x-required-scopes":[],"responses":{"200":{"description":"Connected apps (OAuth grants) of the logged-in user","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/OAuthGrant"}}},"required":["data"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/oauth-grants":{"get":{"operationId":"oauthGrants.list","summary":"OAuth grants into the organization (all members)","tags":["Organizations"],"security":[{"SecretKey":["org:admin"]},{"UserSession":["org:admin"]}],"x-required-scopes":["org:admin"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"required":true,"name":"org","in":"path"}],"responses":{"200":{"description":"OAuth grants into the organization (all members)","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/OAuthGrant"}}},"required":["data"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/orgs/{org}/oauth-grants/{id}":{"delete":{"operationId":"oauthGrants.revoke","summary":"Revoke an OAuth grant (all its tokens)","tags":["Organizations"],"security":[{"SecretKey":[]},{"UserSession":[]}],"x-required-scopes":[],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":64},"required":true,"name":"org","in":"path"},{"schema":{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"Revoke an OAuth grant (all its tokens)"},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/projects/{project}/setup/status":{"get":{"operationId":"setup.status","summary":"Onboarding status per step, derived from real data (tracking, goals, ad platforms, conversions, Claude/MCP, team)","tags":["Setup"],"security":[{"SecretKey":["analytics:read"]},{"UserSession":["analytics:read"]}],"x-required-scopes":["analytics:read"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":81,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)"},"required":true,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)","name":"project","in":"path"}],"responses":{"200":{"description":"Onboarding status per step, derived from real data (tracking, goals, ad platforms, conversions, Claude/MCP, team)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetupStatus"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/projects/{project}/setup":{"patch":{"operationId":"setup.progress","summary":"Wizard position, dismissal and manual step overrides (skip, re-open, team done)","description":"Each key in `steps` needs one of the step's scopes (goals: config:write, ads: ads:write, conversions: project:admin, ai: analytics:read, team: org:admin); `dismissed` needs project:admin; `lastStep` alone needs analytics:read. Returns the fresh status.","tags":["Setup"],"security":[{"SecretKey":["analytics:read"]},{"UserSession":["analytics:read"]}],"x-required-scopes":["analytics:read"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":81,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)"},"required":true,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)","name":"project","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetupProgressUpdate"}}}},"responses":{"200":{"description":"Wizard position, dismissal and manual step overrides (skip, re-open, team done)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetupStatus"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/projects/{project}/setup/installation":{"get":{"operationId":"setup.installation","summary":"Live installation check: hosts seen, SDK version, proxy, consent, custom events, last verification (test traffic included)","tags":["Setup"],"security":[{"SecretKey":["analytics:read"]},{"UserSession":["analytics:read"]}],"x-required-scopes":["analytics:read"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":81,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)"},"required":true,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)","name":"project","in":"path"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"since","in":"query"}],"responses":{"200":{"description":"Live installation check: hosts seen, SDK version, proxy, consent, custom events, last verification (test traffic included)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetupInstallation"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/projects/{project}/setup/prompts":{"get":{"operationId":"setup.prompts","summary":"Ready-made Claude Code prompts for this project (titles and descriptions)","tags":["Setup"],"security":[{"SecretKey":["analytics:read"]},{"UserSession":["analytics:read"]}],"x-required-scopes":["analytics:read"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":81,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)"},"required":true,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)","name":"project","in":"path"},{"schema":{"type":"string","enum":["de","en"],"default":"de"},"required":false,"name":"locale","in":"query"}],"responses":{"200":{"description":"Ready-made Claude Code prompts for this project (titles and descriptions)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetupPromptList"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/projects/{project}/setup/prompts/{kind}":{"get":{"operationId":"setup.prompt","summary":"One project-specific Claude Code prompt (never contains secrets)","description":"Kinds install, events and server_conversions need config:write or project:admin; mcp_analysis, troubleshoot and connection_test need analytics:read.","tags":["Setup"],"security":[{"SecretKey":["analytics:read"]},{"UserSession":["analytics:read"]}],"x-required-scopes":["analytics:read"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":81,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)"},"required":true,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)","name":"project","in":"path"},{"schema":{"type":"string","enum":["install","events","server_conversions","mcp_analysis","troubleshoot","connection_test"]},"required":true,"name":"kind","in":"path"},{"schema":{"type":"string","enum":["next-app","next-pages","react-vite","astro","wordpress","webflow-html","shopify","other","auto"],"default":"auto"},"required":false,"name":"stack","in":"query"},{"schema":{"type":"string","maxLength":300,"format":"uri"},"required":false,"name":"site_url","in":"query"},{"schema":{"type":"string","enum":["auto","on","off"],"default":"auto"},"required":false,"name":"proxy","in":"query"},{"schema":{"type":"string","enum":["de","en"],"default":"de"},"required":false,"name":"locale","in":"query"}],"responses":{"200":{"description":"One project-specific Claude Code prompt (never contains secrets)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetupPrompt"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/projects/{project}/setup/test-conversion":{"post":{"operationId":"setup.testConversion","summary":"Send one synthetic test conversion to a configured provider in its test mode and return the provider's answer","tags":["Setup"],"security":[{"SecretKey":["project:admin"]},{"UserSession":["project:admin"]}],"x-required-scopes":["project:admin"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":81,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)"},"required":true,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)","name":"project","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetupTestConversion"}}}},"responses":{"200":{"description":"Send one synthetic test conversion to a configured provider in its test mode and return the provider's answer","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetupTestConversionResult"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/projects/{project}/setup/mcp-activity":{"get":{"operationId":"setup.mcpActivity","summary":"Newest MCP calls for this project (Claude connection test)","tags":["Setup"],"security":[{"SecretKey":["analytics:read"]},{"UserSession":["analytics:read"]}],"x-required-scopes":["analytics:read"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":81,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)"},"required":true,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)","name":"project","in":"path"},{"schema":{"type":"string","pattern":"^\\d{1,6}$"},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"Newest MCP calls for this project (Claude connection test)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetupMcpActivity"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/projects/{project}/setup/detect-stack":{"post":{"operationId":"setup.detectStack","summary":"Guess the website's stack from its HTML (SSRF-guarded fetch of an allowed origin)","tags":["Setup"],"security":[{"SecretKey":["analytics:read"]},{"UserSession":["analytics:read"]}],"x-required-scopes":["analytics:read"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":81,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)"},"required":true,"description":"Project id, `project-slug` or `org-slug/project-slug` (URL-encode the slash as %2F)","name":"project","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetupDetectStack"}}}},"responses":{"200":{"description":"Guess the website's stack from its HTML (SSRF-guarded fetch of an allowed origin)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetupDetectStackResult"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"401":{"description":"Missing or invalid credentials","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"403":{"description":"Insufficient scope or sudo required","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"Not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/docs":{"get":{"operationId":"docs.list","summary":"Documentation index","tags":["Docs"],"security":[],"x-required-scopes":[],"responses":{"200":{"description":"Documentation index","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/DocSummary"}}},"required":["data"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/docs/search":{"get":{"operationId":"docs.search","summary":"Full-text search over guides and the API reference","tags":["Docs"],"security":[],"x-required-scopes":[],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":200},"required":true,"name":"q","in":"query"},{"schema":{"type":"string","pattern":"^\\d{1,6}$"},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"Full-text search over guides and the API reference","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/DocSearchHit"}}},"required":["data"]}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/docs/{slug}":{"get":{"operationId":"docs.get","summary":"One guide as markdown (slug with slashes URL-encoded or as path segments)","tags":["Docs"],"security":[],"x-required-scopes":[],"parameters":[{"schema":{"type":"string","pattern":"^[a-z0-9][a-z0-9/_-]{0,120}$"},"required":true,"name":"slug","in":"path"}],"responses":{"200":{"description":"One guide as markdown (slug with slashes URL-encoded or as path segments)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Doc"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/docs/{slug}.md":{"get":{"operationId":"docs.getMarkdown","summary":"One guide as raw markdown (links point to other .md guides)","tags":["Docs"],"security":[],"x-required-scopes":[],"parameters":[{"schema":{"type":"string","pattern":"^[a-z0-9][a-z0-9/_-]{0,120}$"},"required":true,"name":"slug","in":"path"}],"responses":{"200":{"description":"One guide as raw markdown (links point to other .md guides)","content":{"text/markdown":{"schema":{"type":"string"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Validation failed","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/docs/api.md":{"get":{"operationId":"docs.referenceMarkdown","summary":"API reference as markdown (every endpoint with auth, scopes, parameters)","tags":["Docs"],"security":[],"x-required-scopes":[],"responses":{"200":{"description":"API reference as markdown (every endpoint with auth, scopes, parameters)","content":{"text/markdown":{"schema":{"type":"string"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/llms.txt":{"get":{"operationId":"docs.llms","summary":"llms.txt index of the documentation (https://llmstxt.org)","tags":["Docs"],"security":[],"x-required-scopes":[],"responses":{"200":{"description":"llms.txt index of the documentation (https://llmstxt.org)","content":{"text/plain":{"schema":{"type":"string"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/llms-full.txt":{"get":{"operationId":"docs.llmsFull","summary":"Every guide concatenated as markdown, for LLM context","tags":["Docs"],"security":[],"x-required-scopes":[],"responses":{"200":{"description":"Every guide concatenated as markdown, for LLM context","content":{"text/plain":{"schema":{"type":"string"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/docs/api":{"get":{"operationId":"docs.reference","summary":"Interactive API reference (Scalar) rendered from the OpenAPI document","tags":["Docs"],"security":[],"x-required-scopes":[],"responses":{"200":{"description":"Interactive API reference (Scalar) rendered from the OpenAPI document","content":{"text/html":{"schema":{"type":"string"}}}},"400":{"description":"Bad request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limited","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Database unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}}},"webhooks":{}}