{"components":{"schemas":{"Confidence":{"properties":{"level":{"enum":["low","medium","high"],"type":"string"},"score":{"format":"float","maximum":1,"minimum":0,"type":"number"}},"type":"object"},"Error":{"properties":{"error":{"properties":{"code":{"type":"string"},"message":{"type":"string"}},"type":"object"}},"type":"object"},"Event":{"properties":{"confidence":{"$ref":"#/components/schemas/Confidence"},"createdAt":{"format":"date-time","type":"string"},"environment":{"type":"string"},"ip":{"type":"string"},"ipLocation":{"properties":{"city":{"type":"string"},"country":{"type":"string"}},"type":"object"},"matchedSignals":{"additionalProperties":{"type":"number"},"type":"object"},"requestId":{"type":"string"},"smartSignals":{"additionalProperties":{"$ref":"#/components/schemas/SmartSignal"},"type":"object"},"visitorFound":{"type":"boolean"},"visitorId":{"type":"string"}},"type":"object"},"IdentifyRequest":{"properties":{"extendedResult":{"type":"boolean"},"fingerprint":{"type":"string"},"identityHints":{"properties":{"cookie":{"nullable":true,"type":"string"},"indexeddb":{"nullable":true,"type":"string"},"local":{"nullable":true,"type":"string"}},"type":"object"},"linkedId":{"nullable":true,"type":"string"},"page":{"properties":{"referrer":{"type":"string"},"url":{"type":"string"}},"type":"object"},"publicKey":{"pattern":"^pk_(live|test)_[0-9A-Za-z]+$","type":"string"},"sdkVersion":{"type":"string"},"signals":{"additionalProperties":true,"type":"object"},"tag":{"additionalProperties":true,"nullable":true,"type":"object"}},"required":["publicKey"],"type":"object"},"IdentifyResponse":{"properties":{"confidence":{"$ref":"#/components/schemas/Confidence"},"environment":{"enum":["live","test","staging"],"type":"string"},"firstSeenAt":{"format":"date-time","type":"string"},"lastSeenAt":{"format":"date-time","type":"string"},"requestId":{"type":"string"},"seenCount":{"type":"integer"},"smartSignals":{"additionalProperties":{"$ref":"#/components/schemas/SmartSignal"},"type":"object"},"storage":{"type":"string"},"visitorFound":{"type":"boolean"},"visitorId":{"type":"string"}},"type":"object"},"SmartSignal":{"additionalProperties":true,"properties":{"result":{"type":"boolean"}},"type":"object"}},"securitySchemes":{"AdminJWT":{"bearerFormat":"JWT","scheme":"bearer","type":"http"},"PublicKey":{"description":"Public key pk_... sent in the identify request body, not a header.","scheme":"bearer","type":"http"},"SecretKey":{"description":"Secret key sk_... in Authorization: Bearer.","scheme":"bearer","type":"http"}}},"info":{"description":"Device intelligence & visitor identification. The public `/v1/identify` endpoint is called by the browser agent with a public key; `/v1/events/{requestId}` is called server-to-server with a secret key to verify a result. Admin endpoints power the console.\n","license":{"name":"MIT"},"title":"Prynt API","version":"1.0.0"},"openapi":"3.1.0","paths":{"/admin/auth/login":{"post":{"responses":{"200":{"description":"JWT + user + tenant"}},"summary":"Log in to the console","tags":["Admin"]}},"/admin/dashboard":{"get":{"responses":{"200":{"description":"OK"}},"security":[{"AdminJWT":[]}],"summary":"Dashboard metrics (env-scoped via ?env=)","tags":["Admin"]}},"/admin/webhooks":{"get":{"responses":{"200":{"description":"OK"}},"security":[{"AdminJWT":[]}],"summary":"List webhooks","tags":["Admin"]},"post":{"responses":{"201":{"description":"Created"}},"security":[{"AdminJWT":[]}],"summary":"Create a webhook (returns signing secret once)","tags":["Admin"]}},"/v1/events/{requestId}":{"get":{"parameters":[{"in":"path","name":"requestId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"}}},"description":"The authoritative event record"},"401":{"description":"Missing/invalid secret key"},"404":{"description":"No such requestId for this tenant"}},"security":[{"SecretKey":[]}],"summary":"Verify an identification (server-to-server)","tags":["Identification"]}},"/v1/identify":{"post":{"description":"Called by the agent. Returns a stable visitorId + confidence + smart signals.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IdentifyRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IdentifyResponse"}}},"description":"Identified"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unknown/disabled public key"},"403":{"description":"Origin not allowed"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Malformed payload"},"429":{"description":"Rate or quota exceeded"}},"summary":"Identify a browser","tags":["Identification"]}}},"servers":[{"url":"https://api.prynt.dev"},{"description":"Local dev","url":"http://127.0.0.1:5050"}],"tags":[{"name":"Identification"},{"name":"Admin"}]}
