{
  "openapi": "3.0.0",
  "info": {
    "title": "Proof of Human API",
    "description": "API for real-time bot detection",
    "version": "v1",
    "contact": {
      "email": "support@poh.org"
    }
  },
  "servers": [
    {
      "url": "https://api.poh.org",
      "description": "Production API server"
    }
  ],
  "paths": {
    "/v1/sessions/{sessionId}/report": {
      "get": {
        "summary": "Retrieve data for a specific session",
        "description": "Get the risk score, risk explanation, biometric checks, device checks, and attention checks for a specific session ID. The `user_logs` field is also included for backward compatibility but is deprecated — use the [`/v1/sessions/{sessionId}/events`](/api-reference/events-data) endpoint to retrieve a session's event log.",
        "parameters": [
          {
            "name": "sessionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The unique session identifier (from `window.getPOHSessionId()`)"
          }
        ],
        "responses": {
          "200": {
            "description": "Session data retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "session_id": {
                      "type": "string",
                      "description": "Unique identifier for the session",
                      "example": "abc123def456"
                    },
                    "user_id": {
                      "type": "string",
                      "description": "User identifier provided during script initialization (if any)",
                      "example": "user-456"
                    },
                    "visitor_id": {
                      "type": "string",
                      "nullable": true,
                      "description": "A fingerprint of the user's device and browser; sessions with the same visitor ID likely came from the same device. Currently in beta.",
                      "example": "1c9f6d5e-2b71-4c3a-8f0d-4e5a6b7c8d9e"
                    },
                    "tags": {
                      "type": "array",
                      "description": "Tags associated with this session",
                      "items": {
                        "type": "string"
                      },
                      "example": ["intake-survey", "checkout-flow"]
                    },
                    "risk_score": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 100,
                      "description": "Overall risk score for the session (0-100). Higher scores indicate higher risk.",
                      "example": 75
                    },
                    "risk_explanation": {
                      "type": "string",
                      "description": "Short explanation of the factors contributing to the risk score",
                      "example": "User was flagged for multiple likely bot behaviors, indicating a medium to high risk of fraud."
                    },
                    "recommended_action": {
                      "type": "string",
                      "description": "Suggested action based on the risk score",
                      "enum": [
                        "Auto-accept",
                        "Accept with monitoring",
                        "Manual review or require additional verification",
                        "Auto-reject or high-priority review",
                        "Unknown"
                      ],
                      "example": "Manual review or require additional verification"
                    },
                    "user_logs": {
                      "type": "array",
                      "deprecated": true,
                      "description": "**Deprecated.** Chronological list of user actions recorded during the session. This field will be removed soon — use the [`/v1/sessions/{sessionId}/events`](/api-reference/events-data) endpoint instead.",
                      "items": {
                        "type": "object",
                        "properties": {
                          "action": {
                            "type": "string",
                            "description": "Description of the user action",
                            "example": "Navigated to /dashboard"
                          },
                          "user_time": {
                            "type": "string",
                            "description": "Human-readable timestamp in user's local timezone",
                            "example": "Mar 25, 2025 14:30:50"
                          },
                          "unix_timestamp": {
                            "type": "integer",
                            "description": "Unix timestamp in milliseconds",
                            "example": 1743055850000
                          }
                        }
                      },
                      "example": [
                        {
                          "action": "Signed in",
                          "user_time": "Mar 25, 2025 14:30:45",
                          "unix_timestamp": 1743055845000
                        },
                        {
                          "action": "Navigated to /dashboard",
                          "user_time": "Mar 25, 2025 14:30:50",
                          "unix_timestamp": 1743055850000
                        },
                        {
                          "action": "Updated credit card",
                          "user_time": "Mar 25, 2025 14:32:15",
                          "unix_timestamp": 1743055935000
                        }
                      ]
                    },
                    "biometric_checks": {
                      "type": "object",
                      "description": "Results of biometric analysis for bot detection",
                      "properties": {
                        "agent_behavior": {
                          "type": "string",
                          "description": "ML model detected patterns across biometric data consistent with automated behavior",
                          "enum": [
                            "Detected",
                            "Not detected",
                            "Unknown"
                          ],
                          "example": "Not detected"
                        },
                        "programmatic_typing": {
                          "type": "string",
                          "description": "User had highly regular typing patterns typical of programmatic input",
                          "enum": [
                            "Detected",
                            "Not detected",
                            "Unknown"
                          ],
                          "example": "Detected"
                        },
                        "teleporting_mouse": {
                          "type": "string",
                          "description": "User moved the mouse cursor to different page locations without transition",
                          "enum": [
                            "Detected",
                            "Not detected",
                            "Unknown"
                          ],
                          "example": "Not detected"
                        },
                        "no_corrections": {
                          "type": "string",
                          "description": "User made text entries without any corrections or backspaces",
                          "enum": [
                            "Detected",
                            "Not detected",
                            "Unknown"
                          ],
                          "example": "Detected"
                        },
                        "all_pasted": {
                          "type": "string",
                          "description": "All text responses were pasted rather than typed by the user",
                          "enum": [
                            "Detected",
                            "Not detected",
                            "Unknown"
                          ],
                          "example": "Unknown"
                        },
                        "jump_scrolling": {
                          "type": "string",
                          "description": "User scrolls in large jumps with no intermediate or continuous scroll events",
                          "enum": [
                            "Detected",
                            "Not detected",
                            "Unknown"
                          ],
                          "example": "Detected"
                        },
                        "centered_clicks": {
                          "type": "string",
                          "description": "User made perfectly centered clicks with no natural variation",
                          "enum": [
                            "Detected",
                            "Not detected",
                            "Unknown"
                          ],
                          "example": "Detected"
                        },
                        "programmatic_clicking": {
                          "type": "string",
                          "description": "User clicks were made programmatically rather than through natural user interaction",
                          "enum": [
                            "Detected",
                            "Not detected",
                            "Unknown"
                          ],
                          "example": "Not detected"
                        },
                        "external_input": {
                          "type": "string",
                          "description": "User left the survey tab and pasted input after returning",
                          "enum": [
                            "Detected",
                            "Not detected",
                            "Unknown"
                          ],
                          "example": "Not detected"
                        }
                      },
                      "example": {
                        "agent_behavior": "Not detected",
                        "programmatic_typing": "Detected",
                        "teleporting_mouse": "Not detected",
                        "no_corrections": "Detected",
                        "all_pasted": "Unknown",
                        "jump_scrolling": "Detected",
                        "centered_clicks": "Detected",
                        "programmatic_clicking": "Not detected",
                        "external_input": "Not detected"
                      }
                    },
                    "device_checks": {
                      "type": "object",
                      "description": "Results of device and network checks for environment anomalies",
                      "properties": {
                        "bot": {
                          "type": "string",
                          "description": "Browser execution context indicates an automated tool (e.g. Selenium or Playwright)",
                          "enum": [
                            "Detected",
                            "Not detected",
                            "Unknown"
                          ],
                          "example": "Detected"
                        },
                        "virtual_machine": {
                          "type": "string",
                          "description": "Signals suggest the browser may not be running on a standard local device",
                          "enum": [
                            "Detected",
                            "Not detected",
                            "Unknown"
                          ],
                          "example": "Not detected"
                        },
                        "software_renderer": {
                          "type": "string",
                          "description": "Browser is using a software-based graphics renderer (e.g. SwiftShader or llvmpipe) instead of hardware acceleration, which may suggest a remote, virtualized, or headless browser environment",
                          "enum": [
                            "Detected",
                            "Not detected",
                            "Unknown"
                          ],
                          "example": "Not detected"
                        },
                        "vpn": {
                          "type": "string",
                          "description": "IP address belongs to a known VPN or hosting provider",
                          "enum": [
                            "Detected",
                            "Not detected",
                            "Unknown"
                          ],
                          "example": "Detected"
                        },
                        "tor": {
                          "type": "string",
                          "description": "Connection is routed through a Tor exit node",
                          "enum": [
                            "Detected",
                            "Not detected",
                            "Unknown"
                          ],
                          "example": "Not detected"
                        },
                        "location_spoofing": {
                          "type": "string",
                          "description": "Browser-reported geolocation conflicts with IP-based location or appears simulated",
                          "enum": [
                            "Detected",
                            "Not detected",
                            "Unknown"
                          ],
                          "example": "Unknown"
                        }
                      },
                      "example": {
                        "bot": "Detected",
                        "virtual_machine": "Not detected",
                        "software_renderer": "Not detected",
                        "vpn": "Detected",
                        "tor": "Not detected",
                        "location_spoofing": "Unknown"
                      }
                    },
                    "attention_checks": {
                      "type": "object",
                      "description": "Results of attention checks for signs of low effort or inattention. These flag inattentive human participants, not bots, and do not contribute to the risk score. Sessions processed before attention checks were introduced report `Unknown`",
                      "properties": {
                        "switched_away": {
                          "type": "string",
                          "description": "The page was hidden 5 or more times, for example by switching to another tab or window",
                          "enum": [
                            "Detected",
                            "Not detected",
                            "Unknown"
                          ],
                          "example": "Not detected"
                        },
                        "rushed_through": {
                          "type": "string",
                          "description": "The typical time between actions was under 0.66 seconds, about a third of the typical pace across all apps. Sessions with fewer than 10 actions are not judged",
                          "enum": [
                            "Detected",
                            "Not detected",
                            "Unknown"
                          ],
                          "example": "Not detected"
                        },
                        "any_pasted": {
                          "type": "string",
                          "description": "At least one answer was pasted rather than typed",
                          "enum": [
                            "Detected",
                            "Not detected",
                            "Unknown"
                          ],
                          "example": "Detected"
                        },
                        "long_pauses": {
                          "type": "string",
                          "description": "There was a gap of more than 10 minutes between two consecutive actions",
                          "enum": [
                            "Detected",
                            "Not detected",
                            "Unknown"
                          ],
                          "example": "Not detected"
                        }
                      },
                      "example": {
                        "switched_away": "Not detected",
                        "rushed_through": "Not detected",
                        "any_pasted": "Detected",
                        "long_pauses": "Not detected"
                      }
                    }
                  }
                }
              }
            }
          },
          "402": {
            "$ref": "#/components/responses/AccountInactive"
          },
          "403": {
            "$ref": "#/components/responses/FreePlanSession"
          }
        }
      }
    },
    "/v1/sessions/{sessionId}/events": {
      "get": {
        "summary": "Retrieve the event log for a specific session",
        "description": "Get the chronological list of user events recorded during a specific session",
        "parameters": [
          {
            "name": "sessionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The unique session identifier (from `window.getPOHSessionId()`)"
          }
        ],
        "responses": {
          "200": {
            "description": "Session events retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "session_id": {
                      "type": "string",
                      "description": "Unique identifier for the session",
                      "example": "abc123def456"
                    },
                    "event_count": {
                      "type": "integer",
                      "description": "Total number of events recorded during the session",
                      "example": 3
                    },
                    "events": {
                      "type": "array",
                      "description": "Chronological list of user events recorded during the session",
                      "items": {
                        "type": "object",
                        "properties": {
                          "action": {
                            "type": "string",
                            "description": "Description of the user event",
                            "example": "Navigated to /dashboard"
                          },
                          "user_time": {
                            "type": "string",
                            "description": "Human-readable timestamp in the user's local timezone",
                            "example": "Mar 25, 2025 14:30:50"
                          },
                          "unix_timestamp": {
                            "type": "integer",
                            "description": "Unix timestamp in milliseconds",
                            "example": 1743055850000
                          }
                        }
                      },
                      "example": [
                        {
                          "action": "Signed in",
                          "user_time": "Mar 25, 2025 14:30:45",
                          "unix_timestamp": 1743055845000
                        },
                        {
                          "action": "Navigated to /dashboard",
                          "user_time": "Mar 25, 2025 14:30:50",
                          "unix_timestamp": 1743055850000
                        },
                        {
                          "action": "Clicked \"Update credit card\"",
                          "user_time": "Mar 25, 2025 14:32:15",
                          "unix_timestamp": 1743055935000
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "402": {
            "$ref": "#/components/responses/AccountInactive"
          },
          "403": {
            "$ref": "#/components/responses/FreePlanSession"
          }
        }
      }
    },
    "/v1/tags/{tag}/sessions": {
      "get": {
        "summary": "Retrieve recent sessions for a specific tag",
        "description": "Get the 100 most recent sessions that include a specific tag",
        "parameters": [
          {
            "name": "tag",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The tag to filter sessions by"
          }
        ],
        "responses": {
          "200": {
            "description": "Tag sessions retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "tag": {
                      "type": "string",
                      "description": "The tag identifier",
                      "example": "checkout-flow"
                    },
                    "sessions": {
                      "type": "array",
                      "description": "List of session data",
                      "items": {
                        "type": "object",
                        "properties": {
                          "session_id": {
                            "type": "string",
                            "description": "Unique identifier for the session",
                            "example": "abc123def456"
                          },
                          "visitor_id": {
                            "type": "string",
                            "nullable": true,
                            "description": "A fingerprint of the user's device and browser; sessions with the same visitor ID likely came from the same device. Currently in beta.",
                            "example": "1c9f6d5e-2b71-4c3a-8f0d-4e5a6b7c8d9e"
                          },
                          "tags": {
                            "type": "array",
                            "description": "Tags associated with this session",
                            "items": {
                              "type": "string"
                            },
                            "example": ["intake-survey", "checkout-flow"]
                          },
                          "risk_score": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 100,
                            "description": "Overall risk assessment score for the session (0-100)",
                            "example": 75
                          },
                          "risk_explanation": {
                            "type": "string",
                            "description": "Short explanation of the factors contributing to the risk score",
                            "example": "Multiple bot behaviors detected including programmatic typing and lack of corrections"
                          },
                          "recommended_action": {
                            "type": "string",
                            "description": "Suggested action based on the risk score",
                            "enum": [
                              "Auto-accept",
                              "Accept with monitoring",
                              "Manual review or require additional verification",
                              "Auto-reject or high-priority review",
                              "Unknown"
                            ],
                            "example": "Manual review or require additional verification"
                          },
                          "user_logs": {
                            "type": "array",
                            "deprecated": true,
                            "description": "**Deprecated.** Chronological list of user actions recorded during the session. This field will be removed soon — use the [`/v1/sessions/{sessionId}/events`](/api-reference/events-data) endpoint instead.",
                            "items": {
                              "type": "object",
                              "properties": {
                                "action": {
                                  "type": "string",
                                  "description": "Description of the user action",
                                  "example": "Navigated to /dashboard"
                                },
                                "user_time": {
                                  "type": "string",
                                  "description": "Human-readable timestamp in user's local timezone",
                                  "example": "Mar 25, 2025 14:30:50"
                                },
                                "unix_timestamp": {
                                  "type": "integer",
                                  "description": "Unix timestamp in milliseconds",
                                  "example": 1743055850000
                                }
                              }
                            }
                          },
                          "biometric_checks": {
                            "type": "object",
                            "description": "Results of biometric analysis for bot detection",
                            "properties": {
                              "agent_behavior": {
                                "type": "string",
                                "description": "ML model detected patterns across biometric data consistent with automated behavior",
                                "enum": [
                                  "Detected",
                                  "Not detected",
                                  "Unknown"
                                ],
                                "example": "Not detected"
                              },
                              "programmatic_typing": {
                                "type": "string",
                                "description": "User had highly regular typing patterns typical of programmatic input",
                                "enum": [
                                  "Detected",
                                  "Not detected",
                                  "Unknown"
                                ],
                                "example": "Detected"
                              },
                              "teleporting_mouse": {
                                "type": "string",
                                "description": "User moved the mouse cursor to different page locations without transition",
                                "enum": [
                                  "Detected",
                                  "Not detected",
                                  "Unknown"
                                ],
                                "example": "Not detected"
                              },
                              "no_corrections": {
                                "type": "string",
                                "description": "User made text entries without any corrections or backspaces",
                                "enum": [
                                  "Detected",
                                  "Not detected",
                                  "Unknown"
                                ],
                                "example": "Detected"
                              },
                              "all_pasted": {
                                "type": "string",
                                "description": "All text responses were pasted rather than typed by the user",
                                "enum": [
                                  "Detected",
                                  "Not detected",
                                  "Unknown"
                                ],
                                "example": "Unknown"
                              },
                              "jump_scrolling": {
                                "type": "string",
                                "description": "User scrolls in large jumps with no intermediate or continuous scroll events",
                                "enum": [
                                  "Detected",
                                  "Not detected",
                                  "Unknown"
                                ],
                                "example": "Detected"
                              },
                              "centered_clicks": {
                                "type": "string",
                                "description": "User made perfectly centered clicks with no natural variation",
                                "enum": [
                                  "Detected",
                                  "Not detected",
                                  "Unknown"
                                ],
                                "example": "Detected"
                              },
                              "programmatic_clicking": {
                                "type": "string",
                                "description": "User clicks were made programmatically rather than through natural user interaction",
                                "enum": [
                                  "Detected",
                                  "Not detected",
                                  "Unknown"
                                ],
                                "example": "Not detected"
                              },
                              "external_input": {
                                "type": "string",
                                "description": "User left the survey tab and pasted input after returning",
                                "enum": [
                                  "Detected",
                                  "Not detected",
                                  "Unknown"
                                ],
                                "example": "Not detected"
                              }
                            },
                            "example": {
                              "agent_behavior": "Not detected",
                              "programmatic_typing": "Detected",
                              "teleporting_mouse": "Not detected",
                              "no_corrections": "Detected",
                              "all_pasted": "Unknown",
                              "jump_scrolling": "Detected",
                              "centered_clicks": "Detected",
                              "programmatic_clicking": "Not detected",
                              "external_input": "Not detected"
                            }
                          },
                          "device_checks": {
                            "type": "object",
                            "description": "Results of device and network checks for environment anomalies",
                            "properties": {
                              "bot": {
                                "type": "string",
                                "description": "Browser execution context indicates an automated tool (e.g. Selenium or Playwright)",
                                "enum": [
                                  "Detected",
                                  "Not detected",
                                  "Unknown"
                                ],
                                "example": "Detected"
                              },
                              "virtual_machine": {
                                "type": "string",
                                "description": " Signals suggest the browser is running in a remote, virtualized, sandboxed, or software-rendered environment",
                                "enum": [
                                  "Detected",
                                  "Not detected",
                                  "Unknown"
                                ],
                                "example": "Not detected"
                              },
                              "software_renderer": {
                                "type": "string",
                                "description": "Browser is using a software-based graphics renderer (e.g. SwiftShader or llvmpipe) instead of hardware acceleration, which may suggest a remote, virtualized, or headless browser environment",
                                "enum": [
                                  "Detected",
                                  "Not detected",
                                  "Unknown"
                                ],
                                "example": "Not detected"
                              },
                              "vpn": {
                                "type": "string",
                                "description": "IP address belongs to a known VPN or hosting provider",
                                "enum": [
                                  "Detected",
                                  "Not detected",
                                  "Unknown"
                                ],
                                "example": "Detected"
                              },
                              "tor": {
                                "type": "string",
                                "description": "Connection is routed through a Tor exit node",
                                "enum": [
                                  "Detected",
                                  "Not detected",
                                  "Unknown"
                                ],
                                "example": "Not detected"
                              },
                              "location_spoofing": {
                                "type": "string",
                                "description": "Browser-reported geolocation conflicts with IP-based location or appears simulated",
                                "enum": [
                                  "Detected",
                                  "Not detected",
                                  "Unknown"
                                ],
                                "example": "Unknown"
                              }
                            },
                            "example": {
                              "bot": "Detected",
                              "virtual_machine": "Not detected",
                              "software_renderer": "Not detected",
                              "vpn": "Detected",
                              "tor": "Not detected",
                              "location_spoofing": "Unknown"
                            }
                          },
                          "attention_checks": {
                            "type": "object",
                            "description": "Results of attention checks for signs of low effort or inattention. These flag inattentive human participants, not bots, and do not contribute to the risk score. Sessions processed before attention checks were introduced report `Unknown`",
                            "properties": {
                              "switched_away": {
                                "type": "string",
                                "description": "The page was hidden 5 or more times, for example by switching to another tab or window",
                                "enum": [
                                  "Detected",
                                  "Not detected",
                                  "Unknown"
                                ],
                                "example": "Not detected"
                              },
                              "rushed_through": {
                                "type": "string",
                                "description": "The typical time between actions was under 0.66 seconds, about a third of the typical pace across all apps. Sessions with fewer than 10 actions are not judged",
                                "enum": [
                                  "Detected",
                                  "Not detected",
                                  "Unknown"
                                ],
                                "example": "Not detected"
                              },
                              "any_pasted": {
                                "type": "string",
                                "description": "At least one answer was pasted rather than typed",
                                "enum": [
                                  "Detected",
                                  "Not detected",
                                  "Unknown"
                                ],
                                "example": "Detected"
                              },
                              "long_pauses": {
                                "type": "string",
                                "description": "There was a gap of more than 10 minutes between two consecutive actions",
                                "enum": [
                                  "Detected",
                                  "Not detected",
                                  "Unknown"
                                ],
                                "example": "Not detected"
                              }
                            },
                            "example": {
                              "switched_away": "Not detected",
                              "rushed_through": "Not detected",
                              "any_pasted": "Detected",
                              "long_pauses": "Not detected"
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "402": {
            "$ref": "#/components/responses/AccountInactiveList"
          },
          "403": {
            "$ref": "#/components/responses/FreePlanList"
          }
        }
      }
    },
    "/v1/users/{userId}/sessions": {
      "get": {
        "summary": "Retrieve recent sessions for a specific user",
        "description": "Get the 100 most recent sessions for a specific user ID",
        "parameters": [
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "The unique user identifier"
          }
        ],
        "responses": {
          "200": {
            "description": "User sessions retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "user_id": {
                      "type": "string",
                      "description": "The user identifier",
                      "example": "user-456"
                    },
                    "sessions": {
                      "type": "array",
                      "description": "List of session data",
                      "items": {
                        "type": "object",
                        "properties": {
                          "session_id": {
                            "type": "string",
                            "description": "Unique identifier for the session",
                            "example": "abc123def456"
                          },
                          "visitor_id": {
                            "type": "string",
                            "nullable": true,
                            "description": "A fingerprint of the user's device and browser; sessions with the same visitor ID likely came from the same device. Currently in beta.",
                            "example": "1c9f6d5e-2b71-4c3a-8f0d-4e5a6b7c8d9e"
                          },
                          "tags": {
                            "type": "array",
                            "description": "Tags associated with this session",
                            "items": {
                              "type": "string"
                            },
                            "example": ["intake-survey", "checkout-flow"]
                          },
                          "risk_score": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 100,
                            "description": "Overall risk assessment score for the session (0-100)",
                            "example": 75
                          },
                          "risk_explanation": {
                            "type": "string",
                            "description": "Short explanation of the factors contributing to the risk score",
                            "example": "Multiple bot behaviors detected including programmatic typing and lack of corrections"
                          },
                          "recommended_action": {
                            "type": "string",
                            "description": "Suggested action based on the risk score",
                            "enum": [
                              "Auto-accept",
                              "Accept with monitoring",
                              "Manual review or require additional verification",
                              "Auto-reject or high-priority review",
                              "Unknown"
                            ],
                            "example": "Manual review or require additional verification"
                          },
                          "user_logs": {
                            "type": "array",
                            "deprecated": true,
                            "description": "**Deprecated.** Chronological list of user actions recorded during the session. This field will be removed soon — use the [`/v1/sessions/{sessionId}/events`](/api-reference/events-data) endpoint instead.",
                            "items": {
                              "type": "object",
                              "properties": {
                                "action": {
                                  "type": "string",
                                  "description": "Description of the user action",
                                  "example": "Navigated to /dashboard"
                                },
                                "user_time": {
                                  "type": "string",
                                  "description": "Human-readable timestamp in user's local timezone",
                                  "example": "Mar 25, 2025 14:30:50"
                                },
                                "unix_timestamp": {
                                  "type": "integer",
                                  "description": "Unix timestamp in milliseconds",
                                  "example": 1743055850000
                                }
                              }
                            }
                          },
                          "biometric_checks": {
                            "type": "object",
                            "description": "Results of biometric analysis for bot detection",
                            "properties": {
                              "agent_behavior": {
                                "type": "string",
                                "description": "ML model detected patterns across biometric data consistent with automated behavior",
                                "enum": [
                                  "Detected",
                                  "Not detected",
                                  "Unknown"
                                ],
                                "example": "Not detected"
                              },
                              "programmatic_typing": {
                                "type": "string",
                                "description": "User had highly regular typing patterns typical of programmatic input",
                                "enum": [
                                  "Detected",
                                  "Not detected",
                                  "Unknown"
                                ],
                                "example": "Detected"
                              },
                              "teleporting_mouse": {
                                "type": "string",
                                "description": "User moved the mouse cursor to different page locations without transition",
                                "enum": [
                                  "Detected",
                                  "Not detected",
                                  "Unknown"
                                ],
                                "example": "Not detected"
                              },
                              "no_corrections": {
                                "type": "string",
                                "description": "User made text entries without any corrections or backspaces",
                                "enum": [
                                  "Detected",
                                  "Not detected",
                                  "Unknown"
                                ],
                                "example": "Detected"
                              },
                              "all_pasted": {
                                "type": "string",
                                "description": "All text responses were pasted rather than typed by the user",
                                "enum": [
                                  "Detected",
                                  "Not detected",
                                  "Unknown"
                                ],
                                "example": "Unknown"
                              },
                              "jump_scrolling": {
                                "type": "string",
                                "description": "User scrolls in large jumps with no intermediate or continuous scroll events",
                                "enum": [
                                  "Detected",
                                  "Not detected",
                                  "Unknown"
                                ],
                                "example": "Detected"
                              },
                              "centered_clicks": {
                                "type": "string",
                                "description": "User made perfectly centered clicks with no natural variation",
                                "enum": [
                                  "Detected",
                                  "Not detected",
                                  "Unknown"
                                ],
                                "example": "Detected"
                              },
                              "programmatic_clicking": {
                                "type": "string",
                                "description": "User clicks were made programmatically rather than through natural user interaction",
                                "enum": [
                                  "Detected",
                                  "Not detected",
                                  "Unknown"
                                ],
                                "example": "Not detected"
                              },
                              "external_input": {
                                "type": "string",
                                "description": "User left the survey tab and pasted input after returning",
                                "enum": [
                                  "Detected",
                                  "Not detected",
                                  "Unknown"
                                ],
                                "example": "Not detected"
                              }
                            },
                            "example": {
                              "agent_behavior": "Not detected",
                              "programmatic_typing": "Detected",
                              "teleporting_mouse": "Not detected",
                              "no_corrections": "Detected",
                              "all_pasted": "Unknown",
                              "jump_scrolling": "Detected",
                              "centered_clicks": "Detected",
                              "programmatic_clicking": "Not detected",
                              "external_input": "Not detected"
                            }
                          },
                          "device_checks": {
                            "type": "object",
                            "description": "Results of device and network checks for environment anomalies",
                            "properties": {
                              "bot": {
                                "type": "string",
                                "description": "Browser execution context indicates an automated tool (e.g. Selenium or Playwright)",
                                "enum": [
                                  "Detected",
                                  "Not detected",
                                  "Unknown"
                                ],
                                "example": "Detected"
                              },
                              "virtual_machine": {
                                "type": "string",
                                "description": "Signals suggest the browser is running in a remote, virtualized, sandboxed, or software-rendered environment",
                                "enum": [
                                  "Detected",
                                  "Not detected",
                                  "Unknown"
                                ],
                                "example": "Not detected"
                              },
                              "software_renderer": {
                                "type": "string",
                                "description": "Browser is using a software-based graphics renderer (e.g. SwiftShader or llvmpipe) instead of hardware acceleration, which may suggest a remote, virtualized, or headless browser environment",
                                "enum": [
                                  "Detected",
                                  "Not detected",
                                  "Unknown"
                                ],
                                "example": "Not detected"
                              },
                              "vpn": {
                                "type": "string",
                                "description": "IP address belongs to a known VPN or hosting provider",
                                "enum": [
                                  "Detected",
                                  "Not detected",
                                  "Unknown"
                                ],
                                "example": "Detected"
                              },
                              "tor": {
                                "type": "string",
                                "description": "Connection is routed through a Tor exit node",
                                "enum": [
                                  "Detected",
                                  "Not detected",
                                  "Unknown"
                                ],
                                "example": "Not detected"
                              },
                              "location_spoofing": {
                                "type": "string",
                                "description": "Browser-reported geolocation conflicts with IP-based location or appears simulated",
                                "enum": [
                                  "Detected",
                                  "Not detected",
                                  "Unknown"
                                ],
                                "example": "Unknown"
                              }
                            },
                            "example": {
                              "bot": "Detected",
                              "virtual_machine": "Not detected",
                              "software_renderer": "Not detected",
                              "vpn": "Detected",
                              "tor": "Not detected",
                              "location_spoofing": "Unknown"
                            }
                          },
                          "attention_checks": {
                            "type": "object",
                            "description": "Results of attention checks for signs of low effort or inattention. These flag inattentive human participants, not bots, and do not contribute to the risk score. Sessions processed before attention checks were introduced report `Unknown`",
                            "properties": {
                              "switched_away": {
                                "type": "string",
                                "description": "The page was hidden 5 or more times, for example by switching to another tab or window",
                                "enum": [
                                  "Detected",
                                  "Not detected",
                                  "Unknown"
                                ],
                                "example": "Not detected"
                              },
                              "rushed_through": {
                                "type": "string",
                                "description": "The typical time between actions was under 0.66 seconds, about a third of the typical pace across all apps. Sessions with fewer than 10 actions are not judged",
                                "enum": [
                                  "Detected",
                                  "Not detected",
                                  "Unknown"
                                ],
                                "example": "Not detected"
                              },
                              "any_pasted": {
                                "type": "string",
                                "description": "At least one answer was pasted rather than typed",
                                "enum": [
                                  "Detected",
                                  "Not detected",
                                  "Unknown"
                                ],
                                "example": "Detected"
                              },
                              "long_pauses": {
                                "type": "string",
                                "description": "There was a gap of more than 10 minutes between two consecutive actions",
                                "enum": [
                                  "Detected",
                                  "Not detected",
                                  "Unknown"
                                ],
                                "example": "Not detected"
                              }
                            },
                            "example": {
                              "switched_away": "Not detected",
                              "rushed_through": "Not detected",
                              "any_pasted": "Detected",
                              "long_pauses": "Not detected"
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "402": {
            "$ref": "#/components/responses/AccountInactiveList"
          },
          "403": {
            "$ref": "#/components/responses/FreePlanList"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "UserAction": {
        "type": "object",
        "properties": {
          "action": {
            "type": "string",
            "description": "Description of the user action",
            "example": "Navigated to /dashboard"
          },
          "user_time": {
            "type": "string",
            "description": "Human-readable timestamp in user's local timezone",
            "example": "Mar 25, 2025 14:30:50"
          },
          "unix_timestamp": {
            "type": "integer",
            "description": "Unix timestamp in milliseconds",
            "example": 1743055850000
          }
        }
      },
      "FailedCheck": {
        "type": "object",
        "properties": {
          "check": {
            "type": "string",
            "description": "Description of the failed check",
            "example": "Unnatural mouse movement"
          },
          "user_time": {
            "type": "string",
            "description": "Human-readable timestamp in user's local timezone",
            "example": "Mar 25, 2025 14:31:05"
          },
          "unix_timestamp": {
            "type": "integer",
            "description": "Unix timestamp in milliseconds",
            "example": 1743055865000
          }
        }
      },
      "SessionSummary": {
        "type": "object",
        "description": "Summary information about a session",
        "properties": {
          "session_id": {
            "type": "string",
            "description": "Unique identifier for the session",
            "example": "abc123def456"
          },
          "action_count": {
            "type": "integer",
            "description": "Number of user actions in the session",
            "example": 47
          },
          "failed_check_count": {
            "type": "integer",
            "description": "Number of failed checks in the session",
            "example": 2
          }
        }
      }
    },
    "securitySchemes": {
      "BearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "Use your secret API key as the bearer token"
      }
    },
    "parameters": {
      "SessionIdParam": {
        "name": "sessionId",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string"
        },
        "description": "The unique session identifier (from `window.getPOHSessionId()`)"
      },
      "UserIdParam": {
        "name": "userId",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string"
        },
        "description": "The unique user identifier"
      },
      "TagParam": {
        "name": "tag",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string"
        },
        "description": "The tag to filter sessions by"
      }
    },
    "responses": {
      "AccountInactive": {
        "description": "The account's subscription is inactive. Update your plan on the [Plan page](https://app.poh.org/account/plan) to restore API access.",
        "content": {
          "application/json": {
            "schema": {
              "type": "string"
            },
            "example": "Account inactive - please update your plan"
          }
        }
      },
      "FreePlan": {
        "description": "The API is not available on the Community plan. Upgrade to a [paid plan](/plans) to use it.",
        "content": {
          "application/json": {
            "schema": {
              "type": "string"
            },
            "example": "API access is not available on the free plan - please upgrade your plan"
          }
        }
      },
      "FreePlanSession": {
        "description": "The API is not available on the Community plan, or the session was collected while the account was on the Community plan. Sessions collected on the Community plan stay locked after upgrading. See [Plans and limits](/plans).",
        "content": {
          "application/json": {
            "schema": {
              "type": "string"
            },
            "example": "Session was collected on the free plan - details are not available"
          }
        }
      },
      "AccountInactiveList": {
        "description": "The account's subscription is inactive. Update your plan on the [Plan page](https://app.poh.org/account/plan) to restore API access.",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "disabled": {
                  "type": "boolean",
                  "example": true
                },
                "error": {
                  "type": "string"
                }
              }
            },
            "example": {
              "disabled": true,
              "error": "Account inactive - please update your plan"
            }
          }
        }
      },
      "FreePlanList": {
        "description": "The API is not available on the Community plan. Upgrade to a [paid plan](/plans) to use it. Sessions collected on the Community plan are left out of the results, even after upgrading.",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "disabled": {
                  "type": "boolean",
                  "example": true
                },
                "error": {
                  "type": "string"
                }
              }
            },
            "example": {
              "disabled": true,
              "error": "API access is not available on the free plan - please upgrade your plan"
            }
          }
        }
      }
    }
  },
  "security": [
    {
      "BearerAuth": []
    }
  ],
  "tags": [
    {
      "name": "sessions",
      "description": "Operations related to session data"
    },
    {
      "name": "users",
      "description": "Operations related to user data"
    },
    {
      "name": "tags",
      "description": "Operations related to tag data"
    }
  ],
  "externalDocs": {
    "description": "Proof of Human Documentation",
    "url": "https://docs.poh.org"
  }
}
