Set Goal
Set, replace, or clear the current user’s goal. This is Update User Profile sending only the goal field.
Authentication: Required — Bearer token (member). The user is resolved within the current app, so the id must belong to a member of this app.
Path parameters:
id(required) — The user’s ID
Request body:
goal(string) — New goal text, trimmed.- Same as the current goal → no change.
- Different value → the previous goal moves to
goal_historywithstatus: "replaced", then the new goal is set withgoal_updated_atandgoal_author. - Empty string → the current goal is archived as
replacedand cleared.
Side effects: When a new non-empty goal is set, highlights are extracted in the background into goal_highlights.
To mark the goal achieved instead of replacing it, use Complete Goal.
Response: Updated user profile.
Errors:
404— User not found422— Validation errors
Authentication
AuthorizationBearer
Bearer authentication of the form Bearer <token>, where token is your auth token.
Path parameters
id
User ID
Request
This endpoint expects an object.
goal
Response
OK