Defines the recurrence schedule for a habit. A habit can occur daily, on specific days of the week, on specific days of the month, or at a fixed interval of days.
Input payload for creating a date-based end condition.
Option 1
Option 2
Option 3
Option 4
Show child attributes
Response
Habit updated successfully
{"docsConfig":{"theme":"aspen","$schema":"https://mintlify.com/docs.json","name":"Habitify","description":"This is the official knowledge base of Habitify, the habit tracker app for iOS, Android, desktop, and web. Find step-by-step guides on creating and tracking your habits, setting up integrations and automations for advanced tracking, and exploring Habitify's AI features, including Habitify MCP, Habi AI, and Siri AI-supported.","colors":{"primary":"#164AF2","light":"#164AF2","dark":"#1D45C9"},"logo":{"light":"https://mintcdn.com/habitify/6ubuIYTR9HqwJmST/images/Group3.png?fit=max\u0026auto=format\u0026n=6ubuIYTR9HqwJmST\u0026q=85\u0026s=19d2ca75b3476d732425d7ae3a079d41","dark":"https://mintcdn.com/habitify/79szqEEvHCts8PIA/images/Group1.png?fit=max\u0026auto=format\u0026n=79szqEEvHCts8PIA\u0026q=85\u0026s=aa244f00b99bdfebc0839912c4fadfbd"},"favicon":{"light":"https://mintcdn.com/habitify/6mDwR9tnCNQh0nLA/images/64-Desktop.png?fit=max\u0026auto=format\u0026n=6mDwR9tnCNQh0nLA\u0026q=85\u0026s=1a92045ea4ab8565691f7db03ebccb55","dark":"https://mintcdn.com/habitify/6mDwR9tnCNQh0nLA/images/64-Desktop.png?fit=max\u0026auto=format\u0026n=6mDwR9tnCNQh0nLA\u0026q=85\u0026s=1a92045ea4ab8565691f7db03ebccb55"},"navbar":{"links":[{"href":"mailto:contact@habitify.me","label":"Contact Us"}],"primary":{"type":"button","label":"Download App","href":"https://habitify.me/download"}},"footer":{"socials":{"x":"https://x.com/usehabitify","instagram":"https://instagram.com/habitify.me","facebook":"https://facebook.com/habitify","website":"https://habitify.me"}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"habitify","hasAudioNarration":false,"actualSubdomain":"habitify","customDomains":["docs.habitify.me"],"gitSource":{"type":"github","owner":"unstatic-co","repo":"habitify-public-docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"chroma":{"latestBuiltDeploymentHistoryId":"6ad97767e2e889d7781ddf13","collectionId":"6068df77-ee1d-4d32-b116-279e1ecbb741","liveDeploymentHistoryId":"6ad97767e2e889d7781ddf13","schemaVersion":"v3"},"feedback":{"thumbs":false,"issues":false},"entitlements":{},"buildId":"6ad97767e2e889d7781ddf13","clientVersion":"0.0.3966","searchFilterCounts":[{"language":"default","tag":"Documentation","count":41},{"language":"default","tag":"API Documentation","count":24},{"language":"default","tag":"Integration","count":9},{"language":"default","tag":"Features","count":8},{"language":"default","tag":"Habits","count":8},{"language":"default","tag":"Habit Logs","count":7},{"language":"default","tag":"Tools","count":6},{"language":"default","tag":"Plans \u0026 Billing","count":5},{"language":"default","tag":"Areas","count":5},{"language":"default","tag":"Automation","count":4}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-v7-file-tree","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"pause-universal-search-reconcile","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"per-site-search-delta","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-private-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-nav-generations","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-agent-model-picker","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"isAtlas":false,"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"api-reference/habits/update-a-habit","slug":"/api-reference/habits/update-a-habit","pageMetadata":{"title":"Update a habit","description":"Update the properties of an existing habit. Only the fields provided in the request body are updated; omitted fields remain unchanged.","deprecated":null,"version":null,"openapi":"https://static.habitify.me/habitify_apidocsv2_261026.json put /habits/{habitId}","href":"/api-reference/habits/update-a-habit","autogeneratedByOpenApi":true},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Update the properties of an existing habit. Only the fields provided in the request body are updated; omitted fields remain unchanged.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Update a habit","description":"Update the properties of an existing habit. Only the fields provided in the request body are updated; omitted fields remain unchanged.","deprecated":null,"version":null,"openapi":"https://static.habitify.me/habitify_apidocsv2_261026.json put /habits/{habitId}","href":"/api-reference/habits/update-a-habit","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"tags":["Habits"],"summary":"Update a habit","description":"Update the properties of an existing habit. Only the fields provided in the request body are updated; omitted fields remain unchanged.","parameters":["a289e40c-6fc0-4406-96ce-8ca3800426e0"],"requestBody":"a45b4923-45e3-41fb-b41c-118010bcb186","responses":{"200":"d9d05790-2586-4049-9079-aa81e722b3a1","400":"2af3df50-7ba2-48d1-823f-caa330f64a1c","401":"5ff5e2b7-6b27-448f-93e3-9c6dccf15cb0","404":"b6d735d0-b638-4720-95e9-0eea4274dc83","422":"89ee714b-5641-4278-a14e-4f00a8959e94"},"method":"put","type":"path","servers":["92f06b36-4899-4a5f-95c1-eee7c40252af"],"security":["73b0dc9b-9203-4495-928c-38f0b8b18062","be42732c-7489-4c64-adf3-fbd786f2fa63","320a74b5-e987-458a-b04d-66c0c79170a1"],"path":"/habits/{habitId}","baseUrlOptions":["https://api.habitify.me/v2"],"title":"Update a habit","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{"a289e40c-6fc0-4406-96ce-8ca3800426e0":{"name":"habitId","in":"path","required":true,"schema":{"type":"string","isRequired":true,"description":"The unique identifier of the habit to update","uniqueKey":"","typeLabel":"string"},"description":"The unique identifier of the habit to update"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"New display name for the habit","uniqueKey":"name","typeLabel":"string"},"description":{"type":"string","description":"New description for the habit","uniqueKey":"description","typeLabel":"string"},"occurrence":{"oneOf":[{"type":"object","description":"Defines the recurrence schedule for a habit. A habit can occur daily, on specific days of the week, on specific days of the month, or at a fixed interval of days.\n","required":["type"],"properties":{"type":{"type":"string","enum":["daily"],"description":"Indicates the habit occurs every day","isRequired":true,"uniqueKey":"occurrence.oneOf.0.type","typeLabel":"enum\u003cstring>"}},"uniqueKey":"occurrence.oneOf.0","typeLabel":"object"},{"type":"object","description":"Defines the recurrence schedule for a habit. A habit can occur daily, on specific days of the week, on specific days of the month, or at a fixed interval of days.\n","required":["type","days"],"properties":{"type":{"type":"string","enum":["weekDays"],"description":"Indicates the habit occurs on selected weekdays","isRequired":true,"uniqueKey":"occurrence.oneOf.1.type","typeLabel":"enum\u003cstring>"},"days":{"type":"array","items":{"type":"integer","minimum":0,"maximum":6,"description":"Day of the week (0 = Sunday, 1 = Monday, ..., 6 = Saturday)","uniqueKey":"occurrence.oneOf.1.days.items.[INDEX]","typeLabel":"integer"},"minItems":1,"maxItems":7,"uniqueItems":true,"description":"List of weekday numbers when the habit should occur","isRequired":true,"uniqueKey":"occurrence.oneOf.1.days","typeLabel":"integer[]"}},"uniqueKey":"occurrence.oneOf.1","typeLabel":"object"},{"type":"object","description":"Defines the recurrence schedule for a habit. A habit can occur daily, on specific days of the week, on specific days of the month, or at a fixed interval of days.\n","required":["type","days"],"properties":{"type":{"type":"string","enum":["monthDays"],"description":"Indicates the habit occurs on selected days of the month","isRequired":true,"uniqueKey":"occurrence.oneOf.2.type","typeLabel":"enum\u003cstring>"},"days":{"type":"array","items":{"type":"integer","minimum":1,"maximum":31,"description":"Day of the month (1-31)","uniqueKey":"occurrence.oneOf.2.days.items.[INDEX]","typeLabel":"integer"},"minItems":1,"maxItems":31,"uniqueItems":true,"description":"List of month day numbers when the habit should occur","isRequired":true,"uniqueKey":"occurrence.oneOf.2.days","typeLabel":"integer[]"}},"uniqueKey":"occurrence.oneOf.2","typeLabel":"object"},{"type":"object","description":"Defines the recurrence schedule for a habit. A habit can occur daily, on specific days of the week, on specific days of the month, or at a fixed interval of days.\n","required":["type","interval"],"properties":{"type":{"type":"string","enum":["intervalDays"],"description":"Indicates the habit occurs at a fixed day interval","isRequired":true,"uniqueKey":"occurrence.oneOf.3.type","typeLabel":"enum\u003cstring>"},"interval":{"type":"integer","minimum":1,"description":"Number of days between each occurrence","isRequired":true,"uniqueKey":"occurrence.oneOf.3.interval","typeLabel":"integer"}},"uniqueKey":"occurrence.oneOf.3","typeLabel":"object"}],"uniqueKey":"occurrence","typeLabel":"object"},"startDate":{"type":"string","format":"date","description":"New start date for the habit (YYYY-MM-DD format)","uniqueKey":"startDate","typeLabel":"string\u003cdate>"},"icon":{"type":"string","description":"New icon identifier","uniqueKey":"icon","typeLabel":"string"},"colorHex":{"type":"string","description":"New hex color code","uniqueKey":"colorHex","typeLabel":"string"},"customUnitName":{"type":"string","description":"New custom unit name for measurable habits","uniqueKey":"customUnitName","typeLabel":"string"},"areaIds":{"type":"array","items":{"type":"string","uniqueKey":"areaIds.items.[INDEX]","typeLabel":"string"},"description":"Area IDs to assign the habit to (replaces existing assignments)","uniqueKey":"areaIds","typeLabel":"string[]"},"timeOfDayIds":{"type":"array","items":{"type":"string","uniqueKey":"timeOfDayIds.items.[INDEX]","typeLabel":"string"},"description":"Time-of-day period IDs to assign the habit to (replaces existing assignments)","uniqueKey":"timeOfDayIds","typeLabel":"string[]"},"goal":{"description":"Goal to set for the habit","type":"object","required":["periodicity","value","unit"],"properties":{"periodicity":{"description":"The time period over which a goal is measured. - `daily`: Goal resets every day. - `weekly`: Goal resets every week. - `monthly`: Goal resets every month. - `yearly`: Goal resets every year.\n","type":"string","enum":["daily","weekly","monthly","yearly"],"isRequired":true,"uniqueKey":"goal.periodicity","typeLabel":"enum\u003cstring>"},"value":{"type":"number","description":"Target value to achieve within the specified period","isRequired":true,"uniqueKey":"goal.value","typeLabel":"number"},"unit":{"description":"Symbol representing the unit of measurement for habit goals and logs. Covers distance, volume, time, weight, energy, and count-based units.\n","type":"string","enum":["m","kM","ft","yd","mi","floor","L","mL","fl oz","cup","sec","min","hr","ms","kg","g","mg","oz","lb","mcg","J","kJ","kCal","cal","rep","step"],"isRequired":true,"uniqueKey":"goal.unit","typeLabel":"enum\u003cstring>"}},"uniqueKey":"goal","typeLabel":"object"},"reminders":{"description":"Reminders to set for the habit","type":"object","properties":{"timeTriggers":{"type":"array","description":"List of time-based reminder triggers to set","items":{"type":"object","properties":{"time":{"description":"Represents a time of day using 24-hour format with hour and minute components.","type":"object","required":["hour","minute"],"properties":{"hour":{"type":"integer","minimum":0,"maximum":23,"description":"Hour component in 24-hour format (0-23)","isRequired":true,"uniqueKey":"reminders.timeTriggers.items.[INDEX].time.hour","typeLabel":"integer"},"minute":{"type":"integer","minimum":0,"maximum":59,"description":"Minute component (0-59)","isRequired":true,"uniqueKey":"reminders.timeTriggers.items.[INDEX].time.minute","typeLabel":"integer"}},"isRequired":true,"uniqueKey":"reminders.timeTriggers.items.[INDEX].time","typeLabel":"object"},"occurrenceFilter":{"type":"object","description":"Optional filter to restrict which days the reminder fires","properties":{"weekDays":{"type":"array","description":"Days of the week when the reminder should fire","items":{"type":"integer","enum":[1,2,3,4,5,6,7],"description":"Day of the week (1 = Sunday, 2 = Monday, ..., 7 = Saturday)","uniqueKey":"reminders.timeTriggers.items.[INDEX].occurrenceFilter.weekDays.items.[INDEX]","typeLabel":"enum\u003cinteger>"},"uniqueKey":"reminders.timeTriggers.items.[INDEX].occurrenceFilter.weekDays","typeLabel":"enum\u003cinteger>[]"}},"uniqueKey":"reminders.timeTriggers.items.[INDEX].occurrenceFilter","typeLabel":"object"},"showLiveActivity":{"type":"boolean","description":"Whether to show a live activity notification (iOS only)","uniqueKey":"reminders.timeTriggers.items.[INDEX].showLiveActivity","typeLabel":"boolean"},"showAsAlarm":{"type":"boolean","description":"Whether to display the reminder as an alarm-style notification","uniqueKey":"reminders.timeTriggers.items.[INDEX].showAsAlarm","typeLabel":"boolean"}},"required":["time"],"uniqueKey":"reminders.timeTriggers.items.[INDEX]","typeLabel":"object"},"uniqueKey":"reminders.timeTriggers","typeLabel":"object[]"},"habitStacks":{"type":"array","description":"Habit stacking rules that trigger this habit based on another habit's status","items":{"type":"object","properties":{"conditionHabitId":{"type":"string","description":"The ID of the habit whose status triggers this stack","isRequired":true,"uniqueKey":"reminders.habitStacks.items.[INDEX].conditionHabitId","typeLabel":"string"},"type":{"type":"string","enum":["completed","skipped","failed","reminder"],"description":"The status of the condition habit that activates this stack","isRequired":true,"uniqueKey":"reminders.habitStacks.items.[INDEX].type","typeLabel":"enum\u003cstring>"},"timerType":{"type":"string","enum":["immediately","after"],"description":"When to trigger the stack (immediately or after a delay)","isRequired":true,"uniqueKey":"reminders.habitStacks.items.[INDEX].timerType","typeLabel":"enum\u003cstring>"},"timerDelaySecs":{"type":"integer","description":"Delay in seconds before triggering (required when timerType is \"after\")","uniqueKey":"reminders.habitStacks.items.[INDEX].timerDelaySecs","typeLabel":"integer"}},"required":["conditionHabitId","type","timerType"],"uniqueKey":"reminders.habitStacks.items.[INDEX]","typeLabel":"object"},"uniqueKey":"reminders.habitStacks","typeLabel":"object[]"}},"uniqueKey":"reminders","typeLabel":"object"},"endCondition":{"oneOf":[{"type":"object","description":"Input payload for creating a date-based end condition.","required":["type","date"],"properties":{"type":{"type":"string","enum":["date"],"description":"Discriminator value indicating this is a date-based end condition","isRequired":true,"uniqueKey":"endCondition.oneOf.0.type","typeLabel":"enum\u003cstring>"},"date":{"type":"string","format":"date","description":"The date on which the habit should end (YYYY-MM-DD format)","isRequired":true,"uniqueKey":"endCondition.oneOf.0.date","typeLabel":"string\u003cdate>"}},"uniqueKey":"endCondition.oneOf.0","typeLabel":"object"},{"type":"object","description":"Input payload for creating a streak-based end condition.","required":["type","streakLength"],"properties":{"type":{"type":"string","enum":["streak"],"description":"Discriminator value indicating this is a streak-based end condition","isRequired":true,"uniqueKey":"endCondition.oneOf.1.type","typeLabel":"enum\u003cstring>"},"streakLength":{"type":"integer","description":"Number of consecutive successful periods required to end the habit","isRequired":true,"uniqueKey":"endCondition.oneOf.1.streakLength","typeLabel":"integer"}},"uniqueKey":"endCondition.oneOf.1","typeLabel":"object"},{"type":"object","description":"Input payload for creating a success-periods-based end condition.","required":["type","totalPeriods"],"properties":{"type":{"type":"string","enum":["successPeriods"],"description":"Discriminator value indicating this is a success-periods-based end condition","isRequired":true,"uniqueKey":"endCondition.oneOf.2.type","typeLabel":"enum\u003cstring>"},"totalPeriods":{"type":"integer","description":"Total number of successful periods required to end the habit","isRequired":true,"uniqueKey":"endCondition.oneOf.2.totalPeriods","typeLabel":"integer"}},"uniqueKey":"endCondition.oneOf.2","typeLabel":"object"},{"type":"object","description":"Input payload for creating a total-log-value-based end condition.","required":["type","totalLogValue"],"properties":{"type":{"type":"string","enum":["totalLogValue"],"description":"Discriminator value indicating this is a total-log-value-based end condition","isRequired":true,"uniqueKey":"endCondition.oneOf.3.type","typeLabel":"enum\u003cstring>"},"totalLogValue":{"type":"number","description":"Cumulative log value that must be reached to end the habit","isRequired":true,"uniqueKey":"endCondition.oneOf.3.totalLogValue","typeLabel":"number"}},"uniqueKey":"endCondition.oneOf.3","typeLabel":"object"}],"uniqueKey":"endCondition","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"name":"\u003cstring>","description":"\u003cstring>","occurrence":{"type":"daily"},"startDate":"2023-12-25","icon":"\u003cstring>","colorHex":"\u003cstring>","customUnitName":"\u003cstring>","areaIds":["\u003cstring>"],"timeOfDayIds":["\u003cstring>"],"reminders":{"timeTriggers":[{"time":{"hour":11,"minute":29},"occurrenceFilter":{"weekDays":[]},"showLiveActivity":true,"showAsAlarm":true}],"habitStacks":[{"conditionHabitId":"\u003cstring>","timerDelaySecs":123}]},"endCondition":{"type":"date","date":"2023-12-25"}}}},"exampleType":"generated"}},"exampleType":"generated"},"responses":{"d9d05790-2586-4049-9079-aa81e722b3a1":{"description":"Habit updated successfully","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}},"2af3df50-7ba2-48d1-823f-caa330f64a1c":{"description":"Bad request - invalid input data","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}},"5ff5e2b7-6b27-448f-93e3-9c6dccf15cb0":{"description":"Unauthorized - missing or invalid authentication","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}},"b6d735d0-b638-4720-95e9-0eea4274dc83":{"description":"Habit not found","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}},"89ee714b-5641-4278-a14e-4f00a8959e94":{"description":"Validation error - input data failed validation","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}}},"security":{"73b0dc9b-9203-4495-928c-38f0b8b18062":{"ApiKeyTokenAuth":{"type":"apiKey","in":"header","name":"X-API-Key","description":"API key generated from our app (Settings > API). Only one key can be active at a time.","scopes":[],"schemeName":"ApiKeyTokenAuth"}},"be42732c-7489-4c64-adf3-fbd786f2fa63":{"AccessTokenAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Access token acquired from OAuth2","scopes":[],"schemeName":"AccessTokenAuth"}},"320a74b5-e987-458a-b04d-66c0c79170a1":{"IdTokenAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"ID token from Firebase Auth","scopes":[],"schemeName":"IdTokenAuth"}}},"servers":{"92f06b36-4899-4a5f-95c1-eee7c40252af":{"url":"https://api.habitify.me/v2","description":"Production server"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"apiKey","in":"header","name":"X-API-Key","description":"API key generated from our app (Settings > API). Only one key can be active at a time.","scopes":[],"schemeName":"ApiKeyTokenAuth"},"schema":{"title":"X-API-Key","type":"string","description":"API key generated from our app (Settings > API). Only one key can be active at a time.","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"ApiKeyTokenAuth","name":"X-API-Key"}],"title":"ApiKeyTokenAuth"},{"schemes":[{"scheme":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Access token acquired from OAuth2","scopes":[],"schemeName":"AccessTokenAuth"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"Access token acquired from OAuth2","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"AccessTokenAuth","name":"Authorization"}],"title":"AccessTokenAuth"},{"schemes":[{"scheme":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"ID token from Firebase Auth","scopes":[],"schemeName":"IdTokenAuth"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"ID token from Firebase Auth","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"IdTokenAuth","name":"Authorization"}],"title":"IdTokenAuth"}]},"originalFileLocation":"https://static.habitify.me/habitify_apidocsv2_261026.json"},"subdomain":"habitify","siteName":"Habitify","title":"Update a habit - Habitify","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-09-09T11:21:23.356Z","originalFileLocation":"api-reference/habits/update-a-habit.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Update the properties of an existing habit. Only the fields provided in the request body are updated; omitted fields remain unchanged.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Habitify\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/habitify/V_6sSIuXd9KCLw9s/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/habitify/V_6sSIuXd9KCLw9s/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/habitify/V_6sSIuXd9KCLw9s/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/habitify/V_6sSIuXd9KCLw9s/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/habitify/V_6sSIuXd9KCLw9s/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/habitify/V_6sSIuXd9KCLw9s/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/habitify/V_6sSIuXd9KCLw9s/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/habitify/V_6sSIuXd9KCLw9s/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/habitify/V_6sSIuXd9KCLw9s/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Update a habit - Habitify\">\u003cmeta data-mint-head property=\"og:description\" content=\"Update the properties of an existing habit. Only the fields provided in the request body are updated; omitted fields remain unchanged.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Habitify\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.habitify.me/api-reference/habits/update-a-habit\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://habitify.mintlify.app/_mintlify/api/og/v2?division=Habits\u0026amp;title=Update+a+habit\u0026amp;description=Update+the+properties+of+an+existing+habit.+Only+the+fields+provided+in+the+request+body+are+updated%3B+omitted+fields+remain+unchanged.\u0026amp;theme=7442d8443a4f400eb6dadc2d\u0026amp;signature=a58f447a688e6d52c7d3917f37008521cf64aec4e1992025e4bf9fe27d5304c3\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Update a habit - Habitify\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Update the properties of an existing habit. Only the fields provided in the request body are updated; omitted fields remain unchanged.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://habitify.mintlify.app/_mintlify/api/og/v2?division=Habits\u0026amp;title=Update+a+habit\u0026amp;description=Update+the+properties+of+an+existing+habit.+Only+the+fields+provided+in+the+request+body+are+updated%3B+omitted+fields+remain+unchanged.\u0026amp;theme=7442d8443a4f400eb6dadc2d\u0026amp;signature=a58f447a688e6d52c7d3917f37008521cf64aec4e1992025e4bf9fe27d5304c3\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/habitify/V_6sSIuXd9KCLw9s/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Habitify\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#164AF2\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.habitify.me/api-reference/habits/update-a-habit\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/habits/update-a-habit.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.habitify.me/#organization\",\"name\":\"Habitify\",\"url\":\"https://docs.habitify.me\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/habitify/6ubuIYTR9HqwJmST/images/Group3.png?fit=max\u0026auto=format\u0026n=6ubuIYTR9HqwJmST\u0026q=85\u0026s=19d2ca75b3476d732425d7ae3a079d41\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.habitify.me#website\",\"name\":\"Habitify\",\"url\":\"https://docs.habitify.me\",\"publisher\":{\"@id\":\"https://docs.habitify.me/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.habitify.me/api-reference/habits/update-a-habit#webpage\",\"url\":\"https://docs.habitify.me/api-reference/habits/update-a-habit\",\"name\":\"Update a habit\",\"description\":\"Update the properties of an existing habit. Only the fields provided in the request body are updated; omitted fields remain unchanged.\",\"dateModified\":\"2026-09-09T11:21:23.356Z\",\"isPartOf\":{\"@id\":\"https://docs.habitify.me#website\"},\"breadcrumb\":{\"@id\":\"https://docs.habitify.me/api-reference/habits/update-a-habit#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.habitify.me/api-reference/habits/update-a-habit#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Habits\",\"item\":\"https://docs.habitify.me/api-reference/habits/get-all-habits\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Update a habit\",\"item\":\"https://docs.habitify.me/api-reference/habits/update-a-habit\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.habitify.me/api-reference/habits/update-a-habit#apireference\",\"headline\":\"Update a habit\",\"name\":\"Update a habit\",\"description\":\"Update the properties of an existing habit. Only the fields provided in the request body are updated; omitted fields remain unchanged.\",\"url\":\"https://docs.habitify.me/api-reference/habits/update-a-habit\",\"mainEntityOfPage\":{\"@id\":\"https://docs.habitify.me/api-reference/habits/update-a-habit#webpage\"},\"dateModified\":\"2026-09-09T11:21:23.356Z\",\"publisher\":{\"@id\":\"https://docs.habitify.me/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.habitify.me#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Habitify\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Habitify","nav":{"global":null,"tabs":[{"tab":"Documentation","icon":"life-ring","pages":[{"title":"Documentation","href":"/habitify-introduction"}]},{"tab":"API Documentation","icon":"rectangle-api","groups":[{"group":"Habits","pages":[{"title":"Get all habits","deprecated":null,"version":null,"openapi":"https://static.habitify.me/habitify_apidocsv2_261026.json get /habits","href":"/api-reference/habits/get-all-habits"},{"title":"Create a new habit","deprecated":null,"version":null,"openapi":"https://static.habitify.me/habitify_apidocsv2_261026.json post /habits","href":"/api-reference/habits/create-a-new-habit"},{"title":"Get habit journal","deprecated":null,"version":null,"openapi":"https://static.habitify.me/habitify_apidocsv2_261026.json get /habits/journal","href":"/api-reference/habits/get-habit-journal"},{"title":"Get a habit","description":"Retrieve the full details of a specific habit by its ID, including goals, reminders, areas, and configuration.","deprecated":null,"version":null,"openapi":"https://static.habitify.me/habitify_apidocsv2_261026.json get /habits/{habitId}","href":"/api-reference/habits/get-a-habit"},{"title":"Update a habit","deprecated":null,"version":null,"openapi":"https://static.habitify.me/habitify_apidocsv2_261026.json put /habits/{habitId}","href":"/api-reference/habits/update-a-habit"},{"title":"Delete a habit","description":"Permanently delete a habit and all of its associated data, including logs, notes, goals, and reminders. This action cannot be undone.","deprecated":null,"version":null,"openapi":"https://static.habitify.me/habitify_apidocsv2_261026.json delete /habits/{habitId}","href":"/api-reference/habits/delete-a-habit"},{"title":"Archive a habit","deprecated":null,"version":null,"openapi":"https://static.habitify.me/habitify_apidocsv2_261026.json post /habits/{habitId}/archive","href":"/api-reference/habits/archive-a-habit"},{"title":"Get habit statistics","deprecated":null,"version":null,"openapi":"https://static.habitify.me/habitify_apidocsv2_261026.json get /habits/{habitId}/statistics","href":"/api-reference/habits/get-habit-statistics"}]},{"group":"Habit Logs","pages":[{"title":"Get logs for a habit","deprecated":null,"version":null,"openapi":"https://static.habitify.me/habitify_apidocsv2_261026.json get /habits/{habitId}/logs","href":"/api-reference/habit-logs/get-logs-for-a-habit"},{"title":"Add a log entry","deprecated":null,"version":null,"openapi":"https://static.habitify.me/habitify_apidocsv2_261026.json post /habits/{habitId}/logs","href":"/api-reference/habit-logs/add-a-log-entry"},{"title":"Delete a log entry","deprecated":null,"version":null,"openapi":"https://static.habitify.me/habitify_apidocsv2_261026.json delete /habits/{habitId}/logs/{logId}","href":"/api-reference/habit-logs/delete-a-log-entry"},{"title":"Mark habit as completed","deprecated":null,"version":null,"openapi":"https://static.habitify.me/habitify_apidocsv2_261026.json post /habits/{habitId}/logs/complete","href":"/api-reference/habit-logs/mark-habit-as-completed"},{"title":"Mark habit as failed","deprecated":null,"version":null,"openapi":"https://static.habitify.me/habitify_apidocsv2_261026.json post /habits/{habitId}/logs/failed","href":"/api-reference/habit-logs/mark-habit-as-failed"},{"title":"Mark habit as skipped","deprecated":null,"version":null,"openapi":"https://static.habitify.me/habitify_apidocsv2_261026.json post /habits/{habitId}/logs/skipped","href":"/api-reference/habit-logs/mark-habit-as-skipped"},{"title":"Undo habit logs for a day","deprecated":null,"version":null,"openapi":"https://static.habitify.me/habitify_apidocsv2_261026.json post /habits/{habitId}/logs/undo","href":"/api-reference/habit-logs/undo-habit-logs-for-a-day"}]},{"group":"Habit Notes","pages":[{"title":"Get notes for a habit","deprecated":null,"version":null,"openapi":"https://static.habitify.me/habitify_apidocsv2_261026.json get /habits/{habitId}/notes","href":"/api-reference/habit-notes/get-notes-for-a-habit"},{"title":"Add a note to a habit","deprecated":null,"version":null,"openapi":"https://static.habitify.me/habitify_apidocsv2_261026.json post /habits/{habitId}/notes","href":"/api-reference/habit-notes/add-a-note-to-a-habit"},{"title":"Update a note","deprecated":null,"version":null,"openapi":"https://static.habitify.me/habitify_apidocsv2_261026.json put /habits/{habitId}/notes/{noteId}","href":"/api-reference/habit-notes/update-a-note"},{"title":"Delete a note","deprecated":null,"version":null,"openapi":"https://static.habitify.me/habitify_apidocsv2_261026.json delete /habits/{habitId}/notes/{noteId}","href":"/api-reference/habit-notes/delete-a-note"}]},{"group":"Areas","pages":[{"title":"Get all areas","deprecated":null,"version":null,"openapi":"https://static.habitify.me/habitify_apidocsv2_261026.json get /areas","href":"/api-reference/areas/get-all-areas"},{"title":"Create an area","deprecated":null,"version":null,"openapi":"https://static.habitify.me/habitify_apidocsv2_261026.json post /areas","href":"/api-reference/areas/create-an-area"},{"title":"Get a specific area","deprecated":null,"version":null,"openapi":"https://static.habitify.me/habitify_apidocsv2_261026.json get /areas/{areaId}","href":"/api-reference/areas/get-a-specific-area"},{"title":"Update an area","deprecated":null,"version":null,"openapi":"https://static.habitify.me/habitify_apidocsv2_261026.json put /areas/{areaId}","href":"/api-reference/areas/update-an-area"},{"title":"Delete an area","deprecated":null,"version":null,"openapi":"https://static.habitify.me/habitify_apidocsv2_261026.json delete /areas/{areaId}","href":"/api-reference/areas/delete-an-area"}]}]},{"tab":"Changelog","icon":"bullhorn","href":"https://feedback.habitify.me/changelog"}]},"title":"Update a habit - Habitify","buildId":"dpl_cadrRc5H9XQiJQbDFN5mcYRs2PAj","deploymentId":"dpl_cadrRc5H9XQiJQbDFN5mcYRs2PAj","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-DKJwRUt2.js","utils-CWD_VS3u.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-oFjciODD.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-C76WsxC3.js","snippetPresets-DvPMxpX_.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-CuNQfndH.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-BVFpVUoF.js","shallow-t59Jg5Kr.js","getApiPlaygroundDisplay-C_JZ4amX.js","CodeSnippet-CLRDnx_h.js","CodeSnippets-C2myU4kc.js","Page-7TwLLapg.js","getPastedJson-B-JaVXw7.js","icon-BA-iDhH3.js","MethodPill-D4qZABFp.js","DuplicateIcon-THIDKO1O.js","createIcon-CYYJwgFd.js","DynamicMarkdown-UGQuxDKp.js","SectionHeading-jYELb23h.js","axios-vUo_bRtp.js","Markdown-DKsLa3wy.js","clsx-CefdjKz2.js","lib--scc4DXi.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-BaREnp3o.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-sgx_0XzF.js"]}