{"openapi":"3.1.0","info":{"title":"WilderLink API","version":"1.0.0","description":"REST API for WilderLink deep links, deferred matching, analytics, QR codes, domains, app profiles, teams, API keys, and webhooks."},"servers":[{"url":"https://api.example.com","description":"Configured API origin"}],"tags":[{"name":"Auth"},{"name":"Public deep linking"},{"name":"External API key"},{"name":"Organizations"},{"name":"Domains"},{"name":"App profiles"},{"name":"Links"},{"name":"Bio pages"},{"name":"Analytics"},{"name":"Reports"},{"name":"AI"},{"name":"API keys"},{"name":"Webhooks"},{"name":"Audit logs"},{"name":"Public assets"}],"paths":{"/health":{"get":{"tags":["Public assets"],"summary":"Health check","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Health"}}}},"default":{"$ref":"#/components/responses/Error"}}}},"/api/v1/auth/register":{"post":{"tags":["Auth"],"summary":"Register user and organization","responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthSession"}}}},"default":{"$ref":"#/components/responses/Error"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterInput"}}}}}},"/api/v1/auth/login":{"post":{"tags":["Auth"],"summary":"Login with email and password","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthSession"}}}},"default":{"$ref":"#/components/responses/Error"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginInput"}}}}}},"/api/v1/auth/login/2fa":{"post":{"tags":["Auth"],"summary":"Complete a two-factor login challenge","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthSession"}}}},"default":{"$ref":"#/components/responses/Error"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TwoFactorLoginInput"}}}}}},"/api/v1/auth/sso/start":{"get":{"tags":["Auth"],"summary":"Start organization SSO login","responses":{"302":{"description":"Redirects to the identity provider"},"default":{"$ref":"#/components/responses/Error"}},"parameters":[{"name":"orgSlug","in":"query","required":false,"schema":{"type":"string"}},{"name":"returnTo","in":"query","required":false,"schema":{"type":"string"}}]}},"/api/v1/auth/sso/callback":{"get":{"tags":["Auth"],"summary":"Handle SSO callback","responses":{"302":{"description":"Redirects to dashboard"},"default":{"$ref":"#/components/responses/Error"}},"parameters":[{"name":"code","in":"query","required":false,"schema":{"type":"string"}},{"name":"state","in":"query","required":false,"schema":{"type":"string"}}]}},"/api/v1/auth/me":{"get":{"tags":["Auth"],"summary":"Get current user and organizations","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthSession"}}}},"default":{"$ref":"#/components/responses/Error"}},"security":[{"bearerAuth":[]}]}},"/api/v1/auth/2fa":{"get":{"tags":["Auth"],"summary":"Get two-factor status","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TwoFactorStatus"}}}},"default":{"$ref":"#/components/responses/Error"}},"security":[{"bearerAuth":[]}]}},"/api/v1/auth/2fa/setup":{"post":{"tags":["Auth"],"summary":"Create a two-factor setup secret","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TwoFactorSetup"}}}},"default":{"$ref":"#/components/responses/Error"}},"security":[{"bearerAuth":[]}]}},"/api/v1/auth/2fa/enable":{"post":{"tags":["Auth"],"summary":"Enable two-factor authentication","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TwoFactorEnabled"}}}},"default":{"$ref":"#/components/responses/Error"}},"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CodeInput"}}}}}},"/api/v1/auth/2fa/disable":{"post":{"tags":["Auth"],"summary":"Disable two-factor authentication","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnyJson"}}}},"default":{"$ref":"#/components/responses/Error"}},"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DisableTwoFactorInput"}}}}}},"/api/v1/resolve":{"get":{"tags":["Public deep linking"],"summary":"Resolve a direct Universal Link or Android App Link","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResolveResponse"}}}},"default":{"$ref":"#/components/responses/Error"}},"parameters":[{"name":"domain","in":"query","required":true,"schema":{"type":"string"}},{"name":"slug","in":"query","required":true,"schema":{"type":"string"}},{"name":"pathPrefix","in":"query","required":false,"schema":{"type":"string"}},{"name":"platform","in":"query","required":false,"schema":{"type":"string","enum":["ios","android","desktop","other"]}},{"name":"password","in":"query","required":false,"schema":{"type":"string"}},{"name":"deviceType","in":"query","required":false,"schema":{"type":"string"}},{"name":"browser","in":"query","required":false,"schema":{"type":"string"}},{"name":"deviceVendor","in":"query","required":false,"schema":{"type":"string"}},{"name":"deviceModel","in":"query","required":false,"schema":{"type":"string"}},{"name":"country","in":"query","required":false,"schema":{"type":"string"}},{"name":"region","in":"query","required":false,"schema":{"type":"string"}},{"name":"city","in":"query","required":false,"schema":{"type":"string"}},{"name":"language","in":"query","required":false,"schema":{"type":"string"}},{"name":"osVersion","in":"query","required":false,"schema":{"type":"string"}}]}},"/api/v1/match":{"post":{"tags":["Public deep linking"],"summary":"Claim a deferred deep-link match token","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MatchResponse"}}}},"default":{"$ref":"#/components/responses/Error"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MatchInput"}}}}}},"/api/v1/match/install-attribution":{"post":{"tags":["Public deep linking"],"summary":"Claim an install attribution token","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MatchResponse"}}}},"default":{"$ref":"#/components/responses/Error"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InstallAttributionInput"}}}}}},"/api/v1/public/dashboard-branding":{"get":{"tags":["Public assets"],"summary":"Resolve white-label dashboard branding for a hostname","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardBranding"}}}},"default":{"$ref":"#/components/responses/Error"}},"parameters":[{"name":"hostname","in":"query","required":true,"schema":{"type":"string"}}]}},"/api/v1/public/app-icons/apps/{appId}":{"get":{"tags":["Public assets"],"summary":"Get app profile icon","responses":{"200":{"description":"Image","content":{"image/png":{"schema":{"type":"string","format":"binary"}}}},"default":{"$ref":"#/components/responses/Error"}},"parameters":[{"name":"appId","in":"path","required":true,"schema":{"type":"string"}}]}},"/api/v1/public/app-icons/domains/{domainId}":{"get":{"tags":["Public assets"],"summary":"Get domain sharing icon","responses":{"200":{"description":"Image","content":{"image/png":{"schema":{"type":"string","format":"binary"}}}},"default":{"$ref":"#/components/responses/Error"}},"parameters":[{"name":"domainId","in":"path","required":true,"schema":{"type":"string"}}]}},"/api/v1/public/app-icons/organizations/{orgId}":{"get":{"tags":["Public assets"],"summary":"Get organization logo","responses":{"200":{"description":"Image","content":{"image/png":{"schema":{"type":"string","format":"binary"}}}},"default":{"$ref":"#/components/responses/Error"}},"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string"}}]}},"/api/v1/links":{"post":{"tags":["External API key"],"summary":"Create a link with an API key","responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Link"}}}},"default":{"$ref":"#/components/responses/Error"}},"security":[{"apiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkInput"}}}}}},"/api/v1/links/{linkId}":{"get":{"tags":["External API key"],"summary":"Get a link with an API key","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Link"}}}},"default":{"$ref":"#/components/responses/Error"}},"security":[{"apiKeyAuth":[]}],"parameters":[{"name":"linkId","in":"path","required":true,"schema":{"type":"string"}}]}},"/api/v1/links/{linkId}/qrcode":{"get":{"tags":["External API key"],"summary":"Export a QR code with an API key","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QrCodeResponse"}}}},"206":{"description":"SVG or PDF export","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"default":{"$ref":"#/components/responses/Error"}},"security":[{"apiKeyAuth":[]}],"parameters":[{"name":"linkId","in":"path","required":true,"schema":{"type":"string"}},{"name":"format","in":"query","required":false,"schema":{"type":"string","enum":["png","svg","pdf"]}},{"name":"dark","in":"query","required":false,"schema":{"type":"string"}},{"name":"light","in":"query","required":false,"schema":{"type":"string"}},{"name":"width","in":"query","required":false,"schema":{"type":"integer"}},{"name":"logo","in":"query","required":false,"schema":{"type":"string"}}]}},"/api/v1/events":{"post":{"tags":["External API key"],"summary":"Track a custom event","responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomEvent"}}}},"default":{"$ref":"#/components/responses/Error"}},"security":[{"apiKeyAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomEventInput"}}}}}},"/api/v1/organizations/{orgId}":{"get":{"tags":["Organizations"],"summary":"Get organization","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Organization"}}}},"default":{"$ref":"#/components/responses/Error"}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string"}}]},"patch":{"tags":["Organizations"],"summary":"Update organization branding/settings","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Organization"}}}},"default":{"$ref":"#/components/responses/Error"}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnyJson"}}}}}},"/api/v1/organizations/{orgId}/sso":{"get":{"tags":["Organizations"],"summary":"Get SSO configuration","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnyJson"}}}},"default":{"$ref":"#/components/responses/Error"}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string"}}]},"patch":{"tags":["Organizations"],"summary":"Update SSO configuration","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnyJson"}}}},"default":{"$ref":"#/components/responses/Error"}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnyJson"}}}}}},"/api/v1/organizations/{orgId}/members":{"get":{"tags":["Organizations"],"summary":"List members","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnyJson"}}}},"default":{"$ref":"#/components/responses/Error"}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string"}}]}},"/api/v1/organizations/{orgId}/members/invite":{"post":{"tags":["Organizations"],"summary":"Invite a member","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnyJson"}}}},"default":{"$ref":"#/components/responses/Error"}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteMemberInput"}}}}}},"/api/v1/organizations/{orgId}/members/{membershipId}":{"patch":{"tags":["Organizations"],"summary":"Update member role","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnyJson"}}}},"default":{"$ref":"#/components/responses/Error"}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string"}},{"name":"membershipId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoleInput"}}}}},"delete":{"tags":["Organizations"],"summary":"Remove member","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnyJson"}}}},"default":{"$ref":"#/components/responses/Error"}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string"}},{"name":"membershipId","in":"path","required":true,"schema":{"type":"string"}}]}},"/api/v1/organizations/{orgId}/domains":{"get":{"tags":["Domains"],"summary":"List domains","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Domain"}}}}},"default":{"$ref":"#/components/responses/Error"}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string"}}]},"post":{"tags":["Domains"],"summary":"Add domain","responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Domain"}}}},"default":{"$ref":"#/components/responses/Error"}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainInput"}}}}}},"/api/v1/organizations/{orgId}/domains/{domainId}/configuration":{"get":{"tags":["Domains"],"summary":"Get DNS/domain configuration","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnyJson"}}}},"default":{"$ref":"#/components/responses/Error"}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string"}},{"name":"domainId","in":"path","required":true,"schema":{"type":"string"}}]}},"/api/v1/organizations/{orgId}/domains/{domainId}/verify":{"post":{"tags":["Domains"],"summary":"Verify domain DNS and associations","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Domain"}}}},"default":{"$ref":"#/components/responses/Error"}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string"}},{"name":"domainId","in":"path","required":true,"schema":{"type":"string"}}]}},"/api/v1/organizations/{orgId}/domains/{domainId}/app-config":{"patch":{"tags":["Domains"],"summary":"Update domain app-link configuration","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Domain"}}}},"default":{"$ref":"#/components/responses/Error"}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string"}},{"name":"domainId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnyJson"}}}}}},"/api/v1/organizations/{orgId}/domains/{domainId}/dashboard":{"patch":{"tags":["Domains"],"summary":"Enable or disable white-label dashboard hosting","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Domain"}}}},"default":{"$ref":"#/components/responses/Error"}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string"}},{"name":"domainId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardHostingInput"}}}}}},"/api/v1/organizations/{orgId}/domains/{domainId}":{"delete":{"tags":["Domains"],"summary":"Delete domain","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnyJson"}}}},"default":{"$ref":"#/components/responses/Error"}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string"}},{"name":"domainId","in":"path","required":true,"schema":{"type":"string"}}]}},"/api/v1/organizations/{orgId}/apps":{"get":{"tags":["App profiles"],"summary":"List app profiles","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnyJson"}}}},"default":{"$ref":"#/components/responses/Error"}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string"}}]},"post":{"tags":["App profiles"],"summary":"Create app profile","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnyJson"}}}},"default":{"$ref":"#/components/responses/Error"}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppProfileInput"}}}}}},"/api/v1/organizations/{orgId}/apps/{appId}":{"patch":{"tags":["App profiles"],"summary":"Update app profile","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnyJson"}}}},"default":{"$ref":"#/components/responses/Error"}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string"}},{"name":"appId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppProfileInput"}}}}},"delete":{"tags":["App profiles"],"summary":"Delete app profile","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnyJson"}}}},"default":{"$ref":"#/components/responses/Error"}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string"}},{"name":"appId","in":"path","required":true,"schema":{"type":"string"}}]}},"/api/v1/organizations/{orgId}/links":{"get":{"tags":["Links"],"summary":"List links","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnyJson"}}}},"default":{"$ref":"#/components/responses/Error"}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string"}},{"name":"tag","in":"query","required":false,"schema":{"type":"string"}},{"name":"search","in":"query","required":false,"schema":{"type":"string"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer"}}]},"post":{"tags":["Links"],"summary":"Create link","responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Link"}}}},"default":{"$ref":"#/components/responses/Error"}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkInput"}}}}}},"/api/v1/organizations/{orgId}/links/bulk":{"post":{"tags":["Links"],"summary":"Bulk create links","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnyJson"}}}},"default":{"$ref":"#/components/responses/Error"}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkLinkInput"}}}}}},"/api/v1/organizations/{orgId}/links/utm/generate":{"post":{"tags":["Links"],"summary":"Generate UTM parameters from campaign context","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UtmGenerationResponse"}}}},"default":{"$ref":"#/components/responses/Error"}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UtmGenerationInput"}}}}}},"/api/v1/organizations/{orgId}/links/preview":{"post":{"tags":["Links"],"summary":"Preview deep-link resolution without recording analytics","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkPreviewResponse"}}}},"default":{"$ref":"#/components/responses/Error"}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkPreviewInput"}}}}}},"/api/v1/organizations/{orgId}/links/{linkId}":{"get":{"tags":["Links"],"summary":"Get link","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Link"}}}},"default":{"$ref":"#/components/responses/Error"}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string"}},{"name":"linkId","in":"path","required":true,"schema":{"type":"string"}}]},"patch":{"tags":["Links"],"summary":"Update link without changing short URL","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Link"}}}},"default":{"$ref":"#/components/responses/Error"}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string"}},{"name":"linkId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkInput"}}}}},"delete":{"tags":["Links"],"summary":"Delete link","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnyJson"}}}},"default":{"$ref":"#/components/responses/Error"}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string"}},{"name":"linkId","in":"path","required":true,"schema":{"type":"string"}}]}},"/api/v1/organizations/{orgId}/links/{linkId}/revisions":{"get":{"tags":["Links"],"summary":"List link version history","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnyJson"}}}},"default":{"$ref":"#/components/responses/Error"}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string"}},{"name":"linkId","in":"path","required":true,"schema":{"type":"string"}}]}},"/api/v1/organizations/{orgId}/links/{linkId}/safety/rescan":{"post":{"tags":["Links"],"summary":"Rescan link destination safety","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnyJson"}}}},"default":{"$ref":"#/components/responses/Error"}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string"}},{"name":"linkId","in":"path","required":true,"schema":{"type":"string"}}]}},"/api/v1/organizations/{orgId}/links/{linkId}/leads":{"get":{"tags":["Links"],"summary":"List captured leads for a link","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnyJson"}}}},"default":{"$ref":"#/components/responses/Error"}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string"}},{"name":"linkId","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer"}}]}},"/api/v1/organizations/{orgId}/links/{linkId}/leads/export.csv":{"get":{"tags":["Links"],"summary":"Export link leads CSV","responses":{"200":{"description":"CSV export","content":{"text/csv":{"schema":{"type":"string"}}}},"default":{"$ref":"#/components/responses/Error"}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string"}},{"name":"linkId","in":"path","required":true,"schema":{"type":"string"}}]}},"/api/v1/organizations/{orgId}/links/{linkId}/qrcode":{"get":{"tags":["Links"],"summary":"Export QR code","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QrCodeResponse"}}}},"default":{"$ref":"#/components/responses/Error"}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string"}},{"name":"linkId","in":"path","required":true,"schema":{"type":"string"}},{"name":"format","in":"query","required":false,"schema":{"type":"string","enum":["png","svg","pdf"]}},{"name":"dark","in":"query","required":false,"schema":{"type":"string"}},{"name":"light","in":"query","required":false,"schema":{"type":"string"}},{"name":"width","in":"query","required":false,"schema":{"type":"integer"}},{"name":"logo","in":"query","required":false,"schema":{"type":"string"}},{"name":"logoUrl","in":"query","required":false,"schema":{"type":"string"}}]}},"/api/v1/organizations/{orgId}/links/{linkId}/qrcode/style":{"post":{"tags":["AI"],"summary":"Generate AI QR style","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QrStyleResponse"}}}},"default":{"$ref":"#/components/responses/Error"}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string"}},{"name":"linkId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QrStyleInput"}}}}}},"/api/v1/organizations/{orgId}/bio-pages":{"get":{"tags":["Bio pages"],"summary":"List bio pages","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnyJson"}}}},"default":{"$ref":"#/components/responses/Error"}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string"}}]},"post":{"tags":["Bio pages"],"summary":"Create bio page","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnyJson"}}}},"default":{"$ref":"#/components/responses/Error"}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BioPageInput"}}}}}},"/api/v1/organizations/{orgId}/bio-pages/{bioPageId}":{"get":{"tags":["Bio pages"],"summary":"Get bio page","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnyJson"}}}},"default":{"$ref":"#/components/responses/Error"}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string"}},{"name":"bioPageId","in":"path","required":true,"schema":{"type":"string"}}]},"patch":{"tags":["Bio pages"],"summary":"Update bio page","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnyJson"}}}},"default":{"$ref":"#/components/responses/Error"}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string"}},{"name":"bioPageId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BioPageInput"}}}}},"delete":{"tags":["Bio pages"],"summary":"Delete bio page","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnyJson"}}}},"default":{"$ref":"#/components/responses/Error"}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string"}},{"name":"bioPageId","in":"path","required":true,"schema":{"type":"string"}}]}},"/api/v1/organizations/{orgId}/analytics/overview":{"get":{"tags":["Analytics"],"summary":"Get analytics overview","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyticsOverview"}}}},"default":{"$ref":"#/components/responses/Error"}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string"}},{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"linkId","in":"query","required":false,"schema":{"type":"string"}},{"name":"includeBots","in":"query","required":false,"schema":{"type":"boolean"}}]}},"/api/v1/organizations/{orgId}/analytics/overview/stream":{"get":{"tags":["Analytics"],"summary":"Stream live analytics overview via SSE","responses":{"200":{"description":"text/event-stream analytics snapshots","content":{"text/event-stream":{"schema":{"type":"string"}}}},"default":{"$ref":"#/components/responses/Error"}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string"}},{"name":"intervalMs","in":"query","required":false,"schema":{"type":"integer"}}]}},"/api/v1/organizations/{orgId}/analytics/insights":{"get":{"tags":["Analytics"],"summary":"Get AI campaign insights","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignInsightsResponse"}}}},"default":{"$ref":"#/components/responses/Error"}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string"}},{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"linkId","in":"query","required":false,"schema":{"type":"string"}},{"name":"includeBots","in":"query","required":false,"schema":{"type":"boolean"}}]}},"/api/v1/organizations/{orgId}/analytics/anomalies":{"get":{"tags":["Analytics"],"summary":"Detect traffic anomalies","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrafficAnomaliesResponse"}}}},"default":{"$ref":"#/components/responses/Error"}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string"}},{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"linkId","in":"query","required":false,"schema":{"type":"string"}},{"name":"includeBots","in":"query","required":false,"schema":{"type":"boolean"}}]}},"/api/v1/organizations/{orgId}/analytics/conversion-prediction":{"get":{"tags":["Analytics"],"summary":"Predict conversion likelihood","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversionPredictionResponse"}}}},"default":{"$ref":"#/components/responses/Error"}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string"}},{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"linkId","in":"query","required":false,"schema":{"type":"string"}},{"name":"includeBots","in":"query","required":false,"schema":{"type":"boolean"}}]}},"/api/v1/organizations/{orgId}/analytics/best-destination":{"get":{"tags":["Analytics"],"summary":"Recommend best destination","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BestDestinationResponse"}}}},"default":{"$ref":"#/components/responses/Error"}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string"}},{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"linkId","in":"query","required":false,"schema":{"type":"string"}},{"name":"includeBots","in":"query","required":false,"schema":{"type":"boolean"}}]}},"/api/v1/organizations/{orgId}/analytics/broken-campaigns":{"get":{"tags":["Analytics"],"summary":"Detect broken campaign signals","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrokenCampaignDetectionsResponse"}}}},"default":{"$ref":"#/components/responses/Error"}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string"}},{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"linkId","in":"query","required":false,"schema":{"type":"string"}},{"name":"includeBots","in":"query","required":false,"schema":{"type":"boolean"}}]}},"/api/v1/organizations/{orgId}/analytics/top-links":{"get":{"tags":["Analytics"],"summary":"Get top links","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnyJson"}}}},"default":{"$ref":"#/components/responses/Error"}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer"}},{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date-time"}}]}},"/api/v1/organizations/{orgId}/analytics/export.csv":{"get":{"tags":["Analytics"],"summary":"Export click analytics CSV","responses":{"200":{"description":"Click analytics CSV","content":{"text/csv":{"schema":{"type":"string"}}}},"default":{"$ref":"#/components/responses/Error"}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string"}},{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"linkId","in":"query","required":false,"schema":{"type":"string"}},{"name":"includeBots","in":"query","required":false,"schema":{"type":"boolean"}}]}},"/api/v1/organizations/{orgId}/analytics/abuse-queue":{"get":{"tags":["Analytics"],"summary":"List bot/spam review queue","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnyJson"}}}},"default":{"$ref":"#/components/responses/Error"}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string"}},{"name":"status","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer"}}]}},"/api/v1/organizations/{orgId}/analytics/abuse-queue/{clickId}":{"patch":{"tags":["Analytics"],"summary":"Update bot/spam review status","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnyJson"}}}},"default":{"$ref":"#/components/responses/Error"}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string"}},{"name":"clickId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AbuseReviewInput"}}}}}},"/api/v1/organizations/{orgId}/analytics/reports":{"get":{"tags":["Reports"],"summary":"List saved reports","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnyJson"}}}},"default":{"$ref":"#/components/responses/Error"}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string"}}]},"post":{"tags":["Reports"],"summary":"Create saved report","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnyJson"}}}},"default":{"$ref":"#/components/responses/Error"}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportInput"}}}}}},"/api/v1/organizations/{orgId}/analytics/reports/{reportId}":{"patch":{"tags":["Reports"],"summary":"Update saved report","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnyJson"}}}},"default":{"$ref":"#/components/responses/Error"}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string"}},{"name":"reportId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportInput"}}}}},"delete":{"tags":["Reports"],"summary":"Delete saved report","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnyJson"}}}},"default":{"$ref":"#/components/responses/Error"}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string"}},{"name":"reportId","in":"path","required":true,"schema":{"type":"string"}}]}},"/api/v1/organizations/{orgId}/analytics/reports/{reportId}/export.csv":{"get":{"tags":["Reports"],"summary":"Export saved report CSV","responses":{"200":{"description":"Saved report CSV","content":{"text/csv":{"schema":{"type":"string"}}}},"default":{"$ref":"#/components/responses/Error"}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string"}},{"name":"reportId","in":"path","required":true,"schema":{"type":"string"}}]}},"/api/v1/organizations/{orgId}/ai/marketing-assistant":{"post":{"tags":["AI"],"summary":"Generate marketing assistant recommendations","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketingAssistantResponse"}}}},"default":{"$ref":"#/components/responses/Error"}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketingAssistantInput"}}}}}},"/api/v1/organizations/{orgId}/api-keys":{"get":{"tags":["API keys"],"summary":"List API keys","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnyJson"}}}},"default":{"$ref":"#/components/responses/Error"}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string"}}]},"post":{"tags":["API keys"],"summary":"Create API key","responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyCreated"}}}},"default":{"$ref":"#/components/responses/Error"}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyInput"}}}}}},"/api/v1/organizations/{orgId}/api-keys/{keyId}":{"delete":{"tags":["API keys"],"summary":"Revoke API key","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnyJson"}}}},"default":{"$ref":"#/components/responses/Error"}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string"}},{"name":"keyId","in":"path","required":true,"schema":{"type":"string"}}]}},"/api/v1/organizations/{orgId}/webhooks":{"get":{"tags":["Webhooks"],"summary":"List webhooks","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnyJson"}}}},"default":{"$ref":"#/components/responses/Error"}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string"}}]},"post":{"tags":["Webhooks"],"summary":"Create webhook","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnyJson"}}}},"default":{"$ref":"#/components/responses/Error"}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookInput"}}}}}},"/api/v1/organizations/{orgId}/webhooks/{webhookId}":{"patch":{"tags":["Webhooks"],"summary":"Update webhook","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnyJson"}}}},"default":{"$ref":"#/components/responses/Error"}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string"}},{"name":"webhookId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookInput"}}}}},"delete":{"tags":["Webhooks"],"summary":"Delete webhook","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnyJson"}}}},"default":{"$ref":"#/components/responses/Error"}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string"}},{"name":"webhookId","in":"path","required":true,"schema":{"type":"string"}}]}},"/api/v1/organizations/{orgId}/audit-logs":{"get":{"tags":["Audit logs"],"summary":"List audit logs","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnyJson"}}}},"default":{"$ref":"#/components/responses/Error"}},"security":[{"bearerAuth":[]}],"parameters":[{"name":"orgId","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer"}},{"name":"action","in":"query","required":false,"schema":{"type":"string"}},{"name":"resourceType","in":"query","required":false,"schema":{"type":"string"}}]}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"apiKeyAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"Use the value `ApiKey dlk_xxx`."}},"responses":{"Error":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"schemas":{"AnyJson":{"type":"object","additionalProperties":true},"Error":{"type":"object","properties":{"error":{"type":"string"},"details":{"type":"array","items":{"type":"string"}}}},"Health":{"type":"object","properties":{"status":{"type":"string"},"time":{"type":"string","format":"date-time"},"security":{"$ref":"#/components/schemas/AnyJson"}}},"AuthSession":{"type":"object","properties":{"token":{"type":"string"},"user":{"$ref":"#/components/schemas/User"},"organizations":{"type":"array","items":{"$ref":"#/components/schemas/Organization"}}}},"User":{"type":"object","properties":{"_id":{"type":"string"},"email":{"type":"string","format":"email"},"name":{"type":"string"},"twoFactorEnabled":{"type":"boolean"}}},"Organization":{"type":"object","properties":{"_id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"},"branding":{"$ref":"#/components/schemas/Branding"}}},"Branding":{"type":"object","properties":{"displayName":{"type":"string"},"logoUrl":{"type":"string"},"accentColor":{"type":"string"},"supportUrl":{"type":"string"},"footerText":{"type":"string"}}},"RegisterInput":{"type":"object","required":["name","email","password","organizationName"],"properties":{"name":{"type":"string"},"email":{"type":"string","format":"email"},"password":{"type":"string"},"organizationName":{"type":"string"}}},"LoginInput":{"type":"object","required":["email","password"],"properties":{"email":{"type":"string","format":"email"},"password":{"type":"string"}}},"TwoFactorLoginInput":{"type":"object","required":["challengeToken","code"],"properties":{"challengeToken":{"type":"string"},"code":{"type":"string"}}},"TwoFactorStatus":{"type":"object","properties":{"enabled":{"type":"boolean"}}},"TwoFactorSetup":{"type":"object","properties":{"secret":{"type":"string"},"qrCodeDataUrl":{"type":"string"},"otpauthUrl":{"type":"string"}}},"TwoFactorEnabled":{"type":"object","properties":{"enabled":{"type":"boolean"},"recoveryCodes":{"type":"array","items":{"type":"string"}}}},"CodeInput":{"type":"object","required":["code"],"properties":{"code":{"type":"string"}}},"DisableTwoFactorInput":{"type":"object","properties":{"password":{"type":"string"},"code":{"type":"string"}}},"MatchInput":{"type":"object","required":["matchToken"],"properties":{"matchToken":{"type":"string"}}},"InstallAttributionInput":{"type":"object","properties":{"installAttributionToken":{"type":"string"},"campaignToken":{"type":"string"},"ct":{"type":"string"},"provider":{"type":"string"}}},"MatchResponse":{"type":"object","properties":{"matched":{"type":"boolean"},"installId":{"type":"string"},"openId":{"type":"string"},"deepLinkPayload":{"$ref":"#/components/schemas/AnyJson"},"destinationUrl":{"type":"string"},"installAttributionProvider":{"type":"string"}}},"ResolveResponse":{"type":"object","properties":{"title":{"type":"string"},"destinationUrl":{"type":"string"},"deepLinkPayload":{"$ref":"#/components/schemas/AnyJson"}}},"LinkInput":{"type":"object","properties":{"domainId":{"type":"string"},"appProfileId":{"type":"string"},"title":{"type":"string"},"slug":{"type":"string"},"defaultUrl":{"type":"string"},"pathPrefix":{"type":"string"},"rules":{"type":"array","items":{"$ref":"#/components/schemas/RoutingRule"}},"splitTargets":{"type":"array","items":{"$ref":"#/components/schemas/SplitTarget"}},"deepLinkPayload":{"$ref":"#/components/schemas/AnyJson"},"utm":{"$ref":"#/components/schemas/Utm"},"marketing":{"$ref":"#/components/schemas/MarketingAttribution"},"leadCapture":{"$ref":"#/components/schemas/AnyJson"},"retargetingPixels":{"type":"array","items":{"$ref":"#/components/schemas/AnyJson"}},"ctaOverlay":{"$ref":"#/components/schemas/AnyJson"},"startsAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time"},"maxClicks":{"type":"integer"},"tags":{"type":"array","items":{"type":"string"}}}},"RoutingRule":{"type":"object","properties":{"priority":{"type":"integer"},"conditions":{"type":"object","properties":{"platform":{"type":"array","items":{"type":"string","enum":["ios","android","desktop","other"]}},"deviceTypes":{"type":"array","items":{"type":"string"},"description":"Device type buckets such as mobile, tablet, desktop, console, or wearable."},"browsers":{"type":"array","items":{"type":"string"},"description":"Browser names from user-agent parsing, such as Chrome or Mobile Safari."},"deviceVendors":{"type":"array","items":{"type":"string"},"description":"Device vendors such as Apple, Samsung, Google, or Xiaomi."},"deviceModels":{"type":"array","items":{"type":"string"},"description":"Device models from user-agent parsing, such as iPhone or SM-G991B."},"countries":{"type":"array","items":{"type":"string"},"description":"ISO country codes such as IN, US, or AE."},"regions":{"type":"array","items":{"type":"string"},"description":"Region/state names from geo lookup, such as California."},"cities":{"type":"array","items":{"type":"string"},"description":"City names from geo lookup, such as San Francisco."},"languages":{"type":"array","items":{"type":"string"}},"minOsVersion":{"type":"string"},"maxOsVersion":{"type":"string"},"startTime":{"type":"string"},"endTime":{"type":"string"},"daysOfWeek":{"type":"array","items":{"type":"integer","minimum":0,"maximum":6}}}},"destinationUrl":{"type":"string"}}},"SplitTarget":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"destinationUrl":{"type":"string"},"weight":{"type":"integer"},"isActive":{"type":"boolean"}}},"Utm":{"type":"object","properties":{"source":{"type":"string"},"medium":{"type":"string"},"campaign":{"type":"string"},"term":{"type":"string"},"content":{"type":"string"}}},"UtmGenerationInput":{"type":"object","properties":{"destinationUrl":{"type":"string"},"title":{"type":"string"},"source":{"type":"string"},"channel":{"type":"string"},"platform":{"type":"string"},"medium":{"type":"string"},"campaignName":{"type":"string"},"campaign":{"type":"string"},"audience":{"type":"string"},"keyword":{"type":"string"},"term":{"type":"string"},"creative":{"type":"string"},"variant":{"type":"string"},"content":{"type":"string"}}},"UtmGenerationResponse":{"type":"object","properties":{"generatedAt":{"type":"string","format":"date-time"},"utm":{"$ref":"#/components/schemas/Utm"},"previewUrl":{"type":["string","null"]},"confidence":{"type":"integer"},"rationale":{"type":"array","items":{"type":"string"}},"warnings":{"type":"array","items":{"type":"string"}}}},"MarketingAttribution":{"type":"object","properties":{"referralCode":{"type":"string"},"affiliateId":{"type":"string"},"couponCode":{"type":"string"},"promoCode":{"type":"string"},"appendToDestination":{"type":"boolean"}}},"Link":{"allOf":[{"$ref":"#/components/schemas/LinkInput"},{"type":"object","properties":{"_id":{"type":"string"},"shortUrl":{"type":"string"},"clickCount":{"type":"integer"},"isActive":{"type":"boolean"},"safety":{"$ref":"#/components/schemas/AnyJson"}}}]},"BulkLinkInput":{"type":"object","properties":{"links":{"type":"array","items":{"$ref":"#/components/schemas/LinkInput"}}}},"LinkPreviewInput":{"type":"object","properties":{"shortUrl":{"type":"string"},"domain":{"type":"string"},"slug":{"type":"string"},"pathPrefix":{"type":"string"},"platform":{"type":"string"},"deviceType":{"type":"string"},"browser":{"type":"string"},"deviceVendor":{"type":"string"},"deviceModel":{"type":"string"},"osVersion":{"type":"string"},"language":{"type":"string"},"country":{"type":"string"},"region":{"type":"string"},"city":{"type":"string"},"password":{"type":"string"},"visitorId":{"type":"string"},"now":{"type":"string","format":"date-time"}}},"LinkPreviewResponse":{"type":"object","properties":{"ok":{"type":"boolean"},"blockers":{"type":"array","items":{"type":"string"}},"context":{"$ref":"#/components/schemas/AnyJson"},"link":{"$ref":"#/components/schemas/AnyJson"},"route":{"$ref":"#/components/schemas/AnyJson"},"ruleTrace":{"type":"array","items":{"$ref":"#/components/schemas/AnyJson"}},"safety":{"$ref":"#/components/schemas/AnyJson"},"deepLinkPayload":{"$ref":"#/components/schemas/AnyJson"}}},"QrCodeResponse":{"type":"object","properties":{"qrCodeDataUrl":{"type":"string"},"shortUrl":{"type":"string"}}},"QrStyleInput":{"type":"object","properties":{"campaignName":{"type":"string"},"source":{"type":"string"},"channel":{"type":"string"},"theme":{"type":"string"},"placement":{"type":"string"},"accentColor":{"type":"string"},"includeLogo":{"type":"boolean"}}},"QrStyleResponse":{"type":"object","properties":{"generatedAt":{"type":"string","format":"date-time"},"link":{"$ref":"#/components/schemas/AnyJson"},"style":{"type":"object","properties":{"name":{"type":"string"},"darkColor":{"type":"string"},"lightColor":{"type":"string"},"includeLogo":{"type":"boolean"},"errorCorrectionLevel":{"type":"string"},"margin":{"type":"integer"},"width":{"type":"integer"},"formatRecommendation":{"type":"string"},"query":{"type":"string"}}},"swatches":{"type":"array","items":{"$ref":"#/components/schemas/AnyJson"}},"confidence":{"type":"integer"},"rationale":{"type":"array","items":{"type":"string"}},"warnings":{"type":"array","items":{"type":"string"}}}},"CustomEventInput":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"linkId":{"type":"string"},"visitorId":{"type":"string"},"value":{"type":"number"},"metadata":{"$ref":"#/components/schemas/AnyJson"}}},"CustomEvent":{"allOf":[{"$ref":"#/components/schemas/CustomEventInput"},{"type":"object","properties":{"_id":{"type":"string"},"occurredAt":{"type":"string","format":"date-time"}}}]},"DashboardBranding":{"type":"object","properties":{"enabled":{"type":"boolean"},"organization":{"$ref":"#/components/schemas/Organization"},"branding":{"$ref":"#/components/schemas/Branding"}}},"Domain":{"type":"object","properties":{"_id":{"type":"string"},"hostname":{"type":"string"},"isVerified":{"type":"boolean"},"dashboard":{"$ref":"#/components/schemas/AnyJson"},"appConfig":{"$ref":"#/components/schemas/AnyJson"}}},"DomainInput":{"type":"object","required":["hostname"],"properties":{"hostname":{"type":"string"}}},"DashboardHostingInput":{"type":"object","properties":{"enabled":{"type":"boolean"},"isPrimary":{"type":"boolean"}}},"AppProfileInput":{"type":"object","properties":{"name":{"type":"string"},"pathPrefix":{"type":"string"},"ios":{"$ref":"#/components/schemas/AnyJson"},"android":{"$ref":"#/components/schemas/AnyJson"},"iconUrl":{"type":"string"}}},"BioPageInput":{"type":"object","properties":{"slug":{"type":"string"},"title":{"type":"string"},"bio":{"type":"string"},"domainId":{"type":"string"},"theme":{"$ref":"#/components/schemas/AnyJson"},"links":{"type":"array","items":{"$ref":"#/components/schemas/AnyJson"}},"isActive":{"type":"boolean"}}},"AnalyticsOverview":{"type":"object","properties":{"totalClicks":{"type":"integer"},"uniqueVisitors":{"type":"integer"},"installs":{"type":"integer"},"opens":{"type":"integer"},"matchedInstalls":{"type":"integer","description":"Legacy matched-click count retained for compatibility."},"byOpenSource":{"type":"array","items":{"$ref":"#/components/schemas/AnyJson"}},"byOpenPlatform":{"type":"array","items":{"$ref":"#/components/schemas/AnyJson"}},"conversionFunnel":{"type":"array","items":{"$ref":"#/components/schemas/AnyJson"}},"timeseries":{"type":"array","items":{"$ref":"#/components/schemas/AnyJson"}}}},"CampaignInsight":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["setup","opportunity","risk"]},"priority":{"type":"string","enum":["high","medium","low"]},"title":{"type":"string"},"summary":{"type":"string"},"recommendation":{"type":"string"},"metric":{"type":"string"},"evidence":{"type":"array","items":{"type":"string"}}}},"CampaignInsightsResponse":{"type":"object","properties":{"generatedAt":{"type":"string","format":"date-time"},"range":{"$ref":"#/components/schemas/AnyJson"},"summary":{"$ref":"#/components/schemas/AnyJson"},"insights":{"type":"array","items":{"$ref":"#/components/schemas/CampaignInsight"}}}},"TrafficAnomaly":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"severity":{"type":"string","enum":["high","medium","low"]},"title":{"type":"string"},"summary":{"type":"string"},"recommendation":{"type":"string"},"metric":{"type":"string"},"evidence":{"type":"array","items":{"type":"string"}}}},"TrafficAnomaliesResponse":{"type":"object","properties":{"generatedAt":{"type":"string","format":"date-time"},"range":{"$ref":"#/components/schemas/AnyJson"},"summary":{"$ref":"#/components/schemas/AnyJson"},"anomalies":{"type":"array","items":{"$ref":"#/components/schemas/TrafficAnomaly"}}}},"ConversionPredictionFactor":{"type":"object","properties":{"name":{"type":"string"},"impact":{"type":"string","enum":["positive","negative","neutral"]},"value":{"type":"string"},"explanation":{"type":"string"}}},"ConversionPrediction":{"type":"object","properties":{"score":{"type":"integer","minimum":0,"maximum":95},"label":{"type":"string","enum":["high","medium","low"]},"confidence":{"type":"string","enum":["high","medium","low"]},"predictedConversionRate":{"type":"number"},"projectedConversions":{"type":"integer"},"projectedClicks":{"type":"integer"},"horizonDays":{"type":"integer"},"factors":{"type":"array","items":{"$ref":"#/components/schemas/ConversionPredictionFactor"}},"recommendations":{"type":"array","items":{"type":"string"}},"baseline":{"$ref":"#/components/schemas/AnyJson"}}},"ConversionPredictionResponse":{"type":"object","properties":{"generatedAt":{"type":"string","format":"date-time"},"range":{"$ref":"#/components/schemas/AnyJson"},"summary":{"$ref":"#/components/schemas/AnyJson"},"prediction":{"$ref":"#/components/schemas/ConversionPrediction"}}},"DestinationCandidate":{"type":"object","properties":{"id":{"type":"string"},"linkId":{"type":"string"},"linkTitle":{"type":"string"},"slug":{"type":"string"},"shortUrl":{"type":["string","null"]},"destinationUrl":{"type":"string"},"splitTarget":{"type":["string","null"]},"sources":{"type":"array","items":{"type":"string"}},"clicks":{"type":"integer"},"installs":{"type":"integer"},"leads":{"type":"integer"},"events":{"type":"integer"},"score":{"type":"integer"},"confidence":{"type":"string","enum":["high","medium","low"]},"metrics":{"$ref":"#/components/schemas/AnyJson"},"reasons":{"type":"array","items":{"type":"string"}},"warnings":{"type":"array","items":{"type":"string"}}}},"BestDestinationResponse":{"type":"object","properties":{"generatedAt":{"type":"string","format":"date-time"},"range":{"$ref":"#/components/schemas/AnyJson"},"summary":{"$ref":"#/components/schemas/AnyJson"},"recommendation":{"type":"object","properties":{"generatedBy":{"type":"string"},"best":{"$ref":"#/components/schemas/DestinationCandidate"},"alternatives":{"type":"array","items":{"$ref":"#/components/schemas/DestinationCandidate"}},"totalCandidates":{"type":"integer"},"recommendations":{"type":"array","items":{"type":"string"}}}}}},"BrokenCampaignDetection":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"severity":{"type":"string","enum":["critical","high","medium","low"]},"title":{"type":"string"},"summary":{"type":"string"},"recommendation":{"type":"string"},"metric":{"type":"string"},"evidence":{"type":"array","items":{"type":"string"}},"linkId":{"type":"string"},"slug":{"type":"string"},"shortUrl":{"type":["string","null"]},"campaign":{"type":"string"}}},"BrokenCampaignDetectionsResponse":{"type":"object","properties":{"generatedAt":{"type":"string","format":"date-time"},"range":{"$ref":"#/components/schemas/AnyJson"},"summary":{"$ref":"#/components/schemas/AnyJson"},"detections":{"type":"array","items":{"$ref":"#/components/schemas/BrokenCampaignDetection"}}}},"MarketingAssistantInput":{"type":"object","properties":{"linkId":{"type":"string"},"objective":{"type":"string"},"audience":{"type":"string"},"offer":{"type":"string"},"channel":{"type":"string"},"tone":{"type":"string"},"destinationUrl":{"type":"string"},"campaignName":{"type":"string"},"medium":{"type":"string"},"variant":{"type":"string"}}},"MarketingAssistantResponse":{"type":"object","properties":{"generatedAt":{"type":"string","format":"date-time"},"link":{"$ref":"#/components/schemas/AnyJson"},"campaignBrief":{"$ref":"#/components/schemas/AnyJson"},"messageStrategy":{"type":"array","items":{"type":"string"}},"copyVariants":{"type":"array","items":{"$ref":"#/components/schemas/AnyJson"}},"utm":{"$ref":"#/components/schemas/Utm"},"previewUrl":{"type":["string","null"]},"nextActions":{"type":"array","items":{"type":"string"}},"qaChecklist":{"type":"array","items":{"type":"string"}}}},"AbuseReviewInput":{"type":"object","required":["status"],"properties":{"status":{"type":"string","enum":["needs_review","confirmed_bot","approved_human","ignored"]},"note":{"type":"string"}}},"ReportInput":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"filters":{"$ref":"#/components/schemas/AnyJson"},"columns":{"type":"array","items":{"type":"string"}},"schedule":{"$ref":"#/components/schemas/AnyJson"}}},"InviteMemberInput":{"type":"object","required":["email"],"properties":{"email":{"type":"string","format":"email"},"role":{"type":"string","enum":["viewer","member","admin"]}}},"RoleInput":{"type":"object","required":["role"],"properties":{"role":{"type":"string","enum":["viewer","member","admin"]}}},"ApiKeyInput":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}}}},"ApiKeyCreated":{"type":"object","properties":{"key":{"type":"string"}}},"WebhookInput":{"type":"object","properties":{"url":{"type":"string"},"events":{"type":"array","items":{"type":"string"}},"isActive":{"type":"boolean"}}}}}}