Skip to navigation

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_history with status: "replaced", then the new goal is set with goal_updated_at and goal_author.
    • Empty string → the current goal is archived as replaced and 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 found
  • 422 — Validation errors

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

idstringRequired
User ID

Request

This endpoint expects an object.
goalstringOptional

Response

OK