> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hipp.health/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Goal

> Update a goal by goalId. Accepts different schema based on goal type (behavior, skill, rating, or interval)

## 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

```json theme={null}
{
  "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

```json theme={null}
{
  "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

```json theme={null}
{
  "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

```json theme={null}
{
  "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

```json theme={null}
{
  "error": "Validation error",
  "details": [
    {
      "code": "invalid_string",
      "message": "Goal statement must be at least 1 character",
      "path": ["goalStatement"]
    }
  ]
}
```

#### 500 - Internal Server Error

```json theme={null}
{
  "error": "An unexpected error occurred"
}
```

## Examples

### cURL Examples

#### Update Frequency Duration Goal

```bash theme={null}
# 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

```bash theme={null}
# 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

```bash theme={null}
# 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

```bash theme={null}
# 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

```javascript theme={null}
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);
}
```


## OpenAPI

````yaml PATCH /v1/goals/{goalId}
openapi: 3.0.0
info:
  title: Hipp Health API
  version: 1.0.0
  description: API for managing users and resources within your Hipp Health organization
servers:
  - url: https://app.hipp.health/api
    description: Production Server
security: []
paths:
  /v1/goals/{goalId}:
    patch:
      tags:
        - V1
      summary: Update goal by ID
      description: >-
        Update a goal by goalId. Accepts different schema based on goal type
        (behavior, skill, rating, or interval)
      operationId: patch-v1-goals-{goalId}
      parameters:
        - in: path
          name: goalId
          schema:
            type: string
          required: true
          example: '123'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateGoalSchema'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoalDetailSchema'
        '400':
          $ref: '#/components/responses/400'
        '500':
          $ref: '#/components/responses/500'
components:
  schemas:
    UpdateGoalSchema:
      type: object
      oneOf:
        - $ref: '#/components/schemas/UpdateBehaviorGoalSchema'
          title: Frequency/Duration Based
        - $ref: '#/components/schemas/UpdateSkillGoalSchema'
          title: Opportunity Based
        - $ref: '#/components/schemas/UpdateIntervalGoalSchema'
          title: Interval Goal
        - $ref: '#/components/schemas/UpdateRatingGoalSchema'
          title: Rating Goal
    GoalDetailSchema:
      type: object
      discriminator:
        propertyName: type
      oneOf:
        - $ref: '#/components/schemas/BehaviorGoalDetailSchema'
          title: Frequency/Duration Based
        - $ref: '#/components/schemas/SkillGoalDetailSchema'
          title: Opportunity Based
        - $ref: '#/components/schemas/RatingGoalDetailSchema'
          title: Rating Goal
        - $ref: '#/components/schemas/IntervalGoalDetailSchema'
          title: Interval Goal
    UpdateBehaviorGoalSchema:
      type: object
      properties:
        targetAchievementDate:
          type: string
          format: date-time
          nullable: true
        baselineDate:
          type: string
          format: date-time
          nullable: true
        status:
          $ref: '#/components/schemas/BehaviorGoalStatus'
          nullable: true
        targetMaladaptiveBehaviorName:
          type: string
          nullable: true
        definition:
          type: string
          nullable: true
        goalStatement:
          type: string
          minLength: 1
          nullable: true
        progressSummary:
          type: string
          nullable: true
        instructions:
          type: string
          nullable: true
        autoProgressToMaintenanceEnabled:
          type: boolean
          nullable: true
          default: false
        autoProgressToMasteredEnabled:
          type: boolean
          nullable: true
          default: false
        isBehavior:
          type: boolean
          nullable: true
          default: false
        baselineMetric:
          $ref: '#/components/schemas/CreateGoalMetricSchema'
          nullable: true
        successMetric:
          $ref: '#/components/schemas/CreateGoalMetricSchema'
          nullable: true
        maintenanceMetric:
          $ref: '#/components/schemas/CreateGoalMetricSchema'
          nullable: true
        dataCollectionType:
          $ref: '#/components/schemas/BehaviorDataCollectionType'
          nullable: true
    UpdateSkillGoalSchema:
      type: object
      properties:
        skillAcquisitionGoalType:
          $ref: '#/components/schemas/SkillAcquisitionGoalType'
          nullable: true
        goalStatement:
          type: string
          minLength: 1
          nullable: true
        shortDescription:
          type: string
          nullable: true
        instructions:
          type: string
          nullable: true
        skillCategory:
          type: string
          nullable: true
        orderAmongSiblings:
          type: number
          nullable: true
          default: 0
        status:
          $ref: '#/components/schemas/SkillAcquisitionGoalStatus'
          nullable: true
        baselineDate:
          type: string
          nullable: true
        targetAchievementDate:
          type: string
          nullable: true
        progressSummary:
          type: string
          nullable: true
        minTrialsCount:
          type: number
          nullable: true
        enabledOutcomes:
          type: array
          items:
            $ref: '#/components/schemas/TrialOutcomes'
          nullable: true
        autoProgressToMaintenanceEnabled:
          type: boolean
          nullable: true
          default: false
        autoProgressToMasteredEnabled:
          type: boolean
          nullable: true
          default: false
        baselineMetric:
          $ref: '#/components/schemas/CreateGoalMetricSchema'
          nullable: true
        successMetric:
          $ref: '#/components/schemas/CreateGoalMetricSchema'
          nullable: true
        maintenanceMetric:
          $ref: '#/components/schemas/CreateGoalMetricSchema'
          nullable: true
        childGoals:
          type: array
          items:
            $ref: '#/components/schemas/CreateChildSkillGoalSchema'
          nullable: true
    UpdateIntervalGoalSchema:
      type: object
      properties:
        title:
          type: string
          minLength: 1
          nullable: true
        description:
          type: string
          minLength: 1
          nullable: true
        instructions:
          type: string
          minLength: 1
          nullable: true
        status:
          $ref: '#/components/schemas/GoalStatus'
          nullable: true
        intervalDuration:
          type: integer
          minimum: 0
          exclusiveMinimum: true
          nullable: true
        intervalQuantity:
          type: integer
          minimum: 0
          exclusiveMinimum: true
          nullable: true
        sets:
          type: integer
          minimum: 0
          exclusiveMinimum: true
          nullable: true
        intervalRecordingType:
          $ref: '#/components/schemas/IntervalRecordingType'
          nullable: true
        window:
          type: integer
          minimum: 0
          exclusiveMinimum: true
          nullable: true
    UpdateRatingGoalSchema:
      type: object
      properties:
        title:
          type: string
          minLength: 1
          nullable: true
        description:
          type: string
          minLength: 1
          nullable: true
        instructions:
          type: string
          minLength: 1
          nullable: true
        status:
          $ref: '#/components/schemas/GoalStatus'
          nullable: true
    BehaviorGoalDetailSchema:
      type: object
      properties:
        type:
          type: string
        publicId:
          type: string
        targetMaladaptiveBehaviorName:
          type: string
          nullable: true
        dataCollectionType:
          $ref: '#/components/schemas/BehaviorDataCollectionType'
        addedToTreatmentPlanAt:
          type: string
          format: date-time
        goalStatement:
          type: string
        definition:
          type: string
          nullable: true
        instructions:
          type: string
          nullable: true
        status:
          $ref: '#/components/schemas/BehaviorGoalStatus'
        baselineDate:
          type: string
          format: date-time
          nullable: true
        targetAchievementDate:
          type: string
          format: date-time
          nullable: true
        progressSummary:
          type: string
          nullable: true
        autoProgressToMaintenanceEnabled:
          type: boolean
        autoProgressToMasteredEnabled:
          type: boolean
        isBehavior:
          type: boolean
        baselineMetric:
          $ref: '#/components/schemas/GoalMetricSchema'
        successMetric:
          $ref: '#/components/schemas/GoalMetricSchema'
        maintenanceMetric:
          $ref: '#/components/schemas/GoalMetricSchema'
        behaviorInstances:
          type: array
          items:
            type: object
            properties:
              publicId:
                type: string
              quantity:
                type: number
              durationSeconds:
                type: number
                nullable: true
              happenedAt:
                type: string
                format: date-time
              antecedent:
                type: string
              consequence:
                type: string
            required:
              - publicId
              - quantity
              - happenedAt
              - antecedent
              - consequence
          nullable: true
      required:
        - type
        - publicId
        - dataCollectionType
        - addedToTreatmentPlanAt
        - goalStatement
        - status
        - autoProgressToMaintenanceEnabled
        - autoProgressToMasteredEnabled
        - baselineMetric
        - successMetric
        - maintenanceMetric
    SkillGoalDetailSchema:
      type: object
      properties:
        type:
          type: string
        publicId:
          type: string
        goalStatement:
          type: string
        skillAcquisitionGoalType:
          $ref: '#/components/schemas/SkillAcquisitionGoalType'
        shortDescription:
          type: string
          nullable: true
        instructions:
          type: string
          nullable: true
        skillCategory:
          type: string
          nullable: true
        status:
          $ref: '#/components/schemas/SkillAcquisitionGoalStatus'
        baselineDate:
          type: string
          format: date-time
          nullable: true
        targetAchievementDate:
          type: string
          format: date-time
          nullable: true
        progressSummary:
          type: string
          nullable: true
        minTrialsCount:
          type: number
          nullable: true
        enabledOutcomes:
          type: array
          items:
            $ref: '#/components/schemas/TrialOutcomes'
        autoProgressToMaintenanceEnabled:
          type: boolean
        autoProgressToMasteredEnabled:
          type: boolean
        baselineMetric:
          $ref: '#/components/schemas/GoalMetricSchema'
        successMetric:
          $ref: '#/components/schemas/GoalMetricSchema'
        maintenanceMetric:
          $ref: '#/components/schemas/GoalMetricSchema'
        childGoals:
          type: array
          items:
            type: object
            properties:
              publicId:
                type: string
            required:
              - publicId
          nullable: true
        skillTrials:
          type: array
          items:
            type: object
            properties:
              happenedAt:
                type: string
                format: date-time
              trialOutcome:
                $ref: '#/components/schemas/TrialOutcomes'
                nullable: true
          nullable: true
      required:
        - type
        - publicId
        - goalStatement
        - skillAcquisitionGoalType
        - status
        - enabledOutcomes
        - autoProgressToMaintenanceEnabled
        - autoProgressToMasteredEnabled
        - baselineMetric
        - successMetric
        - maintenanceMetric
    RatingGoalDetailSchema:
      type: object
      properties:
        type:
          type: string
        publicId:
          type: string
        title:
          type: string
        description:
          type: string
          nullable: true
        instructions:
          type: string
          nullable: true
        status:
          $ref: '#/components/schemas/GoalStatus'
        measurementType:
          type: string
          enum:
            - RATING
        ratingInstances:
          type: array
          items:
            type: object
            properties:
              publicId:
                type: string
              rating:
                type: number
              happenedAt:
                type: string
                format: date-time
            required:
              - publicId
              - rating
              - happenedAt
      required:
        - type
        - publicId
        - title
        - status
        - measurementType
        - ratingInstances
    IntervalGoalDetailSchema:
      type: object
      properties:
        type:
          type: string
        publicId:
          type: string
        title:
          type: string
        description:
          type: string
          nullable: true
        instructions:
          type: string
          nullable: true
        status:
          $ref: '#/components/schemas/GoalStatus'
        measurementType:
          type: string
          enum:
            - INTERVAL
        intervalDuration:
          type: integer
        intervalQuantity:
          type: integer
        sets:
          type: integer
        intervalRecordingType:
          $ref: '#/components/schemas/IntervalRecordingType'
        window:
          type: integer
          nullable: true
        intervalSets:
          type: array
          items:
            type: object
            properties:
              setNumber:
                type: number
              happenedAt:
                type: string
              endTime:
                type: string
                format: date-time
                nullable: true
              present:
                type: number
              absent:
                type: number
              instances:
                type: array
                items:
                  type: object
                  properties:
                    intervalNumber:
                      type: number
                    isPresent:
                      type: boolean
                      nullable: true
                    happenedAt:
                      type: string
                  required:
                    - intervalNumber
                    - happenedAt
            required:
              - setNumber
              - happenedAt
              - present
              - absent
              - instances
      required:
        - type
        - publicId
        - title
        - status
        - measurementType
        - intervalDuration
        - intervalQuantity
        - sets
        - intervalRecordingType
        - intervalSets
    ValidationError:
      type: object
      properties:
        error:
          type: string
          example: Validation error
        details:
          type: array
          items:
            type: object
            properties:
              code:
                type: string
                example: invalid_string
              message:
                type: string
                example: Valid email is required
              path:
                type: array
                items:
                  type: string
                example:
                  - email
    BehaviorGoalStatus:
      type: string
      enum:
        - BASELINE
        - IN_MAINTENANCE
        - MASTERED
        - ARCHIVED
        - IN_PROGRESS
        - DISCONTINUED
        - FUTURE
        - ON_HOLD
    CreateGoalMetricSchema:
      type: object
      properties:
        value:
          type: number
          nullable: true
        unit:
          $ref: '#/components/schemas/GoalMetricUnit'
          nullable: true
        frequencyUnit:
          $ref: '#/components/schemas/GoalMetricFrequencyUnit'
          nullable: true
        observationPeriod:
          type: number
          nullable: true
        observationPeriodUnit:
          $ref: '#/components/schemas/GoalMetricFrequencyUnit'
          nullable: true
        successCriteria:
          $ref: '#/components/schemas/GoalMetricSuccessCriteria'
          nullable: true
    BehaviorDataCollectionType:
      type: string
      enum:
        - FREQUENCY_ONLY
        - DURATION_ONLY
        - FREQUENCY_AND_DURATION
    SkillAcquisitionGoalType:
      type: string
      enum:
        - SINGLE_TARGET_GOAL
        - MULTI_TARGET_GOAL
        - CHAINED_GOAL
        - MULTI_TARGET_GOAL_TARGET
        - CHAINED_GOAL_TARGET
    SkillAcquisitionGoalStatus:
      type: string
      enum:
        - IN_PROGRESS
        - IN_MAINTENANCE
        - MASTERED
        - DISCONTINUED
        - FUTURE
        - ON_HOLD
        - BASELINE
        - ARCHIVED
    TrialOutcomes:
      type: string
      enum:
        - SUCCESS
        - FAILURE
        - PROMPTED
        - FULL_PHYSICAL_PROMPT
        - PARTIAL_PHYSICAL_PROMPT
        - MODEL_PROMPT
        - GESTURE_PROMPT
        - VERBAL_PROMPT
        - VISUAL_PROMPT
        - ENVIRONMENTAL_PROMPT
        - SHAPING_PROMPT
        - TACTILE_PROMPT
        - TIME_DELAY_PROMPT
        - WITHIN_STIMULUS_POSITION_PROMPT
        - WITHIN_STIMULUS_FADING_CUE_PROMPT
        - VERBAL_FULL_MODEL_PROMPT
        - VERBAL_PARTIAL_MODEL_PROMPT
        - VERBAL_PHONEMIC_CUE_PROMPT
        - VERBAL_CONTEXTUAL_CUE_PROMPT
        - VERBAL_SIMULTANEOUS_IMITATION_PROMPT
        - VERBAL_ABA_ONLY_INDIRECT_PROMPT
        - PHYSICAL_PARTIAL_PROMPT
        - PHYSICAL_TOUCH_CUE_PROMPT
        - PHYSICAL_IMPLIED_TOUCH_PROMPT
        - PHYSICAL_SHADOW_PROMPT
        - PHYSICAL_HAND_OVER_HAND_PROMPT
        - PHYSICAL_MINIMAL_ASSIST_PROMPT
        - PHYSICAL_MODERATE_ASSIST_PROMPT
        - PHYSICAL_MAX_ASSIST_PROMPT
        - PHYSICAL_CONTACT_GUARD_PROMPT
        - ENVIRONMENTAL_STANDBY_ASSIST_PROMPT
        - ENVIRONMENTAL_MODIFICATION_PROMPT
        - ENVIRONMENTAL_LOSS_OF_BALANCE_PROMPT
        - ENVIRONMENTAL_INCREASED_COMPLETION_TIME_PROMPT
        - GESTURAL_POINTING_PROMPT
        - GESTURAL_MOTIONING_PROMPT
        - GESTURAL_PARTIAL_MODEL_PROMPT
        - GESTURAL_FULL_MODEL_PROMPT
        - VISUAL_POINTING_PROMPT
        - VISUAL_MOTIONING_PROMPT
        - VISUAL_CUE_PROMPT
        - WITHIN_STIMULUS_POSITION_5_PROMPT
        - WITHIN_STIMULUS_POSITION_4_PROMPT
        - WITHIN_STIMULUS_POSITION_3_PROMPT
        - WITHIN_STIMULUS_POSITION_2_PROMPT
        - WITHIN_STIMULUS_POSITION_1_PROMPT
        - WITHIN_STIMULUS_POSITION_EQUIDISTANT_MATERIALS_PROMPT
        - WITHIN_STIMULUS_FADING_DASHED_LINES_PROMPT
        - WITHIN_STIMULUS_FADING_TOUCH_POINTS_PROMPT
        - WITHIN_STIMULUS_FADING_COLOR_PROMPT
        - WITHIN_STIMULUS_FADING_TEXTUAL_PROMPT
        - WITHIN_STIMULUS_FADING_BORDERS_PROMPT
        - WITHIN_STIMULUS_FADING_HIGHLIGHTER_PROMPT
        - TIME_DELAY_5_SECONDS_PROMPT
        - TIME_DELAY_4_SECONDS_PROMPT
        - TIME_DELAY_3_SECONDS_PROMPT
        - TIME_DELAY_2_SECONDS_PROMPT
        - TIME_DELAY_1_SECOND_PROMPT
        - TIME_DELAY_0_SECONDS_PROMPT
        - SHAPING_TIME_PROMPT
        - SHAPING_RESPONSE_PROMPT
        - ORAL_POSTURAL_PROMPT
        - TACTILE_KINESTHETIC_PROMPT
        - INDEPENDENT_PROMPT
        - SUPERVISION_PROMPT
        - CONTACT_GUARD
        - MINIMAL_ASSISTANCE_PROMPT
        - MODERATE_ASSISTANCE_PROMPT
        - MAXIMAL_ASSISTANCE_PROMPT
        - TOTAL_ASSISTANCE_PROMPT
        - MINIMAL_VERBAL_PROMPTS_OR_ASSISTANCE_PROMPT
        - MODERATE_VERBAL_PROMPTS_OR_ASSISTANCE_PROMPT
        - MAXIMAL_VERBAL_PROMPTS_OR_ASSISTANCE_PROMPT
        - EXPECTANT_PAUSE_PROMPT
        - INDIRECT_NONVERBAL_PROMPT
        - INDIRECT_VERBAL_PROMPT
        - REQUEST_A_RESPONSE_PROMPT
        - PARTIAL_VERBAL_PROMPT
        - DIRECT_MODEL_PROMPT
        - PARTIAL_PHYSICAL_ASSISTANCE_PROMPT
        - PHYSICAL_PROMPT
    CreateChildSkillGoalSchema:
      type: object
      properties:
        skillAcquisitionGoalType:
          $ref: '#/components/schemas/SkillAcquisitionGoalType'
        goalStatement:
          type: string
          minLength: 1
        shortDescription:
          type: string
          nullable: true
        instructions:
          type: string
          nullable: true
        skillCategory:
          type: string
          nullable: true
        orderAmongSiblings:
          type: number
          nullable: true
        status:
          $ref: '#/components/schemas/SkillAcquisitionGoalStatus'
          nullable: true
        baselineDate:
          type: string
          nullable: true
        targetAchievementDate:
          type: string
          nullable: true
        progressSummary:
          type: string
          nullable: true
        minTrialsCount:
          type: number
          nullable: true
        enabledOutcomes:
          type: array
          items:
            $ref: '#/components/schemas/TrialOutcomes'
        autoProgressToMaintenanceEnabled:
          type: boolean
          nullable: true
          default: false
        autoProgressToMasteredEnabled:
          type: boolean
          nullable: true
          default: false
        baselineMetric:
          $ref: '#/components/schemas/CreateGoalMetricSchema'
        successMetric:
          $ref: '#/components/schemas/CreateGoalMetricSchema'
        maintenanceMetric:
          $ref: '#/components/schemas/CreateGoalMetricSchema'
      required:
        - skillAcquisitionGoalType
        - goalStatement
        - enabledOutcomes
        - baselineMetric
        - successMetric
        - maintenanceMetric
    GoalStatus:
      type: string
      enum:
        - IN_PROGRESS
        - BASELINE
        - IN_MAINTENANCE
        - MASTERED
        - ON_HOLD
        - DISCONTINUED
        - FUTURE
        - ARCHIVED
    IntervalRecordingType:
      type: string
      enum:
        - PARTIAL
        - MOMENTARY
        - WHOLE
    GoalMetricSchema:
      type: object
      properties:
        publicId:
          type: string
        value:
          type: number
          nullable: true
        unit:
          $ref: '#/components/schemas/GoalMetricUnit'
          nullable: true
        frequencyUnit:
          $ref: '#/components/schemas/GoalMetricFrequencyUnit'
          nullable: true
        observationPeriod:
          type: number
          nullable: true
        observationPeriodUnit:
          $ref: '#/components/schemas/GoalMetricFrequencyUnit'
          nullable: true
        successCriteria:
          $ref: '#/components/schemas/GoalMetricSuccessCriteria'
          nullable: true
      required:
        - publicId
    GoalMetricUnit:
      type: string
      enum:
        - FREQUENCY
        - PERCENTAGE
        - DURATION
    GoalMetricFrequencyUnit:
      type: string
      enum:
        - SECONDS
        - MINUTES
        - HOURS
        - DAYS
        - WEEKS
        - SESSIONS
    GoalMetricSuccessCriteria:
      type: string
      enum:
        - EQUAL_TO
        - LESS_THAN
        - GREATER_THAN
        - LESS_THAN_OR_EQUAL_TO
        - GREATER_THAN_OR_EQUAL_TO
  responses:
    '400':
      description: Bad Request - Validation Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ValidationError'
    '500':
      description: Internal Server Error
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
                example: An unexpected error occurred

````