Create goal
curl --request POST \
--url https://app.hipp.health/api/v1/goals \
--header 'Content-Type: application/json' \
--data '
{
"type": "frequency_duration",
"treatmentPlanId": "<string>",
"goalStatement": "<string>",
"baselineMetric": {
"value": 123,
"observationPeriod": 123
},
"successMetric": {
"value": 123,
"observationPeriod": 123
},
"maintenanceMetric": {
"value": 123,
"observationPeriod": 123
},
"targetAchievementDate": "2023-11-07T05:31:56Z",
"baselineDate": "2023-11-07T05:31:56Z",
"targetMaladaptiveBehaviorName": "<string>",
"definition": "<string>",
"progressSummary": "<string>",
"instructions": "<string>",
"autoProgressToMaintenanceEnabled": false,
"autoProgressToMasteredEnabled": false,
"isBehavior": false
}
'{
"type": "<string>",
"publicId": "<string>",
"addedToTreatmentPlanAt": "2023-11-07T05:31:56Z",
"goalStatement": "<string>",
"autoProgressToMaintenanceEnabled": true,
"autoProgressToMasteredEnabled": true,
"baselineMetric": {
"publicId": "<string>",
"value": 123,
"observationPeriod": 123
},
"successMetric": {
"publicId": "<string>",
"value": 123,
"observationPeriod": 123
},
"maintenanceMetric": {
"publicId": "<string>",
"value": 123,
"observationPeriod": 123
},
"targetMaladaptiveBehaviorName": "<string>",
"definition": "<string>",
"instructions": "<string>",
"baselineDate": "2023-11-07T05:31:56Z",
"targetAchievementDate": "2023-11-07T05:31:56Z",
"progressSummary": "<string>",
"isBehavior": true,
"behaviorInstances": [
{
"publicId": "<string>",
"quantity": 123,
"happenedAt": "2023-11-07T05:31:56Z",
"antecedent": "<string>",
"consequence": "<string>",
"durationSeconds": 123
}
]
}Goals
Create Goal
Create a new goal (behavior or skill)
POST
/
v1
/
goals
Create goal
curl --request POST \
--url https://app.hipp.health/api/v1/goals \
--header 'Content-Type: application/json' \
--data '
{
"type": "frequency_duration",
"treatmentPlanId": "<string>",
"goalStatement": "<string>",
"baselineMetric": {
"value": 123,
"observationPeriod": 123
},
"successMetric": {
"value": 123,
"observationPeriod": 123
},
"maintenanceMetric": {
"value": 123,
"observationPeriod": 123
},
"targetAchievementDate": "2023-11-07T05:31:56Z",
"baselineDate": "2023-11-07T05:31:56Z",
"targetMaladaptiveBehaviorName": "<string>",
"definition": "<string>",
"progressSummary": "<string>",
"instructions": "<string>",
"autoProgressToMaintenanceEnabled": false,
"autoProgressToMasteredEnabled": false,
"isBehavior": false
}
'{
"type": "<string>",
"publicId": "<string>",
"addedToTreatmentPlanAt": "2023-11-07T05:31:56Z",
"goalStatement": "<string>",
"autoProgressToMaintenanceEnabled": true,
"autoProgressToMasteredEnabled": true,
"baselineMetric": {
"publicId": "<string>",
"value": 123,
"observationPeriod": 123
},
"successMetric": {
"publicId": "<string>",
"value": 123,
"observationPeriod": 123
},
"maintenanceMetric": {
"publicId": "<string>",
"value": 123,
"observationPeriod": 123
},
"targetMaladaptiveBehaviorName": "<string>",
"definition": "<string>",
"instructions": "<string>",
"baselineDate": "2023-11-07T05:31:56Z",
"targetAchievementDate": "2023-11-07T05:31:56Z",
"progressSummary": "<string>",
"isBehavior": true,
"behaviorInstances": [
{
"publicId": "<string>",
"quantity": 123,
"happenedAt": "2023-11-07T05:31:56Z",
"antecedent": "<string>",
"consequence": "<string>",
"durationSeconds": 123
}
]
}Create Goal
Create a new goal (frequency_duration, opportunity, rating, or interval) for a treatment plan.Headers
Authorization: Bearer <your-api-key>
Content-Type: application/json
Request Body
The request body varies based on the goal type. All goals require atype field and treatmentPlanId.
Frequency/Duration Based Goal Example
{
"type": "frequency_duration",
"treatmentPlanId": "tp_abc123def456",
"goalStatement": "Reduce aggressive behavior during transitions",
"targetMaladaptiveBehaviorName": "Aggression",
"definition": "Physical aggression including hitting, kicking, or pushing",
"instructions": "Monitor and record instances during class transitions",
"status": "IN_PROGRESS",
"targetAchievementDate": "2024-06-15T00:00:00Z",
"baselineDate": "2024-01-15T00:00:00Z",
"progressSummary": "Starting baseline observations",
"autoProgressToMaintenanceEnabled": false,
"autoProgressToMasteredEnabled": false,
"dataCollectionType": "FREQUENCY_ONLY",
"baselineMetric": {
"value": 10,
"unit": "FREQUENCY",
"frequencyUnit": "DAYS",
"observationPeriod": 1,
"observationPeriodUnit": "DAYS",
"successCriteria": "EQUAL_TO"
},
"successMetric": {
"value": 2,
"unit": "FREQUENCY",
"frequencyUnit": "DAYS",
"observationPeriod": 1,
"observationPeriodUnit": "DAYS",
"successCriteria": "LESS_THAN_OR_EQUAL_TO"
},
"maintenanceMetric": {
"value": 2,
"unit": "FREQUENCY",
"frequencyUnit": "DAYS",
"observationPeriod": 1,
"observationPeriodUnit": "DAYS",
"successCriteria": "LESS_THAN_OR_EQUAL_TO"
}
}
Opportunity Based Goal Example
{
"type": "opportunity",
"treatmentPlanId": "tp_abc123def456",
"skillAcquisitionGoalType": "CHAINED_GOAL",
"goalStatement": "Complete hand washing sequence independently",
"shortDescription": "Hand washing routine",
"instructions": "Use task analysis with 8 steps",
"skillCategory": "Self-care",
"status": "IN_PROGRESS",
"targetAchievementDate": "2024-01-15T00:00:00Z",
"baselineDate": "2024-01-15T00:00:00Z",
"minTrialsCount": 3,
"enabledOutcomes": ["SUCCESS", "FAILURE", "PROMPTED"],
"autoProgressToMaintenanceEnabled": false,
"autoProgressToMasteredEnabled": false,
"baselineMetric": {
"value": 20,
"unit": "PERCENTAGE",
"successCriteria": "EQUAL_TO"
},
"successMetric": {
"value": 80,
"unit": "PERCENTAGE",
"successCriteria": "GREATER_THAN_OR_EQUAL_TO"
},
"maintenanceMetric": {
"value": 80,
"unit": "PERCENTAGE",
"successCriteria": "GREATER_THAN_OR_EQUAL_TO"
},
"childGoals": [
{
"skillAcquisitionGoalType": "CHAINED_GOAL_TARGET",
"goalStatement": "Turn on water",
"enabledOutcomes": ["SUCCESS", "FAILURE", "PROMPTED"],
"baselineMetric": {
"value": 0,
"unit": "PERCENTAGE"
},
"successMetric": {
"value": 80,
"unit": "PERCENTAGE"
},
"maintenanceMetric": {
"value": 80,
"unit": "PERCENTAGE"
}
}
]
}
Rating Goal Example
{
"type": "rating",
"treatmentPlanId": "tp_abc123def456",
"title": "Anxiety level during transitions",
"description": "Rate anxiety on 1-10 scale",
"instructions": "Observe and rate at start of each transition",
"status": "IN_PROGRESS"
}
Interval Goal Example
{
"type": "interval",
"treatmentPlanId": "tp_abc123def456",
"title": "On-task behavior",
"description": "Track engagement during work periods",
"instructions": "Observe at end of each interval",
"status": "IN_PROGRESS",
"intervalDuration": 30,
"intervalQuantity": 10,
"sets": 3,
"intervalRecordingType": "WHOLE",
"window": 5
}
Field Descriptions
Common Fields (All Goal Types)
type(required): Goal type - “frequency_duration”, “opportunity”, “rating”, or “interval”treatmentPlanId(required): Treatment plan public identifierstatus(optional): Goal statustargetAchievementDate(optional): Target date for achieving the goalbaselineDate(optional): Date baseline measurements began
Frequency Duration Goal Fields
goalStatement(required): Description of the behavioral goaltargetMaladaptiveBehaviorName(optional): Name of the behavior to reducedefinition(optional): Operational definition of the behaviorinstructions(optional): Instructions for data collectionprogressSummary(optional): Summary of current progressautoProgressToMaintenanceEnabled(optional): Auto-progress to maintenance phaseautoProgressToMasteredEnabled(optional): Auto-progress to mastered statusdataCollectionType(optional): Type of data collection methodbaselineMetric(required): Baseline measurement criteriasuccessMetric(required): Success criteriamaintenanceMetric(required): Maintenance criteria
Opportunity Goal Fields
skillAcquisitionGoalType(required): Type of skill acquisitiongoalStatement(required): Description of the skill goalshortDescription(optional): Brief descriptioninstructions(optional): Instructions for teaching/data collectionskillCategory(optional): Category of skillminTrialsCount(optional): Minimum number of trials per sessionenabledOutcomes(required): Array of enabled trial outcomesbaselineMetric(required): Baseline measurement criteriasuccessMetric(required): Success criteriamaintenanceMetric(required): Maintenance criteriachildGoals(optional): Array of sub-goals for task analysis
Rating Goal Fields
title(required): Goal titledescription(optional): Goal descriptioninstructions(optional): Instructions for rating
Interval Goal Fields
title(required): Goal titledescription(optional): Goal descriptioninstructions(optional): Instructions for data collectionintervalDuration(required): Length of each interval in seconds (must be > 0)intervalQuantity(required): Number of intervals per set (must be > 0)sets(required): Number of sets (must be > 0)intervalRecordingType(required): Type of interval recordingwindow(optional): Observation window in seconds (must be > 0)
Success Response (201)
Response varies by goal type. Example for Frequency Duration Goal:{
"type": "frequency_duration",
"publicId": "goal_abc123",
"targetMaladaptiveBehaviorName": "Aggression",
"dataCollectionType": "FREQUENCY_ONLY",
"addedToTreatmentPlanAt": "2024-01-15T10:30:00Z",
"goalStatement": "Reduce aggressive behavior during transitions",
"definition": "Physical aggression including hitting, kicking, or pushing",
"instructions": "Monitor and record instances during class transitions",
"status": "IN_PROGRESS",
"baselineDate": "2024-01-15T00:00:00Z",
"targetAchievementDate": "2024-06-15T00:00:00Z",
"progressSummary": "Starting baseline observations",
"autoProgressToMaintenanceEnabled": false,
"autoProgressToMasteredEnabled": false,
"baselineMetric": {
"publicId": "metric_123",
"value": 10,
"unit": "FREQUENCY",
"frequencyUnit": "DAYS",
"observationPeriod": 1,
"observationPeriodUnit": "DAYS",
"successCriteria": "EQUAL_TO"
},
"successMetric": {
"publicId": "metric_124",
"value": 2,
"unit": "FREQUENCY",
"frequencyUnit": "DAYS",
"observationPeriod": 1,
"observationPeriodUnit": "DAYS",
"successCriteria": "LESS_THAN_OR_EQUAL_TO"
},
"maintenanceMetric": {
"publicId": "metric_125",
"value": 2,
"unit": "FREQUENCY",
"frequencyUnit": "DAYS",
"observationPeriod": 1,
"observationPeriodUnit": "DAYS",
"successCriteria": "LESS_THAN_OR_EQUAL_TO"
},
"behaviorInstances": null
}
Error Responses
400 - Validation Error
{
"error": "Validation error",
"details": [
{
"code": "invalid_string",
"message": "Goal statement is required",
"path": ["goalStatement"]
}
]
}
500 - Internal Server Error
{
"error": "An unexpected error occurred"
}
Examples
cURL Example
# Create a frequency duration goal
curl -X POST https://app.hipp.health/api/v1/goals \
-H "Authorization: Bearer your-api-key" \
-H "Content-Type: application/json" \
-d '{
"type": "frequency_duration",
"treatmentPlanId": "tp_abc123def456",
"goalStatement": "Reduce aggressive behavior during transitions",
"baselineMetric": {"value": 10, "unit": "FREQUENCY"},
"successMetric": {"value": 2, "unit": "FREQUENCY"},
"maintenanceMetric": {"value": 2, "unit": "FREQUENCY"}
}'
JavaScript Example
const createGoal = async (goalData) => {
const response = await fetch("https://app.hipp.health/api/v1/goals", {
method: "POST",
headers: {
Authorization: "Bearer your-api-key",
"Content-Type": "application/json",
},
body: JSON.stringify(goalData),
});
if (!response.ok) {
const error = await response.json();
throw new Error(error.error || "Failed to create goal");
}
return response.json();
};
// Usage - Create a frequency duration goal
try {
const goal = await createGoal({
type: "frequency_duration",
treatmentPlanId: "tp_abc123def456",
goalStatement: "Reduce aggressive behavior during transitions",
baselineMetric: { value: 10, unit: "FREQUENCY" },
successMetric: { value: 2, unit: "FREQUENCY" },
maintenanceMetric: { value: 2, unit: "FREQUENCY" },
});
console.log("Goal created:", goal);
} catch (error) {
console.error("Error creating goal:", error.message);
}
Body
application/json
- Frequency/Duration Based
- Opportunity Based
- Rating Goal
- Interval Goal
Available options:
frequency_duration Minimum string length:
1Minimum string length:
1Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Available options:
BASELINE, IN_MAINTENANCE, MASTERED, ARCHIVED, IN_PROGRESS, DISCONTINUED, FUTURE, ON_HOLD Available options:
FREQUENCY_ONLY, DURATION_ONLY, FREQUENCY_AND_DURATION Response
Successful response
- Frequency/Duration Based
- Opportunity Based
- Rating Goal
- Interval Goal
Available options:
FREQUENCY_ONLY, DURATION_ONLY, FREQUENCY_AND_DURATION Available options:
BASELINE, IN_MAINTENANCE, MASTERED, ARCHIVED, IN_PROGRESS, DISCONTINUED, FUTURE, ON_HOLD Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
⌘I