Skip to main content

Update week-plan intent

Updates the week intent (lazy-creates the header if it does not exist yet).
1 min read
patch/week-plan/profiles/{studioId}/by-week
Request example
Response
patch/week-plan/profiles/{studioId}/by-week

Authorization

Authorizationstringheaderrequired#
Better Auth session token. Go resolves the token in the session table and maps it to users.id via auth_user_id. The profile is taken from the path param :studioId when applicable.

Path parameters

studioIdstringrequired#

Body

application/json
weekStartDateKeystringrequired#
intentstring#
Weekly intent (short text). Empty clears the field.

Responses

application/json
OK.
dataobjectrequired#
Show child attributes
idstring#
Absent when no header exists yet for the week.
studioIdstringrequired#
weekStartDateKeystringrequired#
intentstring#
Weekly intent (optional short text).
createdBystring#
itemsobject[]required#
Show child attributes
idstringrequired#
planIdstringrequired#
studioIdstringrequired#
dateKeystring#
Day YYYY-MM-DD. Null = Later (no day) for that week.
titlestringrequired#
notesstring#
doneAtstring#
sortOrderintegerrequired#
calendarReminderIdstring#
Linked Calendar reminder (optional).
sourceTaskIdstring#
Source task when added from Tasks (optional).
sourceActivityIdstring#
Linked habit (optional; XOR with sourceTaskId).
seriesIdstring#
Active weekly series (omitted if the series is paused).
repeatWeekdayinteger#
Series weekday (0 = Sunday … 6 = Saturday) if active.

Range: 0–6

createdBystringrequired#
createdAtstringrequired#
updatedAtstringrequired#
createdAtstring#
updatedAtstring#
request_idstring#