Update goal by ID
curl --request PATCH \
--url https://app.hipp.health/api/v1/goals/{goalId} \
--header 'Content-Type: application/json' \
--data '
{
"targetAchievementDate": "2023-11-07T05:31:56Z",
"baselineDate": "2023-11-07T05:31:56Z",
"targetMaladaptiveBehaviorName": "<string>",
"definition": "<string>",
"goalStatement": "<string>",
"progressSummary": "<string>",
"instructions": "<string>",
"autoProgressToMaintenanceEnabled": false,
"autoProgressToMasteredEnabled": false,
"isBehavior": false,
"baselineMetric": {
"value": 123,
"observationPeriod": 123
},
"successMetric": {
"value": 123,
"observationPeriod": 123
},
"maintenanceMetric": {
"value": 123,
"observationPeriod": 123
}
}
'import requests
url = "https://app.hipp.health/api/v1/goals/{goalId}"
payload = {
"targetAchievementDate": "2023-11-07T05:31:56Z",
"baselineDate": "2023-11-07T05:31:56Z",
"targetMaladaptiveBehaviorName": "<string>",
"definition": "<string>",
"goalStatement": "<string>",
"progressSummary": "<string>",
"instructions": "<string>",
"autoProgressToMaintenanceEnabled": False,
"autoProgressToMasteredEnabled": False,
"isBehavior": False,
"baselineMetric": {
"value": 123,
"observationPeriod": 123
},
"successMetric": {
"value": 123,
"observationPeriod": 123
},
"maintenanceMetric": {
"value": 123,
"observationPeriod": 123
}
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
targetAchievementDate: '2023-11-07T05:31:56Z',
baselineDate: '2023-11-07T05:31:56Z',
targetMaladaptiveBehaviorName: '<string>',
definition: '<string>',
goalStatement: '<string>',
progressSummary: '<string>',
instructions: '<string>',
autoProgressToMaintenanceEnabled: false,
autoProgressToMasteredEnabled: false,
isBehavior: false,
baselineMetric: {value: 123, observationPeriod: 123},
successMetric: {value: 123, observationPeriod: 123},
maintenanceMetric: {value: 123, observationPeriod: 123}
})
};
fetch('https://app.hipp.health/api/v1/goals/{goalId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.hipp.health/api/v1/goals/{goalId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'targetAchievementDate' => '2023-11-07T05:31:56Z',
'baselineDate' => '2023-11-07T05:31:56Z',
'targetMaladaptiveBehaviorName' => '<string>',
'definition' => '<string>',
'goalStatement' => '<string>',
'progressSummary' => '<string>',
'instructions' => '<string>',
'autoProgressToMaintenanceEnabled' => false,
'autoProgressToMasteredEnabled' => false,
'isBehavior' => false,
'baselineMetric' => [
'value' => 123,
'observationPeriod' => 123
],
'successMetric' => [
'value' => 123,
'observationPeriod' => 123
],
'maintenanceMetric' => [
'value' => 123,
'observationPeriod' => 123
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.hipp.health/api/v1/goals/{goalId}"
payload := strings.NewReader("{\n \"targetAchievementDate\": \"2023-11-07T05:31:56Z\",\n \"baselineDate\": \"2023-11-07T05:31:56Z\",\n \"targetMaladaptiveBehaviorName\": \"<string>\",\n \"definition\": \"<string>\",\n \"goalStatement\": \"<string>\",\n \"progressSummary\": \"<string>\",\n \"instructions\": \"<string>\",\n \"autoProgressToMaintenanceEnabled\": false,\n \"autoProgressToMasteredEnabled\": false,\n \"isBehavior\": false,\n \"baselineMetric\": {\n \"value\": 123,\n \"observationPeriod\": 123\n },\n \"successMetric\": {\n \"value\": 123,\n \"observationPeriod\": 123\n },\n \"maintenanceMetric\": {\n \"value\": 123,\n \"observationPeriod\": 123\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://app.hipp.health/api/v1/goals/{goalId}")
.header("Content-Type", "application/json")
.body("{\n \"targetAchievementDate\": \"2023-11-07T05:31:56Z\",\n \"baselineDate\": \"2023-11-07T05:31:56Z\",\n \"targetMaladaptiveBehaviorName\": \"<string>\",\n \"definition\": \"<string>\",\n \"goalStatement\": \"<string>\",\n \"progressSummary\": \"<string>\",\n \"instructions\": \"<string>\",\n \"autoProgressToMaintenanceEnabled\": false,\n \"autoProgressToMasteredEnabled\": false,\n \"isBehavior\": false,\n \"baselineMetric\": {\n \"value\": 123,\n \"observationPeriod\": 123\n },\n \"successMetric\": {\n \"value\": 123,\n \"observationPeriod\": 123\n },\n \"maintenanceMetric\": {\n \"value\": 123,\n \"observationPeriod\": 123\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.hipp.health/api/v1/goals/{goalId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"targetAchievementDate\": \"2023-11-07T05:31:56Z\",\n \"baselineDate\": \"2023-11-07T05:31:56Z\",\n \"targetMaladaptiveBehaviorName\": \"<string>\",\n \"definition\": \"<string>\",\n \"goalStatement\": \"<string>\",\n \"progressSummary\": \"<string>\",\n \"instructions\": \"<string>\",\n \"autoProgressToMaintenanceEnabled\": false,\n \"autoProgressToMasteredEnabled\": false,\n \"isBehavior\": false,\n \"baselineMetric\": {\n \"value\": 123,\n \"observationPeriod\": 123\n },\n \"successMetric\": {\n \"value\": 123,\n \"observationPeriod\": 123\n },\n \"maintenanceMetric\": {\n \"value\": 123,\n \"observationPeriod\": 123\n }\n}"
response = http.request(request)
puts response.read_body{
"type": "<string>",
"publicId": "<string>",
"dataCollectionType": "FREQUENCY_ONLY",
"addedToTreatmentPlanAt": "2023-11-07T05:31:56Z",
"goalStatement": "<string>",
"status": "BASELINE",
"autoProgressToMaintenanceEnabled": true,
"autoProgressToMasteredEnabled": true,
"baselineMetric": {
"publicId": "<string>",
"value": 123,
"unit": "FREQUENCY",
"frequencyUnit": "SECONDS",
"observationPeriod": 123,
"observationPeriodUnit": "SECONDS",
"successCriteria": "EQUAL_TO"
},
"successMetric": {
"publicId": "<string>",
"value": 123,
"unit": "FREQUENCY",
"frequencyUnit": "SECONDS",
"observationPeriod": 123,
"observationPeriodUnit": "SECONDS",
"successCriteria": "EQUAL_TO"
},
"maintenanceMetric": {
"publicId": "<string>",
"value": 123,
"unit": "FREQUENCY",
"frequencyUnit": "SECONDS",
"observationPeriod": 123,
"observationPeriodUnit": "SECONDS",
"successCriteria": "EQUAL_TO"
},
"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
}
]
}{
"message": "Validation Error",
"statusCode": 400,
"validationErrors": [
{
"code": "invalid_type",
"message": "Required",
"path": [
"email"
]
}
]
}{
"error": "An unexpected error occurred",
"statusCode": 500
}Goals
Update Goal
Update a goal by goalId. Accepts different schema based on goal type (behavior, skill, rating, or interval)
PATCH
/
v1
/
goals
/
{goalId}
Update goal by ID
curl --request PATCH \
--url https://app.hipp.health/api/v1/goals/{goalId} \
--header 'Content-Type: application/json' \
--data '
{
"targetAchievementDate": "2023-11-07T05:31:56Z",
"baselineDate": "2023-11-07T05:31:56Z",
"targetMaladaptiveBehaviorName": "<string>",
"definition": "<string>",
"goalStatement": "<string>",
"progressSummary": "<string>",
"instructions": "<string>",
"autoProgressToMaintenanceEnabled": false,
"autoProgressToMasteredEnabled": false,
"isBehavior": false,
"baselineMetric": {
"value": 123,
"observationPeriod": 123
},
"successMetric": {
"value": 123,
"observationPeriod": 123
},
"maintenanceMetric": {
"value": 123,
"observationPeriod": 123
}
}
'import requests
url = "https://app.hipp.health/api/v1/goals/{goalId}"
payload = {
"targetAchievementDate": "2023-11-07T05:31:56Z",
"baselineDate": "2023-11-07T05:31:56Z",
"targetMaladaptiveBehaviorName": "<string>",
"definition": "<string>",
"goalStatement": "<string>",
"progressSummary": "<string>",
"instructions": "<string>",
"autoProgressToMaintenanceEnabled": False,
"autoProgressToMasteredEnabled": False,
"isBehavior": False,
"baselineMetric": {
"value": 123,
"observationPeriod": 123
},
"successMetric": {
"value": 123,
"observationPeriod": 123
},
"maintenanceMetric": {
"value": 123,
"observationPeriod": 123
}
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
targetAchievementDate: '2023-11-07T05:31:56Z',
baselineDate: '2023-11-07T05:31:56Z',
targetMaladaptiveBehaviorName: '<string>',
definition: '<string>',
goalStatement: '<string>',
progressSummary: '<string>',
instructions: '<string>',
autoProgressToMaintenanceEnabled: false,
autoProgressToMasteredEnabled: false,
isBehavior: false,
baselineMetric: {value: 123, observationPeriod: 123},
successMetric: {value: 123, observationPeriod: 123},
maintenanceMetric: {value: 123, observationPeriod: 123}
})
};
fetch('https://app.hipp.health/api/v1/goals/{goalId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.hipp.health/api/v1/goals/{goalId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'targetAchievementDate' => '2023-11-07T05:31:56Z',
'baselineDate' => '2023-11-07T05:31:56Z',
'targetMaladaptiveBehaviorName' => '<string>',
'definition' => '<string>',
'goalStatement' => '<string>',
'progressSummary' => '<string>',
'instructions' => '<string>',
'autoProgressToMaintenanceEnabled' => false,
'autoProgressToMasteredEnabled' => false,
'isBehavior' => false,
'baselineMetric' => [
'value' => 123,
'observationPeriod' => 123
],
'successMetric' => [
'value' => 123,
'observationPeriod' => 123
],
'maintenanceMetric' => [
'value' => 123,
'observationPeriod' => 123
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.hipp.health/api/v1/goals/{goalId}"
payload := strings.NewReader("{\n \"targetAchievementDate\": \"2023-11-07T05:31:56Z\",\n \"baselineDate\": \"2023-11-07T05:31:56Z\",\n \"targetMaladaptiveBehaviorName\": \"<string>\",\n \"definition\": \"<string>\",\n \"goalStatement\": \"<string>\",\n \"progressSummary\": \"<string>\",\n \"instructions\": \"<string>\",\n \"autoProgressToMaintenanceEnabled\": false,\n \"autoProgressToMasteredEnabled\": false,\n \"isBehavior\": false,\n \"baselineMetric\": {\n \"value\": 123,\n \"observationPeriod\": 123\n },\n \"successMetric\": {\n \"value\": 123,\n \"observationPeriod\": 123\n },\n \"maintenanceMetric\": {\n \"value\": 123,\n \"observationPeriod\": 123\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://app.hipp.health/api/v1/goals/{goalId}")
.header("Content-Type", "application/json")
.body("{\n \"targetAchievementDate\": \"2023-11-07T05:31:56Z\",\n \"baselineDate\": \"2023-11-07T05:31:56Z\",\n \"targetMaladaptiveBehaviorName\": \"<string>\",\n \"definition\": \"<string>\",\n \"goalStatement\": \"<string>\",\n \"progressSummary\": \"<string>\",\n \"instructions\": \"<string>\",\n \"autoProgressToMaintenanceEnabled\": false,\n \"autoProgressToMasteredEnabled\": false,\n \"isBehavior\": false,\n \"baselineMetric\": {\n \"value\": 123,\n \"observationPeriod\": 123\n },\n \"successMetric\": {\n \"value\": 123,\n \"observationPeriod\": 123\n },\n \"maintenanceMetric\": {\n \"value\": 123,\n \"observationPeriod\": 123\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.hipp.health/api/v1/goals/{goalId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"targetAchievementDate\": \"2023-11-07T05:31:56Z\",\n \"baselineDate\": \"2023-11-07T05:31:56Z\",\n \"targetMaladaptiveBehaviorName\": \"<string>\",\n \"definition\": \"<string>\",\n \"goalStatement\": \"<string>\",\n \"progressSummary\": \"<string>\",\n \"instructions\": \"<string>\",\n \"autoProgressToMaintenanceEnabled\": false,\n \"autoProgressToMasteredEnabled\": false,\n \"isBehavior\": false,\n \"baselineMetric\": {\n \"value\": 123,\n \"observationPeriod\": 123\n },\n \"successMetric\": {\n \"value\": 123,\n \"observationPeriod\": 123\n },\n \"maintenanceMetric\": {\n \"value\": 123,\n \"observationPeriod\": 123\n }\n}"
response = http.request(request)
puts response.read_body{
"type": "<string>",
"publicId": "<string>",
"dataCollectionType": "FREQUENCY_ONLY",
"addedToTreatmentPlanAt": "2023-11-07T05:31:56Z",
"goalStatement": "<string>",
"status": "BASELINE",
"autoProgressToMaintenanceEnabled": true,
"autoProgressToMasteredEnabled": true,
"baselineMetric": {
"publicId": "<string>",
"value": 123,
"unit": "FREQUENCY",
"frequencyUnit": "SECONDS",
"observationPeriod": 123,
"observationPeriodUnit": "SECONDS",
"successCriteria": "EQUAL_TO"
},
"successMetric": {
"publicId": "<string>",
"value": 123,
"unit": "FREQUENCY",
"frequencyUnit": "SECONDS",
"observationPeriod": 123,
"observationPeriodUnit": "SECONDS",
"successCriteria": "EQUAL_TO"
},
"maintenanceMetric": {
"publicId": "<string>",
"value": 123,
"unit": "FREQUENCY",
"frequencyUnit": "SECONDS",
"observationPeriod": 123,
"observationPeriodUnit": "SECONDS",
"successCriteria": "EQUAL_TO"
},
"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
}
]
}{
"message": "Validation Error",
"statusCode": 400,
"validationErrors": [
{
"code": "invalid_type",
"message": "Required",
"path": [
"email"
]
}
]
}{
"error": "An unexpected error occurred",
"statusCode": 500
}Update Goal
Update a goal by goalId. Accepts different schema based on goal type (frequency_duration, opportunity, rating, or interval).Path Parameters
goalId(required): The goal’s public identifier
Headers
Authorization: Bearer <your-api-key>
Request Body
All fields are optional. Only include fields you want to update. The schema varies by goal type.Frequency Duration Goal Fields
targetAchievementDate(optional): Target achievement date (ISO 8601 format)baselineDate(optional): Baseline date (ISO 8601 format)status(optional): Goal statustargetMaladaptiveBehaviorName(optional): Name of target maladaptive behaviordefinition(optional): Goal definitiongoalStatement(optional): Goal statement (minimum 1 character)progressSummary(optional): Progress summaryinstructions(optional): Instructions for the goalautoProgressToMaintenanceEnabled(optional): Enable auto-progress to maintenance. Default:falseautoProgressToMasteredEnabled(optional): Enable auto-progress to mastered. Default:falsebaselineMetric(optional): Baseline metric objectvalue(optional): Metric valueunit(optional): Unit of measurementfrequencyUnit(optional): Frequency unitobservationPeriod(optional): Observation periodobservationPeriodUnit(optional): Observation period unitsuccessCriteria(optional): Success criteria
successMetric(optional): Success metric object (same structure as baselineMetric)maintenanceMetric(optional): Maintenance metric object (same structure as baselineMetric)dataCollectionType(optional): Data collection type
Opportunity Goal Fields
skillAcquisitionGoalType(optional): Skill acquisition goal typegoalStatement(optional): Goal statement (minimum 1 character)shortDescription(optional): Short descriptioninstructions(optional): Instructions for the goalskillCategory(optional): Skill categoryorderAmongSiblings(optional): Order among siblings. Default:0status(optional): Goal statusbaselineDate(optional): Baseline datetargetAchievementDate(optional): Target achievement dateprogressSummary(optional): Progress summaryminTrialsCount(optional): Minimum trials countenabledOutcomes(optional): Array of enabled outcomesautoProgressToMaintenanceEnabled(optional): Enable auto-progress to maintenance. Default:falseautoProgressToMasteredEnabled(optional): Enable auto-progress to mastered. Default:falsebaselineMetric(optional): Baseline metric object (same structure as behavior goal)successMetric(optional): Success metric object (same structure as behavior goal)maintenanceMetric(optional): Maintenance metric object (same structure as behavior goal)childGoals(optional): Array of child goals
Interval Goal Fields
title(optional): Goal title (minimum 1 character)description(optional): Goal description (minimum 1 character)instructions(optional): Instructions (minimum 1 character)status(optional): Goal statusintervalDuration(optional): Interval duration (must be greater than 0)intervalQuantity(optional): Interval quantity (must be greater than 0)sets(optional): Number of sets (must be greater than 0)intervalRecordingType(optional): Interval recording typewindow(optional): Window (must be greater than 0)
Rating Goal Fields
title(optional): Goal title (minimum 1 character)description(optional): Goal description (minimum 1 character)instructions(optional): Instructions (minimum 1 character)status(optional): Goal status
Success Response (200)
Returns the updated goal. Response schema varies by goal type (frequency_duration, opportunity, rating, or interval).Frequency Duration Goal Response Example
{
"type": "frequency_duration",
"publicId": "goal_123abc",
"targetMaladaptiveBehaviorName": "Aggression",
"dataCollectionType": "FREQUENCY_ONLY",
"addedToTreatmentPlanAt": "2024-01-15T10:00:00Z",
"goalStatement": "Reduce aggressive behaviors by 80%",
"definition": "Physical aggression including hitting, kicking, or pushing others",
"instructions": "Record each instance of aggressive behavior",
"status": "IN_PROGRESS",
"baselineDate": "2024-01-15T00:00:00Z",
"targetAchievementDate": "2024-06-15T00:00:00Z",
"progressSummary": "Patient showing improvement",
"autoProgressToMaintenanceEnabled": false,
"autoProgressToMasteredEnabled": false,
"baselineMetric": {
"publicId": "metric_abc123",
"value": 10,
"unit": "FREQUENCY",
"frequencyUnit": "DAYS",
"observationPeriod": 1,
"observationPeriodUnit": "DAYS",
"successCriteria": "EQUAL_TO"
},
"successMetric": {
"publicId": "metric_def456",
"value": 2,
"unit": "FREQUENCY",
"frequencyUnit": "DAYS",
"observationPeriod": 1,
"observationPeriodUnit": "DAYS",
"successCriteria": "LESS_THAN_OR_EQUAL_TO"
},
"maintenanceMetric": {
"publicId": "metric_ghi789",
"value": 2,
"unit": "FREQUENCY",
"frequencyUnit": "DAYS",
"observationPeriod": 1,
"observationPeriodUnit": "DAYS",
"successCriteria": "LESS_THAN_OR_EQUAL_TO"
},
"behaviorInstances": []
}
Opportunity Goal Response Example
{
"type": "opportunity",
"publicId": "goal_456def",
"goalStatement": "Identify colors correctly",
"skillAcquisitionGoalType": "SINGLE_TARGET_GOAL",
"shortDescription": "Color identification",
"instructions": "Present color cards and ask child to identify",
"skillCategory": "receptive_language",
"status": "IN_PROGRESS",
"baselineDate": "2024-01-15T00:00:00Z",
"targetAchievementDate": "2024-06-15T00:00:00Z",
"progressSummary": "Making steady progress",
"minTrialsCount": 10,
"enabledOutcomes": ["SUCCESS", "FAILURE", "PROMPTED"],
"autoProgressToMaintenanceEnabled": false,
"autoProgressToMasteredEnabled": true,
"baselineMetric": {
"publicId": "metric_jkl012",
"value": 20,
"unit": "PERCENTAGE",
"successCriteria": "EQUAL_TO"
},
"successMetric": {
"publicId": "metric_mno345",
"value": 80,
"unit": "PERCENTAGE",
"successCriteria": "GREATER_THAN_OR_EQUAL_TO"
},
"maintenanceMetric": {
"publicId": "metric_pqr678",
"value": 90,
"unit": "PERCENTAGE",
"successCriteria": "GREATER_THAN_OR_EQUAL_TO"
},
"childGoals": [],
"skillTrials": []
}
Interval Goal Response Example
{
"type": "interval",
"publicId": "goal_789ghi",
"title": "On-task behavior",
"description": "Student remains on task during work periods",
"instructions": "Observe student at each interval",
"status": "IN_PROGRESS",
"measurementType": "INTERVAL",
"intervalDuration": 30,
"intervalQuantity": 10,
"sets": 3,
"intervalRecordingType": "PARTIAL",
"window": 5,
"intervalSets": []
}
Rating Goal Response Example
{
"type": "rating",
"publicId": "goal_012jkl",
"title": "Mood rating",
"description": "Daily mood assessment",
"instructions": "Rate mood on scale of 1-10",
"status": "IN_PROGRESS",
"measurementType": "RATING",
"ratingInstances": []
}
Error Responses
400 - Validation Error
{
"error": "Validation error",
"details": [
{
"code": "invalid_string",
"message": "Goal statement must be at least 1 character",
"path": ["goalStatement"]
}
]
}
500 - Internal Server Error
{
"error": "An unexpected error occurred"
}
Examples
cURL Examples
Update Frequency Duration Goal
# Update frequency duration goal statement and status
curl -X PATCH "https://app.hipp.health/api/v1/goals/goal_123abc" \
-H "Authorization: Bearer your-api-key" \
-H "Content-Type: application/json" \
-d '{
"goalStatement": "Reduce aggressive behaviors by 90%",
"status": "IN_MAINTENANCE",
"progressSummary": "Significant improvement observed"
}'
# Update frequency duration goal with metrics
curl -X PATCH "https://app.hipp.health/api/v1/goals/goal_123abc" \
-H "Authorization: Bearer your-api-key" \
-H "Content-Type: application/json" \
-d '{
"targetAchievementDate": "2024-12-31T00:00:00Z",
"successMetric": {
"value": 1,
"unit": "FREQUENCY",
"frequencyUnit": "DAYS",
"successCriteria": "LESS_THAN_OR_EQUAL_TO"
}
}'
Update Opportunity Goal
# Update opportunity goal
curl -X PATCH "https://app.hipp.health/api/v1/goals/goal_456def" \
-H "Authorization: Bearer your-api-key" \
-H "Content-Type: application/json" \
-d '{
"status": "MASTERED",
"progressSummary": "Goal achieved successfully",
"minTrialsCount": 15
}'
Update Interval Goal
# Update interval goal
curl -X PATCH "https://app.hipp.health/api/v1/goals/goal_789ghi" \
-H "Authorization: Bearer your-api-key" \
-H "Content-Type: application/json" \
-d '{
"title": "Updated on-task behavior",
"intervalDuration": 45,
"sets": 5
}'
Update Rating Goal
# Update rating goal
curl -X PATCH "https://app.hipp.health/api/v1/goals/goal_012jkl" \
-H "Authorization: Bearer your-api-key" \
-H "Content-Type: application/json" \
-d '{
"title": "Updated mood rating",
"description": "Daily mood assessment with notes",
"status": "IN_PROGRESS"
}'
JavaScript Example
const updateGoal = async (goalId, updates) => {
const response = await fetch(`/api/v1/goals/${goalId}`, {
method: "PATCH",
headers: {
Authorization: "Bearer your-api-key",
"Content-Type": "application/json",
},
body: JSON.stringify(updates),
});
if (!response.ok) {
const error = await response.json();
throw new Error(error.error || "Failed to update goal");
}
return response.json();
};
// Update frequency duration goal
try {
const updatedGoal = await updateGoal("goal_123abc", {
goalStatement: "Reduce aggressive behaviors by 90%",
status: "IN_MAINTENANCE",
progressSummary: "Significant improvement observed",
});
console.log("Updated goal:", updatedGoal);
} catch (error) {
console.error("Error updating goal:", error.message);
}
// Update opportunity goal
try {
const updatedOpportunityGoal = await updateGoal("goal_456def", {
status: "MASTERED",
autoProgressToMasteredEnabled: true,
minTrialsCount: 15,
});
console.log("Updated opportunity goal:", updatedOpportunityGoal);
} catch (error) {
console.error("Error updating opportunity goal:", error.message);
}
Path Parameters
Body
application/json
- Frequency/Duration Based
- Opportunity Based
- Interval Goal
- Rating Goal
Available options:
BASELINE, IN_MAINTENANCE, MASTERED, ARCHIVED, IN_PROGRESS, DISCONTINUED, FUTURE, ON_HOLD Minimum string length:
1Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
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