Skip to main content

Milestones

Manage milestones for a specific goal. Milestones represent key steps or checkpoints on the path to achieving a goal.

Read scope: milestones:read | Write scope: milestones:write

List Milestones

Returns all active milestones for a goal, ordered by their position.

GET /api/v1/goals/:goalId/milestones

Parameters

ParameterInDescription
goalIdpathThe ID of the goal

Example Request

curl -H "Authorization: Bearer sk_live_your_key_here" \
https://api.strivejournal.com/api/v1/goals/abc123/milestones

Response

{
"data": [
{
"id": "ms001",
"description": "Complete first 5K run",
"status": "succeeded",
"order": 0,
"deadline": "2026-03-31T00:00:00.000Z",
"createdAt": "2026-01-15T10:30:00.000Z",
"updatedAt": "2026-02-10T08:00:00.000Z"
},
{
"id": "ms002",
"description": "Run a half marathon",
"status": "pending",
"order": 1,
"deadline": "2026-06-30T00:00:00.000Z",
"createdAt": "2026-01-15T10:35:00.000Z",
"updatedAt": "2026-01-15T10:35:00.000Z"
}
]
}

Errors

StatusErrorMeaning
403You are not a stakeholder of this goalYou don't have access to this goal

Get Milestone

Returns a single milestone by ID.

GET /api/v1/goals/:goalId/milestones/:milestoneId

Parameters

ParameterInDescription
goalIdpathThe ID of the goal
milestoneIdpathThe ID of the milestone

Example Request

curl -H "Authorization: Bearer sk_live_your_key_here" \
https://api.strivejournal.com/api/v1/goals/abc123/milestones/ms001

Response

{
"data": {
"id": "ms001",
"description": "Complete first 5K run",
"status": "succeeded",
"order": 0,
"deadline": "2026-03-31T00:00:00.000Z",
"createdAt": "2026-01-15T10:30:00.000Z",
"updatedAt": "2026-02-10T08:00:00.000Z"
}
}

Errors

StatusErrorMeaning
403You are not a stakeholder of this goalYou don't have access to this goal
404Milestone not foundNo milestone exists with this ID

Create Milestone

Creates a new milestone for a goal. You must be an admin or achiever of the goal.

Creating a milestone automatically triggers: tasksTotal counter increment, goal event logging, and deadline scheduling.

Required scope: milestones:write

POST /api/v1/goals/:goalId/milestones

Parameters

ParameterInDescription
goalIdpathThe ID of the goal

Request Body

FieldTypeRequiredDescription
contentstringYesThe milestone title/content
descriptionstringNoDetailed description
deadlinestringNoISO 8601 date for the milestone deadline
ordernumberNoPosition in the milestone list (default 0)
subtasksarrayNoArray of subtask objects

Example Request

curl -X POST \
-H "Authorization: Bearer sk_live_your_key_here" \
-H "Content-Type: application/json" \
-d '{"content": "Complete first 5K run", "deadline": "2026-03-31T00:00:00.000Z"}' \
https://api.strivejournal.com/api/v1/goals/abc123/milestones

Response (201 Created)

{
"data": {
"id": "ms003",
"content": "Complete first 5K run",
"description": "",
"status": "pending",
"order": 0,
"deadline": "2026-03-31T23:59:59.999Z",
"subtasks": [],
"createdAt": "2026-02-22T10:00:00.000Z",
"updatedAt": "2026-02-22T10:00:00.000Z"
}
}

Errors

StatusErrorMeaning
400content is required and must be a stringMissing or invalid content
403Only admins and achievers can create milestonesInsufficient role
404Goal not foundNo goal exists with this ID

Update Milestone

Updates a milestone. You must be an admin or achiever of the goal.

Updating a milestone triggers side effects: status changes update tasksCompleted counter, create events, and update supports.

Required scope: milestones:write

PATCH /api/v1/goals/:goalId/milestones/:milestoneId

Parameters

ParameterInDescription
goalIdpathThe ID of the goal
milestoneIdpathThe ID of the milestone

Request Body

All fields are optional. Only provided fields are updated.

FieldTypeDescription
contentstringThe milestone title/content
descriptionstringDetailed description
deadlinestringISO 8601 date
statusstring"pending", "succeeded", or "failed"
ordernumberPosition in the milestone list
subtasksarrayArray of subtask objects

Example Request

curl -X PATCH \
-H "Authorization: Bearer sk_live_your_key_here" \
-H "Content-Type: application/json" \
-d '{"status": "succeeded"}' \
https://api.strivejournal.com/api/v1/goals/abc123/milestones/ms001

Response

{
"data": {
"id": "ms001",
"content": "Complete first 5K run",
"status": "succeeded",
"...": "..."
}
}

Errors

StatusErrorMeaning
400No valid fields to updateNo recognized fields in request body
400status must be one of: pending, succeeded, failedInvalid status value
403Only admins and achievers can update milestonesInsufficient role
404Milestone not foundNo milestone exists with this ID

Delete Milestone

Soft-deletes a milestone. You must be an admin of the goal.

The milestone is not permanently removed — it is marked with a deletedAt timestamp and excluded from list queries. This triggers counter decrements and support cleanup.

Required scope: milestones:write

DELETE /api/v1/goals/:goalId/milestones/:milestoneId

Parameters

ParameterInDescription
goalIdpathThe ID of the goal
milestoneIdpathThe ID of the milestone

Example Request

curl -X DELETE \
-H "Authorization: Bearer sk_live_your_key_here" \
https://api.strivejournal.com/api/v1/goals/abc123/milestones/ms001

Response

{
"data": {
"id": "ms001",
"deleted": true
}
}

Errors

StatusErrorMeaning
403Only admins can delete milestonesYou must be an admin of the goal
404Milestone not foundNo milestone exists with this ID