Skip to content

Goals: single goal, list filters, completedAt and full responses - #103

Merged
jasontlouro merged 4 commits into
mainfrom
goals-api
Nov 24, 2026
Merged

jasontlouro merged 4 commits into
mainfrom
goals-api

Conversation

@jasontlouro

@jasontlouro jasontlouro commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Documents the goal API changes in trophyso/app develop (up to a241158a1), in English and Spanish.

Goals

  • New endpoint: Get a user's goal, GET /users/{id}/goals/{key}, in both navigations. It returns a goal with its steps, or a step.
  • Listing goals: GET /users/{id}/goals takes status, skip and limit (default 100, at most 100). Each goal comes with all of its steps, whatever their own status.
  • Completing a goal: goals are completed by setting completedAt, which replaces the completed boolean. A time without an offset is in the user's time zone, a time after now is read as now, and null uncompletes the goal.
  • Updating a goal: a goal's key can't change, and parent can't move it to another goal.
  • Metric goals: changing a metric goal's metric, target or start checks it against its target again. Other changes leave a completed metric goal completed, even if its total has since fallen. Only metric goals take metric, target or start.
  • Metric events: the metric event response's goals has, by key, the metric goals and steps the event counted towards, including any it completed. A new excerpt snippet shows it on the goals page.
  • Responses: every goal and step has id, parent (the key of the goal it's a step of, or null), created, updated, steps, done and total. steps is empty for a goal without steps and for a step. A metric goal's response still adds metric, target, start and current.
  • FAQ: a goal created with a deleted goal's key gets a new id.
  • Snippets: the update snippet sets completedAt in all eight languages, and the response snippet shows the new fields.

API reference

openapi/application.json is regenerated from app's fern/openapi/application.yml. Besides the goal changes, it lists the 403 an application user's key gets for another user on every operation that checks it.

npm run check passes.

Deployment

  • Merge once the goal API changes in app develop are deployed to production. Until then, the docs describe completedAt, the filters and the single-goal endpoint before they exist, along with the event response's goals.
  • Merge after the SDKs with getGoal and the completedAt field are published, so the snippets match them.

🤖 Generated with Claude Code

…completedAt, and the id, created, updated and steps every goal returns, and list the application user key 403s.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@mintlify

mintlify Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
trophy 🟢 Ready View Preview Nov 24, 2026, 9:02 PM

💡 Tip: Enable Automations to automatically generate PRs for you.

cbrinicombe13
cbrinicombe13 previously approved these changes Nov 24, 2026
…eir metric, target or start changes, and metric fields being for metric goals only.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
cbrinicombe13
cbrinicombe13 previously approved these changes Nov 24, 2026
…nd accept completedAt.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@jasontlouro
jasontlouro merged commit 66b9214 into main Nov 24, 2026
7 checks passed
@jasontlouro
jasontlouro deleted the goals-api branch November 24, 2026 21:09

This branch was successfully deployed

1 active deployment
staging — 9a27ef4b Deployed Nov 24, 2026 by mintlify[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants