Skip to main content

Posts

Create, retrieve, and delete posts for a specific goal. Posts represent progress updates, notes, or story entries on the path to achieving a goal.

List Posts

Returns posts for a goal, ordered by date (newest first).

Required scope: posts:read

GET /api/v1/goals/:goalId/posts

Parameters

ParameterInDescription
goalIdpathThe ID of the goal
limitqueryNumber of posts to return (default 50, max 100)

Example Request

curl -H "Authorization: Bearer sk_live_your_key_here" \
https://api.strivejournal.com/api/v1/goals/abc123/posts?limit=10

Response

{
"data": [
{
"id": "post001",
"description": "Completed my first 5K run today!",
"goalId": "abc123",
"uid": "user123",
"url": "",
"date": "2026-02-20T14:00:00.000Z",
"createdAt": "2026-02-20T14:00:00.000Z",
"updatedAt": "2026-02-20T14:00:00.000Z"
}
]
}

Errors

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

Get Post

Returns a single post by ID.

Required scope: posts:read

GET /api/v1/goals/:goalId/posts/:postId

Parameters

ParameterInDescription
goalIdpathThe ID of the goal
postIdpathThe ID of the post

Example Request

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

Response

{
"data": {
"id": "post001",
"description": "Completed my first 5K run today!",
"goalId": "abc123",
"uid": "user123",
"url": "",
"date": "2026-02-20T14:00:00.000Z",
"createdAt": "2026-02-20T14:00:00.000Z",
"updatedAt": "2026-02-20T14:00:00.000Z"
}
}

Errors

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

Create Post

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

Creating a post automatically triggers events: a goal story item is created and a goal event is logged.

Required scope: posts:write

POST /api/v1/goals/:goalId/posts

Parameters

ParameterInDescription
goalIdpathThe ID of the goal

Request Body

FieldTypeRequiredDescription
descriptionstringYesThe post content
datestringNoISO 8601 date. Defaults to current time
urlstringNoAn optional URL to attach
milestoneIdstringNoLink this post to a milestone

Example Request

curl -X POST \
-H "Authorization: Bearer sk_live_your_key_here" \
-H "Content-Type: application/json" \
-d '{"description": "Ran 10km today!", "milestoneId": "ms001"}' \
https://api.strivejournal.com/api/v1/goals/abc123/posts

Response (201 Created)

{
"data": {
"id": "post002",
"description": "Ran 10km today!",
"goalId": "abc123",
"uid": "user123",
"milestoneId": "ms001",
"url": "",
"date": "2026-02-22T10:00:00.000Z",
"createdAt": "2026-02-22T10:00:00.000Z",
"updatedAt": "2026-02-22T10:00:00.000Z"
}
}

Errors

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

Delete Post

Deletes a post. Only the post owner or a goal admin can delete posts.

Deleting a post automatically triggers cleanup: associated media and story items are removed.

Required scope: posts:write

DELETE /api/v1/goals/:goalId/posts/:postId

Parameters

ParameterInDescription
goalIdpathThe ID of the goal
postIdpathThe ID of the post

Example Request

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

Response

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

Errors

StatusErrorMeaning
403Only post owner or goal admin can delete postsInsufficient permissions
404Post not foundNo post exists with this ID