Replaces the entire saved answer array. This is not a merge: whatever you send becomes the complete set, and any answer you omit is erased. Always send the full cumulative set of answers, not just the new ones. Send an empty array to clear all saved progress.
Only question keys present in the served schema are accepted, plus a closed allowlist of synthetic keys. Anything else is rejected — stored answers feed the prescriber’s treatment baseline, so they must not carry client state.
The body must be {"data": [ … ]}. A body of another shape is accepted with 200 and the answers are silently discarded — data stays empty and nothing tells you the write did not happen. Read the response back and check answer_status rather than trusting the status code.
For a step of kind upload the value is a single document UUID string, not a list: upload the file to /v1/users/documents/ first and send the id it returns. A list, a malformed UUID, or a UUID belonging to another patient are each rejected with 400. Note that the server checks the UUID and its ownership but not the file type — the step schema’s accept list is a client-side hint, and /v1/users/documents/ itself also accepts PDF.
Access, effects and retries
Ownership: Patient own category/version progress.
Prerequisites: An authenticated patient account is required.
Effects: Replaces all data entries; marks is_completed false and submitted_at null.
Retries: Same array overwrites; not itemwise merge despite PATCH.
PATCH
/
v1
/
users
/
questionnaires
/
{slug}
/
progress
/
curl
set -euumask 077# Path values must be URL-encoded; query string excludes the leading question mark.url="${HD_BASE_URL:?Set API origin}/v1/users/questionnaires/${HD_PATH_SLUG:?Set the path fixture}/progress/${HD_QUERY_STRING:+?${HD_QUERY_STRING}}"printf 'X-Brand-Slug: hi-doctor\nAccept: application/json\n' > "${HD_REQUEST_HEADERS_FILE:?Private header file}"printf 'Authorization: Bearer %s\n' "${HD_ACCESS_TOKEN:?Set backend JWT}" >> "$HD_REQUEST_HEADERS_FILE"curl --silent --show-error --max-time 30 --request PATCH \ --header "@$HD_REQUEST_HEADERS_FILE" \ --dump-header "${HD_HEADERS_FILE:?Private response header file}" \ --output "${HD_RESPONSE_FILE:?Private response file}" \ --write-out '%{http_code}\n%{content_type}\n' \ --header 'Content-Type: application/json' \ --data-binary "@${HD_REQUEST_FILE:?JSON fixture file}" \ "$url"
Reusable prefill returned or accepted by this contract.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Hi Doctor","public":true,"description":"Hi Doctor operates across the whole European Union: residents of all 27 EU member states can use the service, and every consultation is reviewed by an EU-licensed doctor. Connect it to an AI assistant over MCP, or build on the REST API.","colors":{"primary":"#157A5C","light":"#39C69C","dark":"#0E6149"},"logo":{"light":"https://mintcdn.com/hi-doctor-ai/PIEJYA1zSavoVnhH/logo/wordmark-on-light.svg?fit=max\u0026auto=format\u0026n=PIEJYA1zSavoVnhH\u0026q=85\u0026s=c7243fb417e4d3908f3b5fc634a28923","dark":"https://mintcdn.com/hi-doctor-ai/PIEJYA1zSavoVnhH/logo/wordmark-on-dark.svg?fit=max\u0026auto=format\u0026n=PIEJYA1zSavoVnhH\u0026q=85\u0026s=06850588c83edfff94669e9260585343","href":"https://hi-doctor.ai"},"favicon":"https://mintcdn.com/hi-doctor-ai/V_4Yl0k2E857_Kxm/favicon.svg?fit=max\u0026auto=format\u0026n=V_4Yl0k2E857_Kxm\u0026q=85\u0026s=581ac27595afff79fbc35c5d54d60709","api":{"openapi":"api-reference/openapi.json","examples":{"prefill":true},"mdx":{"auth":{"method":"bearer"},"server":"https://api.hi-doctor.ai"}},"background":{"color":{"light":"#FFFFFF","dark":"#0A0A0A"}},"navbar":{"links":[{"icon":"star","href":"https://www.trustpilot.com/review/hi-doctor.ai","label":"Reviews"},{"icon":"envelope","href":"mailto:hello@hi-doctor.ai","label":"Support"}],"primary":{"type":"button","label":"Start a consultation","href":"https://hi-doctor.ai/consultation"}},"footer":{"socials":{"website":"https://hi-doctor.ai"}},"search":{"prompt":"Search Hi Doctor docs..."},"seo":{"metatags":{"description":"Hi Doctor operates across the whole European Union: residents of all 27 EU member states can use the service, and every consultation is reviewed by an EU-licensed doctor. Weight loss, hair growth and sexual health consultations. Connect your account to an AI assistant with the Hi Doctor MCP connector, or build on the REST API.","author":"Hi Doctor","robots":"index, follow, max-image-preview:large, max-snippet:-1","og:site_name":"Hi Doctor Documentation","og:type":"website","og:locale":"en_US","twitter:card":"summary_large_image","theme-color":"#157A5C"},"organization":{"name":"Hi Doctor","url":"https://hi-doctor.ai"},"indexing":"navigable"},"fonts":{"family":"Figtree"},"errors":{"404":{"redirect":false,"title":"Page not found","description":"This page moved or never existed. [Back to the docs](/)"}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity",{"title":"Hi Doctor Docs search","description":"Search the documentation with the Hi Doctor Docs MCP server.","icon":"magnifying-glass","href":"https://docs.hi-doctor.ai/mcp"},{"title":"Connect Hi Doctor","description":"Install the Hi Doctor MCP connector for patient tools.","icon":"plug","href":"/mcp/connect"}],"display":"header"},"markdown":{"instructions":"Connect the Hi Doctor MCP connector at https://mcp.hi-doctor.ai/mcp. Add this URL as a remote HTTP MCP server in your client, then sign in and authorise access through OAuth. Setup: https://docs.hi-doctor.ai/mcp/connect.\n\nThe REST API base is https://api.hi-doctor.ai. Hi Doctor Docs at https://docs.hi-doctor.ai/mcp searches documentation; connect to the product endpoint above for patient tools.\n\nHi Doctor operates across the whole European Union: residents of all 27 EU member states can use the service, and every consultation is reviewed by an EU-licensed doctor. Every consultation is reviewed in full by an EU-licensed doctor, who decides on medical grounds only. No algorithm, assistant or API call approves a consultation, issues a prescription or changes a dose. The service is available in eight languages: English, Spanish, German, Dutch, Italian, French, Portuguese and Chinese.\n\n## Rules an assistant must follow\n\n- Never invent, assume or infer a medical answer. \"I don't know\" is a real answer: ask the patient to pick the closest option rather than guessing for them.\n- Never give medical advice and never suggest a medication or a dose. An EU-licensed doctor decides those.\n- If a questionnaire returns `ineligible`, say so plainly. Do not retry with altered answers.\n- Before anything that costs money or cancels a plan, state exactly what will happen and get an explicit yes.\n- Cancellation takes effect at the **end of the paid period**, not immediately. Say so.\n- An early order is irreversible: it creates the renewal consultation immediately and uses up the period's one early order. Explain that and get an explicit yes.\n- Prescription and invoice links are medical documents. A `signed_redirect` link opens without signing in: give it only to the patient, never repeat it anywhere shared.\n- Send option `value`s, not the labels shown to the patient. Labels are translated, values are stable.\n- Never ask for card details. Payment happens on Stripe's hosted checkout via a link.\n- On severe or sudden symptoms (chest pain, difficulty breathing, severe allergic reaction, suicidal thoughts), stop and direct the patient to their local emergency number."},"styling":{"latex":false},"navigation":{"global":{"anchors":[{"anchor":"OpenAPI spec","icon":"file-code","href":"/api-reference/openapi.json"},{"anchor":"Add the MCP connector","icon":"plug","href":"https://claude.ai/customize/connectors?modal=add-custom-connector\u0026connectorName=Hi%20Doctor\u0026connectorUrl=https://mcp.hi-doctor.ai/mcp"},{"anchor":"AI integration prompt","icon":"wand-magic-sparkles","href":"/mcp/ai-integration"},{"anchor":"hi-doctor.ai","icon":"house-medical","href":"https://hi-doctor.ai"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"hi-doctor-ai","hasAudioNarration":false,"actualSubdomain":"hi-doctor-ai","customDomains":["docs.hi-doctor.ai"],"gitSource":{"type":"github","owner":"online-medicine","repo":"mintlify-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"latestBuiltDeploymentHistoryId":"6aeb4f77b21018c2553e6554","collectionId":"479e76df-8b71-4bcd-b29d-f545ddafad1a","liveDeploymentHistoryId":"6aeb4f77b21018c2553e6554","schemaVersion":"v3"},"entitlements":{},"buildId":"6aeb4f77b21018c2553e6554","clientVersion":"0.0.4067","searchFilterCounts":[{"language":"default","tag":"Health library","count":132},{"language":"default","tag":"API reference","count":114},{"language":"default","tag":"Endpoints","count":104},{"language":"default","tag":"Medicines","count":72},{"language":"default","tag":"Partners","count":47},{"language":"default","tag":"Sexual-health medicines","count":28},{"language":"default","tag":"Documentation","count":26},{"language":"default","tag":"Partner API reference","count":26},{"language":"default","tag":"Conditions","count":25},{"language":"default","tag":"Progress","count":23}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","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":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","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":"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":"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":"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":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","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":"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":"workos-sso-scim","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},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":true},"customCss":[{"filePath":"style.css","content":":root{--hd-brand: #157a5c;--hd-brand-strong: #0e6149;--hd-tint: #e3f4ec;--hd-canvas: #ffffff;--hd-alt: #f4f7f4;--hd-border: #e0e0e0;--hd-secondary: #666666;--hd-ink: #000000;--hd-brand-deep: #0b2b22;--hd-dark-bg: #0a0a0a;--hd-dark-surface: #161616;--hd-dark-raised: #1c1c1c;--hd-dark-border: #262626;--hd-dark-text: #ededed;--hd-dark-muted: #a1a1a1;--hd-dark-accent: #39c69c;--hd-status-warning: #8f5e1d;--hd-status-warning-wash: #f6e9dd;--hd-canvas-rgb: 255 255 255;--hd-tint-rgb: 227 244 236;--hd-ink-rgb: 0 0 0;--hd-dark-accent-rgb: 57 198 156;--hd-label-on-dark: rgb(var(--hd-tint-rgb) / 0.75);--hd-card-bg: var(--hd-brand-deep);--hd-card-fg: var(--hd-tint);--hd-card-accent: var(--hd-tint);--hd-card-accent-rgb: var(--hd-tint-rgb);--hd-card-border: rgb(var(--hd-ink-rgb) / 0.1)}html.dark{--hd-label-on-dark: var(--hd-dark-muted);--hd-card-bg: var(--hd-dark-surface);--hd-card-fg: var(--hd-dark-text);--hd-card-accent: var(--hd-dark-accent);--hd-card-accent-rgb: var(--hd-dark-accent-rgb);--hd-card-border: var(--hd-dark-border);--gray-50: 250 250 250;--gray-100: 245 245 245;--gray-200: 237 237 237;--gray-300: 212 212 212;--gray-400: 161 161 161;--gray-500: 115 115 115;--gray-600: 82 82 82;--gray-700: 58 58 58;--gray-800: 38 38 38;--gray-900: 22 22 22;--gray-950: 10 10 10}.nav-logo{height:26px;width:auto;max-width:none}a:has(>.nav-logo){display:inline-flex;align-items:center;min-height:44px}@media (max-width: 1023px){.nav-logo{height:24px}}#topbar-cta-button a{--hd-cta-bg: var(--hd-ink);--hd-cta-fg: var(--hd-canvas);--hd-cta-ring: var(--hd-brand);background-color:var(--hd-cta-bg);color:var(--hd-cta-fg);border-radius:999px;transition:background-color 160ms ease, color 160ms ease}#topbar-cta-button a>span.absolute{background-color:transparent;opacity:1}#topbar-cta-button a span,#topbar-cta-button a svg{color:var(--hd-cta-fg)}#topbar-cta-button a:hover{--hd-cta-bg: var(--hd-brand);--hd-cta-fg: var(--hd-canvas);transition-duration:240ms}#topbar-cta-button a:focus-visible{outline:2px solid var(--hd-cta-ring);outline-offset:2px}html.dark #topbar-cta-button a{--hd-cta-bg: var(--hd-canvas);--hd-cta-fg: var(--hd-ink);--hd-cta-ring: var(--hd-dark-accent)}html.dark #topbar-cta-button a:hover{--hd-cta-bg: var(--hd-tint);--hd-cta-fg: var(--hd-ink)}.hd-agent-card{width:100%;max-width:100%;min-width:0;margin:12px 0 20px;border-radius:12px;border:1px solid var(--hd-card-border);overflow:hidden;box-sizing:border-box;background:var(--hd-card-bg)}.hd-agent-titlebar{display:flex;align-items:center;gap:10px;width:100%;box-sizing:border-box;padding:10px 14px;background:rgb(var(--hd-canvas-rgb) / 0.05);border-bottom:1px solid rgb(var(--hd-canvas-rgb) / 0.1)}.hd-agent-mark{display:inline-flex;align-items:center;color:var(--hd-card-accent)}.hd-agent-filename{flex:1;font-family:ui-monospace, SFMono-Regular, \"SF Mono\", Menlo, Consolas, monospace;font-size:11px;letter-spacing:0.18em;text-transform:uppercase;color:var(--hd-card-accent)}.hd-agent-copy{display:inline-flex;align-items:center;gap:6px;padding:5px 10px;border-radius:8px;border:1px solid rgb(var(--hd-canvas-rgb) / 0.18);background:transparent;color:var(--hd-canvas);font-size:12px;cursor:pointer;transition:background-color 160ms ease, border-color 160ms ease}.hd-agent-copy:hover{background:rgb(var(--hd-canvas-rgb) / 0.1);border-color:rgb(var(--hd-canvas-rgb) / 0.32);transition-duration:240ms}.hd-agent-copy-copied{color:var(--hd-card-accent);border-color:var(--hd-card-accent)}.hd-agent-body{width:100%;max-height:340px;overflow-y:auto;overflow-x:auto;margin:0!important;padding:16px 18px!important;background:var(--hd-card-bg)!important;border:none!important;border-radius:0!important;box-shadow:none!important;font-family:ui-monospace, SFMono-Regular, \"SF Mono\", Menlo, Consolas, monospace!important;font-size:12.5px!important;line-height:1.65!important;color:var(--hd-card-fg)!important;white-space:pre-wrap;overflow-wrap:anywhere;word-break:break-word;scrollbar-width:thin;scrollbar-color:rgb(var(--hd-canvas-rgb) / 0.18) transparent}.hd-agent-footer{display:flex;align-items:center;flex-wrap:wrap;gap:8px;padding:10px 14px;background:rgb(var(--hd-canvas-rgb) / 0.04);border-top:1px solid rgb(var(--hd-canvas-rgb) / 0.1)}.hd-agent-footer-label{font-family:ui-monospace, SFMono-Regular, \"SF Mono\", Menlo, Consolas, monospace;font-size:10px;letter-spacing:0.2em;text-transform:uppercase;color:var(--hd-label-on-dark)}.hd-agent-chips{display:flex;flex-wrap:wrap;gap:6px}.hd-agent-chip{padding:3px 9px;border-radius:999px;background:rgb(var(--hd-card-accent-rgb) / 0.14);color:var(--hd-card-accent);font-size:11px;white-space:nowrap}.hd-agent-card pre,.hd-agent-card code{max-width:100%}#content-area h1,#content-area h2,#content-area h3,#content-area h4{color:var(--hd-ink)}html.dark #content-area h1,html.dark #content-area h2,html.dark #content-area h3,html.dark #content-area h4{color:var(--hd-canvas)}html.dark #content-area table th,html.dark #content-area table td{border-color:var(--hd-dark-border)}html.dark #content-area table th{color:var(--hd-dark-text)}html.dark #content-area :not(pre):not(a)>code{background-color:var(--hd-dark-surface);border-color:var(--hd-dark-border);color:var(--hd-dark-text)}.sidebar-group-header{font-family:ui-monospace, SFMono-Regular, \"SF Mono\", Menlo, Consolas, monospace;font-size:11px;font-weight:600;line-height:1.2;letter-spacing:0.16em;text-transform:uppercase;color:var(--hd-brand);margin-top:0.35rem;margin-bottom:0.9rem}.sidebar-group-header .sidebar-title{font:inherit;letter-spacing:inherit}html.dark .sidebar-group-header{color:var(--hd-label-on-dark)}.callout[data-callout-type=\"note\"]{border-color:var(--hd-border);background-color:var(--hd-alt)}.callout[data-callout-type=\"note\"] [data-component-part=\"callout-icon\"] svg,.callout[data-callout-type=\"note\"] [data-component-part=\"callout-content\"]{color:var(--hd-secondary)}.callout[data-callout-type=\"info\"]{border-color:var(--hd-brand);background-color:var(--hd-tint)}.callout[data-callout-type=\"info\"] [data-component-part=\"callout-icon\"] svg,.callout[data-callout-type=\"info\"] [data-component-part=\"callout-content\"]{color:var(--hd-brand-deep)}.callout[data-callout-type=\"tip\"]{border-color:var(--hd-brand-strong);background-color:var(--hd-canvas)}.callout[data-callout-type=\"tip\"] [data-component-part=\"callout-icon\"] svg,.callout[data-callout-type=\"tip\"] [data-component-part=\"callout-content\"]{color:var(--hd-brand-deep)}.callout[data-callout-type=\"warning\"]{border-color:var(--hd-status-warning);background-color:var(--hd-status-warning-wash)}.callout[data-callout-type=\"warning\"] [data-component-part=\"callout-icon\"] svg{color:var(--hd-status-warning)}.callout[data-callout-type=\"warning\"] [data-component-part=\"callout-content\"]{color:var(--hd-ink)}html.dark .callout[data-callout-type=\"note\"]{border-color:var(--hd-dark-border);background-color:var(--hd-dark-surface)}html.dark .callout[data-callout-type=\"note\"] [data-component-part=\"callout-icon\"] svg,html.dark .callout[data-callout-type=\"note\"] [data-component-part=\"callout-content\"]{color:var(--hd-dark-muted)}html.dark .callout[data-callout-type=\"info\"]{border-color:rgb(var(--hd-dark-accent-rgb) / 0.6);background-color:rgb(var(--hd-dark-accent-rgb) / 0.1)}html.dark .callout[data-callout-type=\"tip\"]{border-color:rgb(var(--hd-dark-accent-rgb) / 0.5);background-color:transparent}html.dark .callout[data-callout-type=\"info\"] [data-component-part=\"callout-icon\"] svg,html.dark .callout[data-callout-type=\"tip\"] [data-component-part=\"callout-icon\"] svg{color:var(--hd-dark-accent)}html.dark .callout[data-callout-type=\"info\"] [data-component-part=\"callout-content\"],html.dark .callout[data-callout-type=\"tip\"] [data-component-part=\"callout-content\"]{color:var(--hd-dark-text)}html.dark .callout[data-callout-type=\"warning\"]{border-color:#a57e4a;background-color:rgb(143 94 29 / 0.22)}html.dark .callout[data-callout-type=\"warning\"] [data-component-part=\"callout-icon\"] svg,html.dark .callout[data-callout-type=\"warning\"] [data-component-part=\"callout-content\"]{color:#d8b28a}"}],"page":{"pagePath":"api-reference/questionnaires/replace-saved-answers","slug":"/api-reference/questionnaires/replace-saved-answers","pageMetadata":{"title":"Replace saved answers","description":"**Replaces the entire saved answer array.** This is not a merge: whatever you send becomes the complete set, and any answer you omit is erased. Always send the full cumulative set of answers, not just the new ones. Send an empty array to clear all saved progress.\n\nOnly question keys present in the served schema are accepted, plus a closed allowlist of synthetic keys. Anything else is rejected — stored answers feed the prescriber's treatment baseline, so they must not carry client state.\n\n**The body must be `{\"data\": [ … ]}`.** A body of another shape is accepted with `200` and the answers are silently discarded — `data` stays empty and nothing tells you the write did not happen. Read the response back and check `answer_status` rather than trusting the status code.\n\nFor a step of kind `upload` the value is a **single document UUID string**, not a list: upload the file to `/v1/users/documents/` first and send the `id` it returns. A list, a malformed UUID, or a UUID belonging to another patient are each rejected with `400`. Note that the server checks the UUID and its ownership but not the file type — the step schema's `accept` list is a client-side hint, and `/v1/users/documents/` itself also accepts PDF.\n\n### Access, effects and retries\n**Ownership:** Patient own category/version progress.\n\n**Prerequisites:** An authenticated patient account is required.\n\n**Effects:** Replaces all data entries; marks is_completed false and submitted_at null.\n\n**Retries:** Same array overwrites; not itemwise merge despite PATCH.","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json patch /v1/users/questionnaires/{slug}/progress/","href":"/api-reference/questionnaires/replace-saved-answers","autogeneratedByOpenApi":true},"description":{"compiledSource":"\"use strict\";\nconst {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n code: \"code\",\n h3: \"h3\",\n p: \"p\",\n strong: \"strong\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_Fragment, {\n children: [_jsxs(_components.p, {\n children: [_jsx(_components.strong, {\n children: \"Replaces the entire saved answer array.\"\n }), \" This is not a merge: whatever you send becomes the complete set, and any answer you omit is erased. Always send the full cumulative set of answers, not just the new ones. Send an empty array to clear all saved progress.\"]\n }), \"\\n\", _jsx(_components.p, {\n children: \"Only question keys present in the served schema are accepted, plus a closed allowlist of synthetic keys. Anything else is rejected — stored answers feed the prescriber’s treatment baseline, so they must not carry client state.\"\n }), \"\\n\", _jsxs(_components.p, {\n children: [_jsxs(_components.strong, {\n children: [\"The body must be \", _jsx(_components.code, {\n children: \"{\\\"data\\\": [ … ]}\"\n }), \".\"]\n }), \" A body of another shape is accepted with \", _jsx(_components.code, {\n children: \"200\"\n }), \" and the answers are silently discarded — \", _jsx(_components.code, {\n children: \"data\"\n }), \" stays empty and nothing tells you the write did not happen. Read the response back and check \", _jsx(_components.code, {\n children: \"answer_status\"\n }), \" rather than trusting the status code.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"For a step of kind \", _jsx(_components.code, {\n children: \"upload\"\n }), \" the value is a \", _jsx(_components.strong, {\n children: \"single document UUID string\"\n }), \", not a list: upload the file to \", _jsx(_components.code, {\n children: \"/v1/users/documents/\"\n }), \" first and send the \", _jsx(_components.code, {\n children: \"id\"\n }), \" it returns. A list, a malformed UUID, or a UUID belonging to another patient are each rejected with \", _jsx(_components.code, {\n children: \"400\"\n }), \". Note that the server checks the UUID and its ownership but not the file type — the step schema’s \", _jsx(_components.code, {\n children: \"accept\"\n }), \" list is a client-side hint, and \", _jsx(_components.code, {\n children: \"/v1/users/documents/\"\n }), \" itself also accepts PDF.\"]\n }), \"\\n\", _jsx(_components.h3, {\n children: \"Access, effects and retries\"\n }), \"\\n\", _jsxs(_components.p, {\n children: [_jsx(_components.strong, {\n children: \"Ownership:\"\n }), \" Patient own category/version progress.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [_jsx(_components.strong, {\n children: \"Prerequisites:\"\n }), \" An authenticated patient account is required.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [_jsx(_components.strong, {\n children: \"Effects:\"\n }), \" Replaces all data entries; marks is_completed false and submitted_at null.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [_jsx(_components.strong, {\n children: \"Retries:\"\n }), \" Same array overwrites; not itemwise merge despite PATCH.\"]\n })]\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":"Replace saved answers","description":"**Replaces the entire saved answer array.** This is not a merge: whatever you send becomes the complete set, and any answer you omit is erased. Always send the full cumulative set of answers, not just the new ones. Send an empty array to clear all saved progress.\n\nOnly question keys present in the served schema are accepted, plus a closed allowlist of synthetic keys. Anything else is rejected — stored answers feed the prescriber's treatment baseline, so they must not carry client state.\n\n**The body must be `{\"data\": [ … ]}`.** A body of another shape is accepted with `200` and the answers are silently discarded — `data` stays empty and nothing tells you the write did not happen. Read the response back and check `answer_status` rather than trusting the status code.\n\nFor a step of kind `upload` the value is a **single document UUID string**, not a list: upload the file to `/v1/users/documents/` first and send the `id` it returns. A list, a malformed UUID, or a UUID belonging to another patient are each rejected with `400`. Note that the server checks the UUID and its ownership but not the file type — the step schema's `accept` list is a client-side hint, and `/v1/users/documents/` itself also accepts PDF.\n\n### Access, effects and retries\n**Ownership:** Patient own category/version progress.\n\n**Prerequisites:** An authenticated patient account is required.\n\n**Effects:** Replaces all data entries; marks is_completed false and submitted_at null.\n\n**Retries:** Same array overwrites; not itemwise merge despite PATCH.","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json patch /v1/users/questionnaires/{slug}/progress/","href":"/api-reference/questionnaires/replace-saved-answers","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"operationId":"users_questionnaires_progress_partial_update","parameters":["6b40040a-3e25-4559-b8e5-dc8d831d6a36"],"tags":["Questionnaires"],"security":["65cc19d7-7f4c-46e8-8c95-a15c906c102b"],"responses":{"200":"ac1c9dae-71fd-4f7c-a3b0-8618f4e80b5b","400":"bc3bf9fe-d813-4676-8963-2159629ae5da","401":"9236b637-ed7d-491d-a6f0-45d01155abe0","403":"4f3c3a82-e919-4621-bacf-82568cc26b34","404":"7ac39f7a-0519-4ea5-afb8-afde14f27039","429":"6e5bd63b-8a48-4f3e-9751-c67881c9d4e4"},"summary":"Replace saved answers","x-pagination":{"kind":"not_applicable"},"requestBody":"9b161b19-4edd-4057-8ae1-235303457bea","description":"**Replaces the entire saved answer array.** This is not a merge: whatever you send becomes the complete set, and any answer you omit is erased. Always send the full cumulative set of answers, not just the new ones. Send an empty array to clear all saved progress.\n\nOnly question keys present in the served schema are accepted, plus a closed allowlist of synthetic keys. Anything else is rejected — stored answers feed the prescriber's treatment baseline, so they must not carry client state.\n\n**The body must be `{\"data\": [ … ]}`.** A body of another shape is accepted with `200` and the answers are silently discarded — `data` stays empty and nothing tells you the write did not happen. Read the response back and check `answer_status` rather than trusting the status code.\n\nFor a step of kind `upload` the value is a **single document UUID string**, not a list: upload the file to `/v1/users/documents/` first and send the `id` it returns. A list, a malformed UUID, or a UUID belonging to another patient are each rejected with `400`. Note that the server checks the UUID and its ownership but not the file type — the step schema's `accept` list is a client-side hint, and `/v1/users/documents/` itself also accepts PDF.\n\n### Access, effects and retries\n**Ownership:** Patient own category/version progress.\n\n**Prerequisites:** An authenticated patient account is required.\n\n**Effects:** Replaces all data entries; marks is_completed false and submitted_at null.\n\n**Retries:** Same array overwrites; not itemwise merge despite PATCH.","x-codeSamples":[{"lang":"Shell","label":"curl","source":"set -eu\numask 077\n# Path values must be URL-encoded; query string excludes the leading question mark.\nurl=\"${HD_BASE_URL:?Set API origin}/v1/users/questionnaires/${HD_PATH_SLUG:?Set the path fixture}/progress/${HD_QUERY_STRING:+?${HD_QUERY_STRING}}\"\nprintf 'X-Brand-Slug: hi-doctor\\nAccept: application/json\\n' > \"${HD_REQUEST_HEADERS_FILE:?Private header file}\"\nprintf 'Authorization: Bearer %s\\n' \"${HD_ACCESS_TOKEN:?Set backend JWT}\" >> \"$HD_REQUEST_HEADERS_FILE\"\ncurl --silent --show-error --max-time 30 --request PATCH \\\n --header \"@$HD_REQUEST_HEADERS_FILE\" \\\n --dump-header \"${HD_HEADERS_FILE:?Private response header file}\" \\\n --output \"${HD_RESPONSE_FILE:?Private response file}\" \\\n --write-out '%{http_code}\\n%{content_type}\\n' \\\n --header 'Content-Type: application/json' \\\n --data-binary \"@${HD_REQUEST_FILE:?JSON fixture file}\" \\\n \"$url\"\n"},{"lang":"Python","label":"requests","source":"import os, json\nfrom pathlib import Path\nfrom urllib.parse import quote\nimport requests\nos.umask(0o077)\nurl = os.environ[\"HD_BASE_URL\"].rstrip(\"/\") + '/v1/users/questionnaires/{slug}/progress/'\nurl = url.replace('{slug}', quote(os.environ['HD_PATH_SLUG'], safe=\"\"))\nif os.environ.get(\"HD_QUERY_STRING\"): url += \"?\" + os.environ[\"HD_QUERY_STRING\"]\nheaders = {\"X-Brand-Slug\": \"hi-doctor\", \"Accept\": 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"HD_ACCESS_TOKEN\"]\nkwargs = {}\nkwargs[\"json\"] = json.loads(Path(os.environ[\"HD_REQUEST_FILE\"]).read_text())\nresponse = requests.request('PATCH', url, headers=headers, timeout=30, allow_redirects=False, **kwargs)\nPath(os.environ[\"HD_RESPONSE_FILE\"]).write_bytes(response.content)\nPath(os.environ[\"HD_HEADERS_FILE\"]).write_text(json.dumps(dict(response.headers)))\nprint(response.status_code)\nprint(response.headers.get(\"Content-Type\", \"\"))\n"},{"lang":"JavaScript","label":"fetch","source":"import { readFileSync, writeFileSync } from \"node:fs\";\nconst env = process.env;\nlet url = env.HD_BASE_URL.replace(/\\/$/, \"\") + \"/v1/users/questionnaires/{slug}/progress/\";\nurl = url.replace(\"{slug}\", encodeURIComponent(env.HD_PATH_SLUG));\nif (env.HD_QUERY_STRING) url += \"?\" + env.HD_QUERY_STRING;\nconst headers = { \"X-Brand-Slug\": \"hi-doctor\", \"Accept\": \"application/json\" };\nheaders.Authorization = \"Bearer \" + env.HD_ACCESS_TOKEN;\nconst options = { method: \"PATCH\", headers, redirect: \"manual\", signal: AbortSignal.timeout(30000) };\nheaders[\"Content-Type\"] = \"application/json\";\noptions.body = readFileSync(env.HD_REQUEST_FILE, \"utf8\");\nconst response = await fetch(url, options);\nwriteFileSync(env.HD_RESPONSE_FILE, Buffer.from(await response.arrayBuffer()), {mode: 0o600});\nwriteFileSync(env.HD_HEADERS_FILE, JSON.stringify(Object.fromEntries(response.headers)), {mode: 0o600});\nconsole.log(response.status);\nconsole.log(response.headers.get(\"content-type\") ?? \"\");\n"}],"method":"patch","type":"path","servers":["4f09e80c-2b64-4896-a8db-cb26d8ca4bfc"],"path":"/v1/users/questionnaires/{slug}/progress/","baseUrlOptions":["https://api.hi-doctor.ai"],"title":"Replace saved answers","codeSamples":[{"label":"curl","lang":"Shell","source":"set -eu\numask 077\n# Path values must be URL-encoded; query string excludes the leading question mark.\nurl=\"${HD_BASE_URL:?Set API origin}/v1/users/questionnaires/${HD_PATH_SLUG:?Set the path fixture}/progress/${HD_QUERY_STRING:+?${HD_QUERY_STRING}}\"\nprintf 'X-Brand-Slug: hi-doctor\\nAccept: application/json\\n' > \"${HD_REQUEST_HEADERS_FILE:?Private header file}\"\nprintf 'Authorization: Bearer %s\\n' \"${HD_ACCESS_TOKEN:?Set backend JWT}\" >> \"$HD_REQUEST_HEADERS_FILE\"\ncurl --silent --show-error --max-time 30 --request PATCH \\\n --header \"@$HD_REQUEST_HEADERS_FILE\" \\\n --dump-header \"${HD_HEADERS_FILE:?Private response header file}\" \\\n --output \"${HD_RESPONSE_FILE:?Private response file}\" \\\n --write-out '%{http_code}\\n%{content_type}\\n' \\\n --header 'Content-Type: application/json' \\\n --data-binary \"@${HD_REQUEST_FILE:?JSON fixture file}\" \\\n \"$url\"\n"},{"label":"requests","lang":"Python","source":"import os, json\nfrom pathlib import Path\nfrom urllib.parse import quote\nimport requests\nos.umask(0o077)\nurl = os.environ[\"HD_BASE_URL\"].rstrip(\"/\") + '/v1/users/questionnaires/{slug}/progress/'\nurl = url.replace('{slug}', quote(os.environ['HD_PATH_SLUG'], safe=\"\"))\nif os.environ.get(\"HD_QUERY_STRING\"): url += \"?\" + os.environ[\"HD_QUERY_STRING\"]\nheaders = {\"X-Brand-Slug\": \"hi-doctor\", \"Accept\": 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"HD_ACCESS_TOKEN\"]\nkwargs = {}\nkwargs[\"json\"] = json.loads(Path(os.environ[\"HD_REQUEST_FILE\"]).read_text())\nresponse = requests.request('PATCH', url, headers=headers, timeout=30, allow_redirects=False, **kwargs)\nPath(os.environ[\"HD_RESPONSE_FILE\"]).write_bytes(response.content)\nPath(os.environ[\"HD_HEADERS_FILE\"]).write_text(json.dumps(dict(response.headers)))\nprint(response.status_code)\nprint(response.headers.get(\"Content-Type\", \"\"))\n"},{"label":"fetch","lang":"JavaScript","source":"import { readFileSync, writeFileSync } from \"node:fs\";\nconst env = process.env;\nlet url = env.HD_BASE_URL.replace(/\\/$/, \"\") + \"/v1/users/questionnaires/{slug}/progress/\";\nurl = url.replace(\"{slug}\", encodeURIComponent(env.HD_PATH_SLUG));\nif (env.HD_QUERY_STRING) url += \"?\" + env.HD_QUERY_STRING;\nconst headers = { \"X-Brand-Slug\": \"hi-doctor\", \"Accept\": \"application/json\" };\nheaders.Authorization = \"Bearer \" + env.HD_ACCESS_TOKEN;\nconst options = { method: \"PATCH\", headers, redirect: \"manual\", signal: AbortSignal.timeout(30000) };\nheaders[\"Content-Type\"] = \"application/json\";\noptions.body = readFileSync(env.HD_REQUEST_FILE, \"utf8\");\nconst response = await fetch(url, options);\nwriteFileSync(env.HD_RESPONSE_FILE, Buffer.from(await response.arrayBuffer()), {mode: 0o600});\nwriteFileSync(env.HD_HEADERS_FILE, JSON.stringify(Object.fromEntries(response.headers)), {mode: 0o600});\nconsole.log(response.status);\nconsole.log(response.headers.get(\"content-type\") ?? \"\");\n"}],"requiredOnlyExamples":false,"requestExampleType":"codeSamples","responseExampleType":"generated","prefillPlaygroundWithExample":true,"prefillPlaygroundExamples":[{},{}]},"dependencies":{"parameters":{"6b40040a-3e25-4559-b8e5-dc8d831d6a36":{"in":"path","name":"slug","schema":{"type":"string","isRequired":true,"description":"Questionnaire category slug returned by the categories endpoint.","uniqueKey":"","typeLabel":"string"},"required":true,"description":"Questionnaire category slug returned by the categories endpoint.","example":"weight-loss"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","additionalProperties":{"oneOf":[{}],"uniqueKey":"data.items.[INDEX].additionalProperties","typeLabel":"any"},"uniqueKey":"data.items.[INDEX]","typeLabel":"object"},"description":"Questionnaire step-answer records, using the current questionnaire schema.","uniqueKey":"data","typeLabel":"object[]"}},"uniqueKey":"","typeLabel":"object"},"examples":{"example-1":{"title":"example-1","value":{"data":[]}},"example-2":{"title":"example-2","value":{"data":[]}}},"exampleType":"examples"}},"exampleType":"examples"},"responses":{"ac1c9dae-71fd-4f7c-a3b0-8618f4e80b5b":{"description":"No response body","content":{"application/json":{"examples":{"example-1":{"title":"example-1","value":{"progress":{"id":"0de13d6b-0001-5b68-8677-66eab4090312","category":"b438fff3-4ce5-5352-a17d-718c51491d94","version":"5d7dac75-8ba8-533d-a3ae-ebd2f6b21778","data":[{"step_id":1,"value":"ESP","question_key":"weight_loss-01-country"}],"is_completed":false,"started_at":"2026-10-05T17:48:56.922789Z","submitted_at":null,"updated_at":"2026-10-05T17:48:57.250854Z"},"answer_status":{"weight_loss-01-country":"answered_current_form","weight_loss-02-gender":"missing","weight_loss-03-height_weight":"missing","weight_loss-04-height_weight":"missing","weight_loss-05-height_weight":"missing","weight_loss-07-height_weight":"missing","weight_loss-08-height_weight":"missing","weight_loss-previous-medication-which":"missing","weight_loss-previous-medication-dose-wegovy":"missing","weight_loss-previous-medication-dose-mounjaro":"missing","weight_loss-previous-medication-dose-saxenda":"missing","weight_loss-09-height_weight":"missing","weight_loss-10-height_weight":"missing","weight_loss-11-height_weight":"missing","weight_loss-12-height_weight":"missing","weight_loss-allergies":"missing","weight_loss-06-height_weight":"missing","weight_loss-currentmedications":"missing","weight_loss-13-height_weight":"missing","weight_loss-14-height_weight":"missing","glp1RenewalAdverseEffects":"missing"}}},"example-2":{"title":"example-2","value":{"progress":{"id":"0de13d6b-0001-5b68-8677-66eab4090312","category":"b438fff3-4ce5-5352-a17d-718c51491d94","version":"5d7dac75-8ba8-533d-a3ae-ebd2f6b21778","data":[],"is_completed":false,"started_at":"2026-10-05T17:48:56.922789Z","submitted_at":null,"updated_at":"2026-10-05T17:48:57.852231Z"},"answer_status":{"weight_loss-01-country":"missing","weight_loss-02-gender":"missing","weight_loss-03-height_weight":"missing","weight_loss-04-height_weight":"missing","weight_loss-05-height_weight":"missing","weight_loss-07-height_weight":"missing","weight_loss-08-height_weight":"missing","weight_loss-previous-medication-which":"missing","weight_loss-previous-medication-dose-wegovy":"missing","weight_loss-previous-medication-dose-mounjaro":"missing","weight_loss-previous-medication-dose-saxenda":"missing","weight_loss-09-height_weight":"missing","weight_loss-10-height_weight":"missing","weight_loss-11-height_weight":"missing","weight_loss-12-height_weight":"missing","weight_loss-allergies":"missing","weight_loss-06-height_weight":"missing","weight_loss-currentmedications":"missing","weight_loss-13-height_weight":"missing","weight_loss-14-height_weight":"missing","glp1RenewalAdverseEffects":"missing"}}},"example-3":{"title":"example-3","value":{"progress":{"id":"3f526c05-ed03-5265-9ac4-da2947af3cd9","category":"ec6c2abf-14af-5045-ada5-b3a931501751","version":"cf1867b4-7048-593b-a0a3-cd1d0c0672e8","data":[],"is_completed":false,"started_at":"2026-10-05T18:21:11.883154Z","submitted_at":null,"updated_at":"2026-10-05T19:54:44.630413Z"},"answer_status":{"weight_loss-01-country":"prefilled_from_prior_questionnaire","weight_loss-02-gender":"prefilled_from_prior_questionnaire","weight_loss-03-height_weight":"missing","weight_loss-04-height_weight":"requires_confirmation","weight_loss-05-height_weight":"missing","weight_loss-07-height_weight":"requires_confirmation","weight_loss-08-height_weight":"requires_confirmation","weight_loss-previous-medication-which":"missing","weight_loss-previous-medication-dose-wegovy":"missing","weight_loss-previous-medication-dose-mounjaro":"missing","weight_loss-previous-medication-dose-saxenda":"missing","weight_loss-09-height_weight":"missing","weight_loss-10-height_weight":"requires_confirmation","weight_loss-11-height_weight":"requires_confirmation","weight_loss-12-height_weight":"requires_confirmation","weight_loss-allergies":"requires_confirmation","weight_loss-06-height_weight":"requires_confirmation","weight_loss-currentmedications":"requires_confirmation","weight_loss-13-height_weight":"requires_confirmation","weight_loss-14-height_weight":"requires_confirmation","glp1RenewalAdverseEffects":"missing"}}}},"schema":{"type":"object","properties":{"progress":{"type":"object","description":"Progress returned or accepted by this contract.","properties":{"id":{"type":"string","format":"uuid","description":"Id returned or accepted by this contract.","uniqueKey":"progress.id","typeLabel":"string\u003cuuid>"},"category":{"type":"string","format":"uuid","description":"Category returned or accepted by this contract.","uniqueKey":"progress.category","typeLabel":"string\u003cuuid>"},"version":{"type":"string","format":"uuid","description":"Version returned or accepted by this contract.","uniqueKey":"progress.version","typeLabel":"string\u003cuuid>"},"data":{"type":"array","items":{"oneOf":[{}],"uniqueKey":"progress.data.items.[INDEX]","typeLabel":"any"},"description":"Data returned or accepted by this contract.","uniqueKey":"progress.data","typeLabel":"any[]"},"is_completed":{"type":"boolean","description":"Is completed returned or accepted by this contract.","uniqueKey":"progress.is_completed","typeLabel":"boolean"},"started_at":{"type":"string","format":"date-time","nullable":false,"description":"Started at returned or accepted by this contract.","uniqueKey":"progress.started_at","typeLabel":"string\u003cdate-time>"},"submitted_at":{"oneOf":[{"type":"string","format":"date-time","description":"Submitted at returned or accepted by this contract.","uniqueKey":"progress.submitted_at.oneOf.0","typeLabel":"string\u003cdate-time>"},{"type":"null","format":"date-time","description":"Submitted at returned or accepted by this contract.","uniqueKey":"progress.submitted_at.oneOf.1","typeLabel":"null"}],"uniqueKey":"progress.submitted_at","typeLabel":"string\u003cdate-time> | null"},"updated_at":{"type":"string","format":"date-time","nullable":false,"description":"Updated at returned or accepted by this contract.","uniqueKey":"progress.updated_at","typeLabel":"string\u003cdate-time>"}},"isRequired":true,"uniqueKey":"progress","typeLabel":"object"},"answer_status":{"type":"object","description":"Answer status returned or accepted by this contract.","additionalProperties":{"oneOf":[{}],"uniqueKey":"answer_status.additionalProperties","typeLabel":"any"},"isRequired":true,"uniqueKey":"answer_status","typeLabel":"object"},"reusable_prefill":{"type":"array","items":{"oneOf":[{}],"uniqueKey":"reusable_prefill.items.[INDEX]","typeLabel":"any"},"description":"Reusable prefill returned or accepted by this contract.","uniqueKey":"reusable_prefill","typeLabel":"any[]"}},"required":["progress","answer_status"],"uniqueKey":"","typeLabel":"object"},"exampleType":"examples"}},"exampleType":"examples"},"bc3bf9fe-d813-4676-8963-2159629ae5da":{"description":"The slug is unknown, or an answer carries a question key that is not in the served schema.","content":{"application/json":{"schema":{"type":"object","description":"Error envelope emitted by the source branch or DRF validation. `detail`, `error` and `code` depend on the branch; field validation uses lists keyed by request field.","additionalProperties":{"oneOf":[{}],"uniqueKey":"additionalProperties","typeLabel":"any"},"uniqueKey":"","typeLabel":"object"},"examples":{"example-1":{"title":"example-1","value":{"detail":"Invalid input."}}},"exampleType":"examples"}},"exampleType":"examples"},"9236b637-ed7d-491d-a6f0-45d01155abe0":{"description":"No bearer token, or a token that is expired or malformed. Re-authenticate; do not retry the same token.","content":{"application/json":{"schema":{"type":"object","description":"Error envelope emitted by the source branch or DRF validation. `detail`, `error` and `code` depend on the branch; field validation uses lists keyed by request field.","additionalProperties":{"oneOf":[{}],"uniqueKey":"additionalProperties","typeLabel":"any"},"uniqueKey":"","typeLabel":"object"},"examples":{"example-1":{"title":"example-1","value":{"detail":"Authentication credentials were not provided."}}},"exampleType":"examples"}},"exampleType":"examples"},"4f3c3a82-e919-4621-bacf-82568cc26b34":{"description":"The account lacks permission for this operation.","content":{"application/json":{"schema":{"type":"object","description":"Error envelope emitted by the source branch or DRF validation. `detail`, `error` and `code` depend on the branch; field validation uses lists keyed by request field.","additionalProperties":{"oneOf":[{}],"uniqueKey":"additionalProperties","typeLabel":"any"},"uniqueKey":"","typeLabel":"object"},"examples":{"example-1":{"title":"example-1","value":{"detail":"You do not have permission to perform this action."}}},"exampleType":"examples"}},"exampleType":"examples"},"7ac39f7a-0519-4ea5-afb8-afde14f27039":{"description":"No such record, **or it belongs to another account**. Every endpoint is self-scoped, so a record you cannot see is indistinguishable from one that does not exist. Do not retry with a different id.","content":{"application/json":{"schema":{"type":"object","description":"Error envelope emitted by the source branch or DRF validation. `detail`, `error` and `code` depend on the branch; field validation uses lists keyed by request field.","additionalProperties":{"oneOf":[{}],"uniqueKey":"additionalProperties","typeLabel":"any"},"uniqueKey":"","typeLabel":"object"},"examples":{"example-1":{"title":"example-1","value":{"detail":"Not found."}}},"exampleType":"examples"}},"exampleType":"examples"},"6e5bd63b-8a48-4f3e-9751-c67881c9d4e4":{"description":"Source-defined error response; inspect the envelope and retry rules.","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"oneOf":[{}],"uniqueKey":"additionalProperties","typeLabel":"any"},"description":"Endpoint/DRF error envelope; field validation is keyed by request field.","uniqueKey":"","typeLabel":"object"},"examples":{"example-1":{"title":"example-1","value":{"detail":"Request was throttled."}}},"exampleType":"examples"}},"exampleType":"examples"}},"security":{"65cc19d7-7f4c-46e8-8c95-a15c906c102b":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","scopes":[],"schemeName":"bearerAuth"}}},"servers":{"4f09e80c-2b64-4896-a8db-cb26d8ca4bfc":{"url":"https://api.hi-doctor.ai","description":"Production"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","bearerFormat":"JWT","scopes":[],"schemeName":"bearerAuth"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"Bearer authentication header of the form `Bearer \u003ctoken>`, where `\u003ctoken>` is your auth token.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"bearerAuth","name":"Authorization"}],"title":"bearerAuth"}]},"originalFileLocation":"api-reference/openapi.json"},"subdomain":"hi-doctor-ai","siteName":"Hi Doctor","title":"Replace saved answers - Hi Doctor","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-04T14:38:27.237Z","originalFileLocation":"api-reference/questionnaires/replace-saved-answers.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=\"Replaces the entire saved answer array. This is not a merge: whatever you send becomes the complete set, and any answer you omit is erased. Always send the full cumulative set of answers, not just the new ones. Send an empty array to clear all saved progress. Only question keys present in the served schema are accepted, plus a closed allowlist of synthetic keys. Anything else is rejected — stored answers feed the prescriber\u0026#x27;s treatment baseline, so they must not carry client state. The body must be {\u0026quot;data\u0026quot;: [ … ]}. A body of another shape is accepted with 200 and the answers are silently discarded — data stays empty and nothing tells you the write did not happen. Read the response back and check answer_status rather than trusting the status code. For a step of kind upload the value is a single document UUID string, not a list: upload the file to /v1/users/documents/ first and send the id it returns. A list, a malformed UUID, or a UUID belonging to another patient are each rejected with 400. Note that the server checks the UUID and its ownership but not the file type — the step schema\u0026#x27;s accept list is a client-side hint, and /v1/users/documents/ itself also accepts PDF. ### Access, effects and retries Ownership: Patient own category/version progress. Prerequisites: An authenticated patient account is required. Effects: Replaces all data entries; marks is_completed false and submitted_at null. Retries: Same array overwrites; not itemwise merge despite PATCH.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Hi Doctor\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003cmeta data-mint-head name=\"robots\" content=\"index, follow, max-image-preview:large, max-snippet:-1\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/hi-doctor-ai/nurYHPmYbdMdWury/_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/hi-doctor-ai/nurYHPmYbdMdWury/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/hi-doctor-ai/nurYHPmYbdMdWury/_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/hi-doctor-ai/nurYHPmYbdMdWury/_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/hi-doctor-ai/nurYHPmYbdMdWury/_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/hi-doctor-ai/nurYHPmYbdMdWury/_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/hi-doctor-ai/nurYHPmYbdMdWury/_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/hi-doctor-ai/nurYHPmYbdMdWury/_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/hi-doctor-ai/nurYHPmYbdMdWury/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Replace saved answers - Hi Doctor\">\u003cmeta data-mint-head property=\"og:description\" content=\"Replaces the entire saved answer array. This is not a merge: whatever you send becomes the complete set, and any answer you omit is erased. Always send the full cumulative set of answers, not just the new ones. Send an empty array to clear all saved progress. Only question keys present in the served schema are accepted, plus a closed allowlist of synthetic keys. Anything else is rejected — stored answers feed the prescriber\u0026#x27;s treatment baseline, so they must not carry client state. The body must be {\u0026quot;data\u0026quot;: [ … ]}. A body of another shape is accepted with 200 and the answers are silently discarded — data stays empty and nothing tells you the write did not happen. Read the response back and check answer_status rather than trusting the status code. For a step of kind upload the value is a single document UUID string, not a list: upload the file to /v1/users/documents/ first and send the id it returns. A list, a malformed UUID, or a UUID belonging to another patient are each rejected with 400. Note that the server checks the UUID and its ownership but not the file type — the step schema\u0026#x27;s accept list is a client-side hint, and /v1/users/documents/ itself also accepts PDF. ### Access, effects and retries Ownership: Patient own category/version progress. Prerequisites: An authenticated patient account is required. Effects: Replaces all data entries; marks is_completed false and submitted_at null. Retries: Same array overwrites; not itemwise merge despite PATCH.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Hi Doctor Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.hi-doctor.ai/api-reference/questionnaires/replace-saved-answers\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://hi-doctor-ai.mintlify.app/_mintlify/api/og/v2?division=Questionnaires\u0026amp;title=Replace+saved+answers\u0026amp;description=**Replaces+the+entire+saved+answer+array.**+This+is+not+a+merge%3A+whatever+you+send+becomes+the+complete+set%2C+and+any+answer+you+omit+is+erased.+Always+send+the+\u0026amp;theme=62172df8443c9a1536d0ebde\u0026amp;signature=627d728915ff35a47fcaf84918e5c60949bbaffb27422418a791478f463d345f\">\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=\"Replace saved answers - Hi Doctor\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Replaces the entire saved answer array. This is not a merge: whatever you send becomes the complete set, and any answer you omit is erased. Always send the full cumulative set of answers, not just the new ones. Send an empty array to clear all saved progress. Only question keys present in the served schema are accepted, plus a closed allowlist of synthetic keys. Anything else is rejected — stored answers feed the prescriber\u0026#x27;s treatment baseline, so they must not carry client state. The body must be {\u0026quot;data\u0026quot;: [ … ]}. A body of another shape is accepted with 200 and the answers are silently discarded — data stays empty and nothing tells you the write did not happen. Read the response back and check answer_status rather than trusting the status code. For a step of kind upload the value is a single document UUID string, not a list: upload the file to /v1/users/documents/ first and send the id it returns. A list, a malformed UUID, or a UUID belonging to another patient are each rejected with 400. Note that the server checks the UUID and its ownership but not the file type — the step schema\u0026#x27;s accept list is a client-side hint, and /v1/users/documents/ itself also accepts PDF. ### Access, effects and retries Ownership: Patient own category/version progress. Prerequisites: An authenticated patient account is required. Effects: Replaces all data entries; marks is_completed false and submitted_at null. Retries: Same array overwrites; not itemwise merge despite PATCH.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://hi-doctor-ai.mintlify.app/_mintlify/api/og/v2?division=Questionnaires\u0026amp;title=Replace+saved+answers\u0026amp;description=**Replaces+the+entire+saved+answer+array.**+This+is+not+a+merge%3A+whatever+you+send+becomes+the+complete+set%2C+and+any+answer+you+omit+is+erased.+Always+send+the+\u0026amp;theme=62172df8443c9a1536d0ebde\u0026amp;signature=627d728915ff35a47fcaf84918e5c60949bbaffb27422418a791478f463d345f\">\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/hi-doctor-ai/nurYHPmYbdMdWury/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Hi Doctor\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#157A5C\">\u003cmeta data-mint-head name=\"og:locale\" content=\"en_US\">\u003cmeta data-mint-head name=\"author\" content=\"Hi Doctor\">\u003cmeta data-mint-head name=\"theme-color\" content=\"#157A5C\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.hi-doctor.ai/api-reference/questionnaires/replace-saved-answers\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/questionnaires/replace-saved-answers.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://hi-doctor.ai/#organization\",\"name\":\"Hi Doctor\",\"url\":\"https://hi-doctor.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/hi-doctor-ai/PIEJYA1zSavoVnhH/logo/wordmark-on-light.svg?fit=max\u0026auto=format\u0026n=PIEJYA1zSavoVnhH\u0026q=85\u0026s=c7243fb417e4d3908f3b5fc634a28923\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.hi-doctor.ai#website\",\"name\":\"Hi Doctor\",\"url\":\"https://docs.hi-doctor.ai\",\"publisher\":{\"@id\":\"https://hi-doctor.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.hi-doctor.ai/api-reference/questionnaires/replace-saved-answers#webpage\",\"url\":\"https://docs.hi-doctor.ai/api-reference/questionnaires/replace-saved-answers\",\"name\":\"Replace saved answers\",\"description\":\"Replaces the entire saved answer array. This is not a merge: whatever you send becomes the complete set, and any answer you omit is erased. Always send the full cumulative set of answers, not just the new ones. Send an empty array to clear all saved progress. Only question keys present in the served schema are accepted, plus a closed allowlist of synthetic keys. Anything else is rejected — stored answers feed the prescriber's treatment baseline, so they must not carry client state. The body must be {\\\"data\\\": [ … ]}. A body of another shape is accepted with 200 and the answers are silently discarded — data stays empty and nothing tells you the write did not happen. Read the response back and check answer_status rather than trusting the status code. For a step of kind upload the value is a single document UUID string, not a list: upload the file to /v1/users/documents/ first and send the id it returns. A list, a malformed UUID, or a UUID belonging to another patient are each rejected with 400. Note that the server checks the UUID and its ownership but not the file type — the step schema's accept list is a client-side hint, and /v1/users/documents/ itself also accepts PDF. ### Access, effects and retries Ownership: Patient own category/version progress. Prerequisites: An authenticated patient account is required. Effects: Replaces all data entries; marks is_completed false and submitted_at null. Retries: Same array overwrites; not itemwise merge despite PATCH.\",\"dateModified\":\"2026-11-04T14:38:27.237Z\",\"isPartOf\":{\"@id\":\"https://docs.hi-doctor.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.hi-doctor.ai/api-reference/questionnaires/replace-saved-answers#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.hi-doctor.ai/api-reference/questionnaires/replace-saved-answers#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Endpoints\",\"item\":\"https://docs.hi-doctor.ai/api-reference/tags/account\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Questionnaires\",\"item\":\"https://docs.hi-doctor.ai/api-reference/tags/questionnaires\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Replace saved answers\",\"item\":\"https://docs.hi-doctor.ai/api-reference/questionnaires/replace-saved-answers\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.hi-doctor.ai/api-reference/questionnaires/replace-saved-answers#apireference\",\"headline\":\"Replace saved answers\",\"name\":\"Replace saved answers\",\"description\":\"Replaces the entire saved answer array. This is not a merge: whatever you send becomes the complete set, and any answer you omit is erased. Always send the full cumulative set of answers, not just the new ones. Send an empty array to clear all saved progress. Only question keys present in the served schema are accepted, plus a closed allowlist of synthetic keys. Anything else is rejected — stored answers feed the prescriber's treatment baseline, so they must not carry client state. The body must be {\\\"data\\\": [ … ]}. A body of another shape is accepted with 200 and the answers are silently discarded — data stays empty and nothing tells you the write did not happen. Read the response back and check answer_status rather than trusting the status code. For a step of kind upload the value is a single document UUID string, not a list: upload the file to /v1/users/documents/ first and send the id it returns. A list, a malformed UUID, or a UUID belonging to another patient are each rejected with 400. Note that the server checks the UUID and its ownership but not the file type — the step schema's accept list is a client-side hint, and /v1/users/documents/ itself also accepts PDF. ### Access, effects and retries Ownership: Patient own category/version progress. Prerequisites: An authenticated patient account is required. Effects: Replaces all data entries; marks is_completed false and submitted_at null. Retries: Same array overwrites; not itemwise merge despite PATCH.\",\"url\":\"https://docs.hi-doctor.ai/api-reference/questionnaires/replace-saved-answers\",\"mainEntityOfPage\":{\"@id\":\"https://docs.hi-doctor.ai/api-reference/questionnaires/replace-saved-answers#webpage\"},\"dateModified\":\"2026-11-04T14:38:27.237Z\",\"publisher\":{\"@id\":\"https://hi-doctor.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.hi-doctor.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Hi Doctor\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Hi Doctor","nav":{"global":{"anchors":[{"anchor":"OpenAPI spec","icon":"file-code","href":"/api-reference/openapi.json"},{"anchor":"Add the MCP connector","icon":"plug","href":"https://claude.ai/customize/connectors?modal=add-custom-connector\u0026connectorName=Hi%20Doctor\u0026connectorUrl=https://mcp.hi-doctor.ai/mcp"},{"anchor":"AI integration prompt","icon":"wand-magic-sparkles","href":"/mcp/ai-integration"},{"anchor":"hi-doctor.ai","icon":"house-medical","href":"https://hi-doctor.ai"}]},"tabs":[{"tab":"Documentation","pages":[{"title":"Documentation","href":""}]},{"tab":"MCP","pages":[{"title":"MCP","href":"/mcp/overview"}]},{"tab":"API reference","groups":[{"group":"Start","pages":[{"title":"Hi Doctor patient REST API: overview and base URL","sidebarTitle":"API reference","href":"/api-reference/introduction"},{"title":"REST API quickstart: sign in and make your first read","sidebarTitle":"Quickstart","href":"/api-reference/quickstart"},{"title":"Answer a Hi Doctor questionnaire one question at a time","sidebarTitle":"Answer a questionnaire","href":"/api-reference/questionnaire-guide"},{"title":"REST authentication: patient JWTs, refresh and Google","sidebarTitle":"Authentication","href":"/api-reference/authentication"},{"title":"Sign up a Hi Doctor patient over the REST API","sidebarTitle":"Sign up","href":"/api-reference/signup"}]},{"group":"Conventions","pages":[{"title":"Pagination in the Hi Doctor patient REST API","sidebarTitle":"Pagination","href":"/api-reference/pagination"},{"title":"Uploads and downloads in the Hi Doctor REST API","sidebarTitle":"Uploads and downloads","href":"/api-reference/uploads-downloads"},{"title":"Hi Doctor REST API errors, throttles and recovery","sidebarTitle":"Errors and recovery","href":"/api-reference/errors"},{"title":"Safe retries with Idempotency-Key in the Hi Doctor API","sidebarTitle":"Safe retries","href":"/api-reference/idempotency"},{"title":"Hi Doctor patient REST API changelog","sidebarTitle":"API changelog","href":"/api-reference/changelog"}]},{"group":"Endpoints","pages":[{"group":"Account","pages":[{"title":"Account endpoints: sign up, sign in and profile","sidebarTitle":"Account","href":"/api-reference/tags/account"},{"title":"Register a new patient","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/users/register/","href":"/api-reference/account/register-a-new-patient"},{"title":"Verify the emailed code","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/users/verify-email/","href":"/api-reference/account/verify-the-emailed-code"},{"title":"Create an access token pair","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/users/token/","href":"/api-reference/account/create-an-access-token-pair"},{"title":"Create tokens with Google","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/users/google-login/","href":"/api-reference/account/create-tokens-with-google"},{"title":"Refresh the access token","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/users/token/refresh/","href":"/api-reference/account/refresh-the-access-token"},{"title":"Request a password reset","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/users/forgot-password/","href":"/api-reference/account/request-a-password-reset"},{"title":"Replace the account password","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/users/reset-password/","href":"/api-reference/account/replace-the-account-password"},{"title":"Get the account profile","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/users/profile/me/","href":"/api-reference/account/get-the-account-profile"},{"title":"Update the account profile","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json patch /v1/users/profile/me/","href":"/api-reference/account/update-the-account-profile"},{"title":"Get the profile alias","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/users/profile/","href":"/api-reference/account/get-the-profile-alias"},{"title":"Update the profile alias","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json patch /v1/users/profile/","href":"/api-reference/account/update-the-profile-alias"},{"title":"Delete the patient account","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/users/account/delete/","href":"/api-reference/account/delete-the-patient-account"},{"title":"Check registration email status","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/users/register/email-status/","href":"/api-reference/account/check-registration-email-status"},{"title":"Subscribe to newsletter updates","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/users/marketing/newsletter/subscribe/","href":"/api-reference/account/subscribe-to-newsletter-updates"},{"title":"Join a treatment waitlist","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/users/marketing/waitlist/","href":"/api-reference/account/join-a-treatment-waitlist"},{"title":"Update email communication preferences","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/users/marketing/email-preferences/","href":"/api-reference/account/update-email-communication-preferences"},{"title":"Get an idempotency key result","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/users/idempotency/{key}/","href":"/api-reference/account/get-an-idempotency-key-result"}]},{"group":"Questionnaires","pages":[{"title":"Questionnaire endpoints: schema, answers and submit","sidebarTitle":"Questionnaires","href":"/api-reference/tags/questionnaires"},{"title":"List questionnaire categories","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/users/questionnaires/categories/","href":"/api-reference/questionnaires/list-questionnaire-categories"},{"title":"Get a questionnaire schema and saved progress","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/users/questionnaires/{slug}/schema/","href":"/api-reference/questionnaires/get-a-questionnaire-schema-and-saved-progress"},{"title":"Get saved answers","description":"Partial answers saved so far. Nothing here has been submitted for review.\n\n### Access, effects and retries\n**Ownership:** Patient own category/version progress.\n\n**Prerequisites:** An authenticated patient account is required.\n\n**Effects:** GET get_or_create can insert empty progress.\n\n**Retries:** Treat as stateful; capture prestate through schema when possible.","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/users/questionnaires/{slug}/progress/","href":"/api-reference/questionnaires/get-saved-answers"},{"title":"Replace saved answers","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json patch /v1/users/questionnaires/{slug}/progress/","href":"/api-reference/questionnaires/replace-saved-answers"},{"title":"Get the next questionnaire question","description":"Returns the next unanswered applicable item in the order the patient app shows it, with localized options, constraints, progress and an opaque `revision`. Grids are served one item at a time and active follow-ups appear as their own items. `complete` agrees with `review.ready_to_submit`; an unanswered optional question can still be returned after `complete` becomes true. `reusable_prefill` offers a previous answer for the patient to confirm; it does not count as answered. Responses carry `Cache-Control: no-store`.\n\n### Access, effects and retries\n**Ownership:** The signed-in patient's own draft for this questionnaire category and active version.\n\n**Prerequisites:** An authenticated patient account is required. with a bearer JWT; the category must be enabled for the account brand.\n\n**Effects:** None. This read never creates or changes saved progress.\n\n**Retries:** Safe to repeat.","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/users/questionnaires/{slug}/current/","href":"/api-reference/questionnaires/get-the-next-questionnaire-question"},{"title":"Send questionnaire answers","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/users/questionnaires/{slug}/answer/","href":"/api-reference/questionnaires/send-questionnaire-answers"},{"title":"Get a previously answered question","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/users/questionnaires/{slug}/back/","href":"/api-reference/questionnaires/get-a-previously-answered-question"},{"title":"Get questionnaire answers for review","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/users/questionnaires/{slug}/review/","href":"/api-reference/questionnaires/get-questionnaire-answers-for-review"},{"title":"Submit for medical review","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/users/questionnaires/{slug}/submit/","href":"/api-reference/questionnaires/submit-for-medical-review"},{"title":"Submit the legacy patient form","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json patch /v1/users/forms/user/","href":"/api-reference/questionnaires/submit-the-legacy-patient-form"}]},{"group":"Consultations","pages":[{"title":"Consultation endpoints: status and photographs","sidebarTitle":"Consultations","href":"/api-reference/tags/consultations"},{"title":"List consultation photos","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/questionnaire/consultations/{id}/images/","href":"/api-reference/consultations/list-consultation-photos"},{"title":"Create a consultation photo","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/questionnaire/consultations/{id}/images/","href":"/api-reference/consultations/create-a-consultation-photo"},{"title":"Download a consultation photo","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/questionnaire/consultations/{id}/images/{image_id}/content/","href":"/api-reference/consultations/download-a-consultation-photo"},{"title":"List patient consultations","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/users/consultations/","href":"/api-reference/consultations/list-patient-consultations"},{"title":"Get a consultation","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/users/consultations/{id}/","href":"/api-reference/consultations/get-a-consultation"},{"title":"Delete a consultation photo","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json delete /v1/questionnaire/consultations/{id}/images/{image_id}/","href":"/api-reference/consultations/delete-a-consultation-photo"}]},{"group":"Prescriptions","pages":[{"title":"Prescription endpoints: list, PDF download and reissue","sidebarTitle":"Prescriptions","href":"/api-reference/tags/prescriptions"},{"title":"List patient prescriptions","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/users/prescriptions/","href":"/api-reference/prescriptions/list-patient-prescriptions"},{"title":"Download a prescription PDF by kind","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/users/prescriptions/{id}/pdf/{kind}/","href":"/api-reference/prescriptions/download-a-prescription-pdf-by-kind"},{"title":"Download a prescription PDF","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/users/prescriptions/{id}/pdf/","href":"/api-reference/prescriptions/download-a-prescription-pdf"},{"title":"Request a prescription reissue","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/users/prescriptions/{id}/request-reissue/","href":"/api-reference/prescriptions/request-a-prescription-reissue"},{"title":"Verify a prescription token","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/users/verify/prescription/{token}/","href":"/api-reference/prescriptions/verify-a-prescription-token"}]},{"group":"Messages","pages":[{"title":"Message endpoints: medical team conversations","sidebarTitle":"Messages","href":"/api-reference/tags/messages"},{"title":"List patient conversations","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/users/conversations/","href":"/api-reference/messages/list-patient-conversations"},{"title":"Create a medical-team conversation","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/users/conversations/","href":"/api-reference/messages/create-a-medical-team-conversation"},{"title":"Get a conversation","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/users/conversations/{id}/","href":"/api-reference/messages/get-a-conversation"},{"title":"Get unread counts","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/users/conversations/unread-summary/","href":"/api-reference/messages/get-unread-counts"},{"title":"List patient messages","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/users/conversations/{id}/messages/","href":"/api-reference/messages/list-patient-messages"},{"title":"Send a message","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/users/conversations/{id}/messages/","href":"/api-reference/messages/send-a-message"},{"title":"Download a message attachment","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/users/conversations/{id}/messages/{message_id}/attachment/","href":"/api-reference/messages/download-a-message-attachment"},{"title":"Mark a conversation as read","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/users/conversations/{id}/mark-read/","href":"/api-reference/messages/mark-a-conversation-as-read"},{"title":"Mark a conversation as unread","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/users/conversations/{id}/mark-unread/","href":"/api-reference/messages/mark-a-conversation-as-unread"}]},{"group":"Billing","pages":[{"title":"Billing endpoints: checkout, plans and invoices","sidebarTitle":"Billing","href":"/api-reference/tags/billing"},{"title":"Create a checkout session","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/users/checkout/","href":"/api-reference/billing/create-a-checkout-session"},{"title":"Get checkout session status","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/users/stripe/session/{session_id}/","href":"/api-reference/billing/get-checkout-session-status"},{"title":"Get patient subscription","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/users/subscriptions/me/","href":"/api-reference/billing/get-patient-subscription"},{"title":"Get renewal options for a category","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/users/subscriptions/renewal-options/","href":"/api-reference/billing/get-renewal-options-for-a-category"},{"title":"List pending renewal choices","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/users/subscriptions/pending-choice/","href":"/api-reference/billing/list-pending-renewal-choices"},{"title":"Confirm a pending renewal choice","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/users/subscriptions/pending-choice/confirm/","href":"/api-reference/billing/confirm-a-pending-renewal-choice"},{"title":"Cancel a subscription at period end","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/users/subscriptions/cancel/","href":"/api-reference/billing/cancel-a-subscription-at-period-end"},{"title":"Reactivate a subscription","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/users/subscriptions/reactivate/","href":"/api-reference/billing/reactivate-a-subscription"},{"title":"Request an early subscription order","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/users/subscriptions/early-order/","href":"/api-reference/billing/request-an-early-subscription-order"},{"title":"Create a billing portal session","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/users/subscriptions/portal/","href":"/api-reference/billing/create-a-billing-portal-session"},{"title":"List patient payments","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/users/payments/","href":"/api-reference/billing/list-patient-payments"},{"title":"Download an invoice PDF","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/users/payments/{id}/invoice/","href":"/api-reference/billing/download-an-invoice-pdf"},{"title":"Download a credit note PDF","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/users/payments/{id}/credit-notes/{refund_pk}/","href":"/api-reference/billing/download-a-credit-note-pdf"}]},{"group":"Records","pages":[{"title":"Records endpoints: consultation orders and documents","sidebarTitle":"Records","href":"/api-reference/tags/records"},{"title":"List patient orders","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/users/orders/","href":"/api-reference/records/list-patient-orders"},{"title":"List health documents","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/users/documents/","href":"/api-reference/records/list-health-documents"},{"title":"Create a health document","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/users/documents/","href":"/api-reference/records/create-a-health-document"},{"title":"Delete a health document","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json delete /v1/users/documents/{document_id}/","href":"/api-reference/records/delete-a-health-document"},{"title":"Download a health document","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/users/documents/{document_id}/content/","href":"/api-reference/records/download-a-health-document"}]},{"group":"Safety reports","pages":[{"title":"Safety report endpoints: suspected side effects","sidebarTitle":"Safety reports","href":"/api-reference/tags/safety-reports"},{"title":"List reported side effects","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/users/adverse-events/","href":"/api-reference/safety-reports/list-reported-side-effects"},{"title":"Report a suspected side effect","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/users/adverse-events/","href":"/api-reference/safety-reports/report-a-suspected-side-effect"}]},{"group":"Progress","pages":[{"title":"Progress endpoints: weight-loss journal","sidebarTitle":"Progress","href":"/api-reference/tags/progress"},{"title":"Get patient goal","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/users/journal/goal/","href":"/api-reference/progress/get-patient-goal"},{"title":"Replace the progress goal","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json put /v1/users/journal/goal/","href":"/api-reference/progress/replace-the-progress-goal"},{"title":"Get injection plan","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/users/journal/injection-plan/","href":"/api-reference/progress/get-injection-plan"},{"title":"Update the injection plan","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json put /v1/users/journal/injection-plan/","href":"/api-reference/progress/update-the-injection-plan"},{"title":"List weight entries","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/users/journal/weight-entries/","href":"/api-reference/progress/list-weight-entries"},{"title":"Create a daily weight entry","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/users/journal/weight-entries/","href":"/api-reference/progress/create-a-daily-weight-entry"},{"title":"Update a weight entry","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json patch /v1/users/journal/weight-entries/{id}/","href":"/api-reference/progress/update-a-weight-entry"},{"title":"Get a weight entry","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/users/journal/weight-entries/{id}/","href":"/api-reference/progress/get-a-weight-entry"},{"title":"Delete a weight entry","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json delete /v1/users/journal/weight-entries/{id}/","href":"/api-reference/progress/delete-a-weight-entry"},{"title":"Replace a weight entry","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json put /v1/users/journal/weight-entries/{id}/","href":"/api-reference/progress/replace-a-weight-entry"},{"title":"List patient injections","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/users/journal/injections/","href":"/api-reference/progress/list-patient-injections"},{"title":"Create an injection entry","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/users/journal/injections/","href":"/api-reference/progress/create-an-injection-entry"},{"title":"Update an injection","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json patch /v1/users/journal/injections/{id}/","href":"/api-reference/progress/update-an-injection"},{"title":"Get an injection","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/users/journal/injections/{id}/","href":"/api-reference/progress/get-an-injection"},{"title":"Delete an injection","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json delete /v1/users/journal/injections/{id}/","href":"/api-reference/progress/delete-an-injection"},{"title":"Replace an injection","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json put /v1/users/journal/injections/{id}/","href":"/api-reference/progress/replace-an-injection"},{"title":"List patient notes","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/users/journal/notes/","href":"/api-reference/progress/list-patient-notes"},{"title":"Create a progress note","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/users/journal/notes/","href":"/api-reference/progress/create-a-progress-note"},{"title":"Update a note","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json patch /v1/users/journal/notes/{id}/","href":"/api-reference/progress/update-a-note"},{"title":"Get a note","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/users/journal/notes/{id}/","href":"/api-reference/progress/get-a-note"},{"title":"Delete a note","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json delete /v1/users/journal/notes/{id}/","href":"/api-reference/progress/delete-a-note"},{"title":"Replace a note","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json put /v1/users/journal/notes/{id}/","href":"/api-reference/progress/replace-a-note"}]},{"group":"Referrals","pages":[{"title":"Referral endpoints: summary and referred patients","sidebarTitle":"Referrals","href":"/api-reference/tags/referrals"},{"title":"Get referral summary","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/users/referrals/me/","href":"/api-reference/referrals/get-referral-summary"},{"title":"List people you referred","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/users/referrals/me/referred/","href":"/api-reference/referrals/list-people-you-referred"},{"title":"List referral transactions","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/users/referrals/me/transactions/","href":"/api-reference/referrals/list-referral-transactions"},{"title":"Get monthly referral totals","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/users/referrals/me/monthly/","href":"/api-reference/referrals/get-monthly-referral-totals"},{"title":"Activate the referral account","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/users/referrals/activate/","href":"/api-reference/referrals/activate-the-referral-account"}]}]}]},{"tab":"Partners","pages":[{"title":"Partners","href":"/partners/overview"}]},{"tab":"Articles","pages":[{"title":"Articles","href":"/blog/connect-hi-doctor-mcp"}]},{"tab":"Health library","pages":[{"title":"Health library","href":"/library/overview"}]}]},"basePath":"","title":"Replace saved answers - Hi Doctor","buildId":"dpl_9VVk5y1P8k1ATeJguVngy9Q3cmbD","deploymentId":"dpl_9VVk5y1P8k1ATeJguVngy9Q3cmbD","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-DX1Meug0.js","utils-B_OMIQVC.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-ChxhRPMa.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-CuKvD8Iv.js","snippetPresets-C5d7p2hp.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-CfHcE8m4.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-C1zZV314.js","shallow-CmQhqCJn.js","getApiPlaygroundDisplay-YRo9s1O7.js","CodeSnippet-RN1MTdfk.js","CodeSnippets-DKLPHxJA.js","Page-BAvA99GL.js","getPastedJson-bz0M41mU.js","icon-CsmhpPrv.js","MethodPill-CNGsVE77.js","DuplicateIcon-DilfU_Z2.js","createIcon-BdsYzQck.js","DynamicMarkdown-CbqEDjbV.js","SectionHeading-O6hXpFCN.js","axios-vUo_bRtp.js","Markdown-nKm-uidQ.js","clsx-ClVdStUn.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-CIQkMg3R.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-ImrFS4Fy.js"]}