Skip to main content
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
  }
}
'
{
  "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
    }
  ]
}

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 status
  • targetMaladaptiveBehaviorName (optional): Name of target maladaptive behavior
  • definition (optional): Goal definition
  • goalStatement (optional): Goal statement (minimum 1 character)
  • progressSummary (optional): Progress summary
  • instructions (optional): Instructions for the goal
  • autoProgressToMaintenanceEnabled (optional): Enable auto-progress to maintenance. Default: false
  • autoProgressToMasteredEnabled (optional): Enable auto-progress to mastered. Default: false
  • baselineMetric (optional): Baseline metric object
    • value (optional): Metric value
    • unit (optional): Unit of measurement
    • frequencyUnit (optional): Frequency unit
    • observationPeriod (optional): Observation period
    • observationPeriodUnit (optional): Observation period unit
    • successCriteria (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 type
  • goalStatement (optional): Goal statement (minimum 1 character)
  • shortDescription (optional): Short description
  • instructions (optional): Instructions for the goal
  • skillCategory (optional): Skill category
  • orderAmongSiblings (optional): Order among siblings. Default: 0
  • status (optional): Goal status
  • baselineDate (optional): Baseline date
  • targetAchievementDate (optional): Target achievement date
  • progressSummary (optional): Progress summary
  • minTrialsCount (optional): Minimum trials count
  • enabledOutcomes (optional): Array of enabled outcomes
  • autoProgressToMaintenanceEnabled (optional): Enable auto-progress to maintenance. Default: false
  • autoProgressToMasteredEnabled (optional): Enable auto-progress to mastered. Default: false
  • baselineMetric (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 status
  • intervalDuration (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 type
  • window (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

goalId
string
required

Body

application/json
targetAchievementDate
string<date-time> | null
baselineDate
string<date-time> | null
status
enum<string> | null
Available options:
BASELINE,
IN_MAINTENANCE,
MASTERED,
ARCHIVED,
IN_PROGRESS,
DISCONTINUED,
FUTURE,
ON_HOLD
targetMaladaptiveBehaviorName
string | null
definition
string | null
goalStatement
string | null
Minimum string length: 1
progressSummary
string | null
instructions
string | null
autoProgressToMaintenanceEnabled
boolean | null
default:false
autoProgressToMasteredEnabled
boolean | null
default:false
isBehavior
boolean | null
default:false
baselineMetric
object
successMetric
object
maintenanceMetric
object
dataCollectionType
enum<string> | null
Available options:
FREQUENCY_ONLY,
DURATION_ONLY,
FREQUENCY_AND_DURATION

Response

Successful response

type
string
required
publicId
string
required
dataCollectionType
enum<string>
required
Available options:
FREQUENCY_ONLY,
DURATION_ONLY,
FREQUENCY_AND_DURATION
addedToTreatmentPlanAt
string<date-time>
required
goalStatement
string
required
status
enum<string>
required
Available options:
BASELINE,
IN_MAINTENANCE,
MASTERED,
ARCHIVED,
IN_PROGRESS,
DISCONTINUED,
FUTURE,
ON_HOLD
autoProgressToMaintenanceEnabled
boolean
required
autoProgressToMasteredEnabled
boolean
required
baselineMetric
object
required
successMetric
object
required
maintenanceMetric
object
required
targetMaladaptiveBehaviorName
string | null
definition
string | null
instructions
string | null
baselineDate
string<date-time> | null
targetAchievementDate
string<date-time> | null
progressSummary
string | null
isBehavior
boolean
behaviorInstances
object[] | null