This endpoint requires authentication. Include your API key in the request headers as X-API-Key.
Description
Creates a new variable in the system. Variables are used to track specific measurements or data points for patients.
Request Body
The name of the variable (e.g., “Blood Pressure”, “Heart Rate”)
The units of measurement for the variable (e.g., “mmHg”, “bpm”)
A description of what the variable represents
Response
The unique identifier of the created variable
The units of measurement for the variable
A description of what the variable represents
The number of patients that have values for this variable (initially 0)
Example Request
{
"name": "Systolic Blood Pressure",
"units": "mmHg",
"description": "Systolic and diastolic blood pressure measurements"
}
Example Response
{
"id": 1,
"name": "Systolic Blood Pressure",
"units": "mmHg",
"description": "Systolic and diastolic blood pressure measurements",
"user_id": 123
}
Error Responses
Invalid request data. The response will include an error message explaining what went wrong.
Authentication required. Make sure you’ve included a valid API key in the request headers.
The name of the variable (e.g., "Blood Pressure", "Heart Rate")
The units of measurement for the variable (e.g., "mmHg", "bpm")
A description of what the variable represents
Variable created successfully
The unique identifier of the created variable
The units of measurement for the variable
A description of what the variable represents
The ID of the user who created the variable