---
title: "Create Goal"
method: POST
path: "/api/v1/performance/employees/{employeeId}/goals"
tags: ["Goals", "Public API"]
---

# Create Goal

`POST /api/v1/performance/employees/{employeeId}/goals`

Create a new goal for an employee. To create a simple goal without milestones, omit the `milestones` field; the goal's progress can then be changed with `update-goal-progress`. To create a milestone-based goal, provide `milestones` as a non-empty array of `{ "title": string }` objects; the goal's percent complete is then derived from milestone completion and should be changed via `update-goal-milestone-progress`. Sending `milestones: null` is treated as omitted (creates a simple goal).

OAuth Scopes: goal.write

## Path parameters

- `employeeId` string, required

## Request body

- object
  - `title` string, required — The title of the goal
  - `description` string — A detailed description of the goal
  - `dueDate` string, date, required — The due date for the goal in YYYY-MM-DD format
  - `percentComplete` integer — Initial percentage of completion for a simple goal (0-100). Defaults to 0 if omitted. Ignored when `milestones` is provided; milestone-based goals derive percent complete from milestone completion and should be updated via `update-goal-milestone-progress`.
  - `completionDate` string, date, nullable — The date when the goal was completed in YYYY-MM-DD format. Only valid when percentComplete is 100; providing this field with any other percentComplete value will result in an error.
  - `sharedWithEmployeeIds` integer[], required — List of internal employee IDs with whom the goal is shared. Must include the internal employee ID of the goal owner.
  - `alignsWithOptionId` integer, nullable — ID of the option this goal aligns with
  - `milestones` object[] — Optional. Provide a non-empty array of milestone objects to create a milestone-based goal. Omit this field (or send `null`) to create a simple goal.
    - `title` string — The title of the milestone

## Response `201`

A goal object that includes the new goal.

- TransformedApiEmployeeGoalDetails
  - `goal` object — An individual goal
    - `id` string — The id of the goal.
    - `title` string — Title of the goal.
    - `description` string — A description of the goal.
    - `percentComplete` integer — A percentage (0-100) that denotes how complete the goal is.
    - `alignsWithOptionId` string, nullable
    - `sharedWithEmployeeIds` integer[] — Ids of the employees that have access to this goal.
    - `dueDate` string — The due date of the goal.
    - `completionDate` string, nullable — ISO 8601 UTC timestamp of when the goal was completed.
    - `lastChangedDateTime` string, nullable — ISO 8601 UTC timestamp of when the goal was last modified.
    - `status` 'in_progress' | 'completed' | 'closed' — The status of the goal.
    - `milestones` object[], nullable — All milestones for the individual goal. This array will not exist if milestones are not selected for this goal.
      - `id` integer — The id of the milestone.
      - `employeeGoalId` integer — The id of the goal which encompasses this milestone.
      - `title` string — The title of the milestone.
      - `currentValue` number, nullable — The current value for a numeric milestone. This number will be rounded to the nearest hundredth. On the creation of a numeric milestone this value will automatically be set to the start value of the milestone. If the milestone is a simple checkbox milestone, this value will always be null.
      - `startValue` number, nullable — The starting value for a numeric milestone. This number will be rounded to the nearest hundredth. If the milestone is a simple checkbox milestone, this value will always be null.
      - `endValue` number, nullable — The end goal for a numeric milestone. This number will be rounded to the nearest hundredth. If the milestone is a simple checkbox milestone, this value will always be null.
      - `completedDateTime` string — The date and time in which the goal has been completed. If the goal is not completed the value will be null.
      - `lastUpdateDateTime` string — The date and time in which the goal was last updated.
      - `lastUpdateUserId` integer — The ID of the user who last updated this milestone.
    - `actions` object, nullable — Actions that are available to a goal with milestones enabled. This object will not appear on a goal without milestones.
      - `canEditGoalProgressBar` boolean — Can the user edit the progress bar of this goal.
      - `canEditGoalMilestoneProgressBar` boolean — can the user edit the progress of a milestone in this goal.

## Other responses

- `400` — The request body is invalid or required fields are missing or malformed (e.g. invalid dueDate, percentComplete out of range, completionDate provided with a non-100 percentComplete, sharedWithEmployeeIds not an array or missing the goal owner).
- `403` — If the authenticated caller does not have permission to create a goal for this employee.
- `500` — If there was a problem creating the goal.

---

[API](https://skmtc.net/bamboohr/apis/bamboohr-api.md) · [All operations](https://skmtc.net/bamboohr/apis/bamboohr-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/bamboohr/bamboohr-api/revisions/19ebf391a399/schema)
