Create, run, and retrieve a client-scoped body alignment assessment.
The body alignment API creates an empty assessment record and returns the relative route for the capture experience. The experience records front and side pose measurements and can generate a report in its result view.
POST /api/body-alignment
The request must use an authenticated GOFA integration for the client derived from the request host. Access remains subject to the client's account configuration. See User authentication and Client tokens for the credential handoff used by your integration.
The JSON body accepts these fields:
| Field | Type | Description |
|---|---|---|
userId | string, optional | Client user to associate with the result. The user must already exist for the client. |
skipCalibration | boolean, optional | Stores the request to skip calibration in the new record. |
locale | string, optional | Supported GOFA locale. Invalid locale values return 400. |
Example:
const response = await fetch("https://your-client.gofa.app/api/body-alignment", {
method: "POST",
headers: {
Authorization: `Bearer ${firebaseIdToken}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
userId: "client-user-id",
locale: "en",
skipCalibration: false,
}),
});
if (!response.ok) throw new Error(`Create failed (${response.status})`);
const assessment = await response.json();The successful response has status 201:
{
"bodyAlignmentResultId": "result-id",
"redirectUrl": "/assessment/body-alignment/result-id",
"createdAt": "2026-01-01T00:00:00.000Z"
}redirectUrl is relative to the client host. Open it as an iframe or navigate
to it in a trusted application. The result view is available at
/assessment/body-alignment/{bodyAlignmentResultId}/result.
GET /api/body-alignment/{bodyAlignmentResultId}
This route requires the same authenticated client boundary. A successful response is shaped as:
{
"data": {
"id": "result-id",
"clientId": "your-client-id",
"userId": "client-user-id",
"createdAt": "2026-01-01T00:00:00.000Z",
"front": {
"head": { "tilt": { "value": 1.2, "score": 0.8 } }
},
"side": {
"shoulder": { "shift": { "value": 0.4, "score": 0.9 } }
}
}
}The stored result uses front and side maps. Each body part may contain a
tilt and/or shift measurement with numeric value and score fields.
Supported body parts are head, shoulder, hip, and knee. Empty maps and
optional fields are normal while an assessment is in progress.
The result view can generate and persist the report as part of the normal assessment flow. Use the authenticated create and detail endpoints described above for your integration.
For the parent-window events emitted by the result view, see Body alignment iframe events.