Skip to main content

Fall Risk API

Endpoints

  • POST /api/fall-risk — Create a new fall risk result for a user/client.

POST /api/fall-risk

Create a new empty fall risk result for a user/client. Returns URLs for subsequent quiz and test steps.

Headers:

  • Authorization: Bearer <JWT>
  • Content-Type: application/json

Request Body:

{
"userId": "string (optional)",
"email": "string (optional)",
"photoURL": "string (optional)",
"skipDeviceSetup": "boolean (optional)",
"returnUrl": "/relative/path (optional)",
"origin": "string (optional)",
"userInfo": {
"name": "string (optional)",
"sex": "male | female | other (optional)",
"dateOfBirth": "string (optional)",
"heightCm": "number (optional)",
"weightKg": "number (optional)"
}
}
  • userId: User ID to associate with the result (optional; if provided, must exist for the client)
  • email: Email address (optional; if provided, must be valid)
  • photoURL: Photo URL (optional; if provided, must be a valid URL)
  • skipDeviceSetup: Whether to skip the device setup state during fall risk assessments (optional; when true, the assessment flow will automatically skip the device setup step)
  • returnUrl: Relative in-app path to return the user to after the assessment flow completes (optional)
  • origin: Short source label for attribution, such as a landing page, campaign, or embedded entry point (optional)
  • userInfo: Optional participant profile details used to prefill the new assessment record when available

Response:

  • 200 OK:

    {
    "fallRiskResultId": "string",
    "quizUrl": "string",
    "sitToStandTestUrl": "string",
    "tandemStanceTestUrl": "string",
    "singleLegStanceTestUrl": "string",
    "tandemWalkTestUrl": "string",
    "createdAt": "string (ISO date)",
    "returnUrl": "/relative/path (optional)"
    }
  • 400 Bad Request: { error: "Invalid email" | "Invalid photoURL" | "User does not exist" }

  • 401 Unauthorized: { error: string }

  • 500 Internal Server Error: { error: "Client ID not found" | string }

Notes:

  • All returned URLs are relative paths for the next steps in the fall risk assessment process.
  • GOFA-hosted public try pages may attach landing-source context so administrators can review which public entry page or variant generated each assessment start.
  • CORS headers are set to allow cross-origin requests.
  • For the full schema of a fall risk result, see Fall Risk Results API.