PUT /api/v1/publish/:slug — Publish a new version of an existing site
Update an Existing Site
Publish a new version of an existing site. Uses hash deduplication — files with matching hashes are copied server-side and don’t need to be re-uploaded.
PUT /api/v1/publish/:slug
Path Parameters
string
required
The site slug to update (e.g., bright-canvas-a7k2).
Headers
Header
Required
Description
Content-Type
Yes
application/json
Authorization
Yes
Bearer sh_live_...
Request Body
Same as Create a Site. The files array contains the complete file manifest for the new version.
array
required
Complete file manifest for the new version. Include all files, not just changed ones.
Include the hash field (SHA-256) for each file in the manifest
The API compares each hash against the previous version’s files
Files with matching hashes appear in the skipped array — they are copied server-side
Only files in the uploads array need to be uploaded
Always include hashes when updating. Without hashes, every file is treated as new and must be re-uploaded.
After uploading the non-skipped files, call Finalize with the new versionId.
{"docsConfig":{"$schema":"https://mintlify.com/docs.json","theme":"mint","name":"SimpleHost","colors":{"primary":"#000000","light":"#555555","dark":"#ffffff"},"favicon":"https://mintcdn.com/supalink/n_zlYik35m1_VnrJ/favicon.svg?fit=max\u0026auto=format\u0026n=n_zlYik35m1_VnrJ\u0026q=85\u0026s=83166340d1d5fc54a9813f67b21bcdd4","logo":{"light":"https://mintcdn.com/supalink/vYScRszPkvKjJZMV/images/logo-light.svg?fit=max\u0026auto=format\u0026n=vYScRszPkvKjJZMV\u0026q=85\u0026s=3d93beab199dbf77c3650cb53946d05c","dark":"https://mintcdn.com/supalink/vYScRszPkvKjJZMV/images/logo-dark.svg?fit=max\u0026auto=format\u0026n=vYScRszPkvKjJZMV\u0026q=85\u0026s=3933cf2e5ffd240994da2881862fcd10"},"api":{"mdx":{"server":"https://simplehost.dev"}},"background":{"decoration":null,"color":{"light":"#ffffff","dark":"#0a0a0a"}},"navbar":{"links":[{"label":"Dashboard","href":"https://simplehost.dev/dashboard"}],"primary":{"type":"button","label":"Install Skill","href":"https://docs.simplehost.dev/quickstart"}},"footer":{"socials":{"github":"https://github.com/sk-code-01"}},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"supalink","hasAudioNarration":false,"actualSubdomain":"supalink","customDomains":["docs.simplehost.dev"],"gitSource":{"type":"github","owner":"sk-code-01","repo":"simplehost-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"entitlements":{},"buildId":"6ae94a852422c68a7def9e88:success","clientVersion":"0.0.4304","searchFilterCounts":[{"language":"default","tag":"API Reference","count":40},{"language":"default","tag":"Guides","count":10},{"language":"default","tag":"Agent Skill","count":6},{"language":"default","tag":"Documentation","count":4},{"language":"default","tag":"Getting Started","count":4}]},"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":"custom-rbac-roles","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":"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":"site-roles","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":"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":"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":"turbopuffer-dual-write","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":"editor-metadata","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},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"control","enabled":true,"payload":{"type":"string","value":"control"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[]}
{"page":{"pagePath":"api-reference/update","slug":"/api-reference/update","pageMetadata":{"title":"Update a Site","description":"PUT /api/v1/publish/:slug — Publish a new version of an existing site","href":"/api-reference/update"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"PUT /api/v1/publish/:slug — Publish a new version of an existing site\"\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,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{CodeBlock,Heading,ParamField,Table,Tip}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Tip)_missingMdxReference(`Tip`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`2`,id:`update-an-existing-site`,children:`Update an Existing Site`}),`\n`,_jsx(_components.p,{children:`Publish a new version of an existing site. Uses hash deduplication — files with matching hashes are copied server-side and don’t need to be re-uploaded.`}),`\n`,_jsx(CodeBlock,{numberOfLines:`2`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`PUT /api/v1/publish/:slug`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(Heading,{level:`3`,id:`path-parameters`,children:`Path Parameters`}),`\n`,_jsx(ParamField,{path:`slug`,type:`string`,required:true,id:`param-slug`,children:_jsxs(_components.p,{children:[`The site slug to update (e.g., `,_jsx(_components.code,{children:`bright-canvas-a7k2`}),`).`]})}),`\n`,_jsx(Heading,{level:`3`,id:`headers`,children:`Headers`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Header`}),_jsx(_components.th,{children:`Required`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`Content-Type`})}),_jsx(_components.td,{children:`Yes`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`application/json`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`Authorization`})}),_jsx(_components.td,{children:`Yes`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`Bearer sh_live_...`})})]})]})]}),`\n`,_jsx(Heading,{level:`3`,id:`request-body`,children:`Request Body`}),`\n`,_jsxs(_components.p,{children:[`Same as `,_jsx(_components.a,{href:`/api-reference/publish`,children:`Create a Site`}),`. The `,_jsx(_components.code,{children:`files`}),` array contains the complete file manifest for the new version.`]}),`\n`,_jsx(ParamField,{body:`files`,type:`array`,required:true,id:`param-files`,children:_jsxs(_components.p,{children:[`Complete file manifest for the new version. Include `,_jsx(_components.strong,{children:`all`}),` files, not just changed ones.`]})}),`\n`,_jsx(Heading,{level:`3`,id:`example`,children:`Example`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`19`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`19`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` PUT`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://simplehost.dev/api/v1/publish/bright-canvas-a7k2`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer sh_live_your_key_here\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"files\": [`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"path\": \"index.html\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"size\": 2048,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"contentType\": \"text/html\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"hash\": \"newsha256hash64charslong...\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` {`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"path\": \"style.css\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"size\": 512,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"contentType\": \"text/css\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"hash\": \"f6e5d4c3b2a1f6e5d4c3b2a1f6e5d4c3b2a1f6e5d4c3b2a1f6e5d4c3b2a1f6e5\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`response-200`,children:`Response (200)`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`23`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`23`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"slug\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"bright-canvas-a7k2\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"siteUrl\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://bright-canvas-a7k2.simplehost.dev/\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"upload\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"versionId\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"01jm4new789ghi012\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"uploads\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"path\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"index.html\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"method\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"PUT\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"url\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://simplehost.dev/api/v1/_upload/...\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"headers\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"Content-Type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"text/html\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"skipped\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"path\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"style.css\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"reason\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"hash_match\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"finalizeUrl\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://simplehost.dev/api/v1/publish/bright-canvas-a7k2/finalize\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"expiresInSeconds\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`3600`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`how-deduplication-works`,children:`How Deduplication Works`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`Include the `,_jsx(_components.code,{children:`hash`}),` field (SHA-256) for each file in the manifest`]}),`\n`,_jsx(_components.li,{children:`The API compares each hash against the previous version’s files`}),`\n`,_jsxs(_components.li,{children:[`Files with matching hashes appear in the `,_jsx(_components.code,{children:`skipped`}),` array — they are copied server-side`]}),`\n`,_jsxs(_components.li,{children:[`Only files in the `,_jsx(_components.code,{children:`uploads`}),` array need to be uploaded`]}),`\n`]}),`\n`,_jsx(Tip,{children:_jsx(_components.p,{children:`Always include hashes when updating. Without hashes, every file is treated as new and must be re-uploaded.`})}),`\n`,_jsxs(_components.p,{children:[`After uploading the non-skipped files, call `,_jsx(_components.a,{href:`/api-reference/finalize`,children:`Finalize`}),` with the new `,_jsx(_components.code,{children:`versionId`}),`.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Update a Site","description":"PUT /api/v1/publish/:slug — Publish a new version of an existing site","href":"/api-reference/update"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Update an Existing Site","slug":"update-an-existing-site","depth":2,"children":[{"title":"Path Parameters","slug":"path-parameters","depth":3,"children":[]},{"title":"Headers","slug":"headers","depth":3,"children":[]},{"title":"Request Body","slug":"request-body","depth":3,"children":[]},{"title":"Example","slug":"example","depth":3,"children":[]},{"title":"Response (200)","slug":"response-200","depth":3,"children":[]},{"title":"How Deduplication Works","slug":"how-deduplication-works","depth":3,"children":[]}]}],"codeExamples":{}},"jsLinks":[],"subdomain":"supalink","siteName":"SimpleHost","title":"Update a Site - SimpleHost","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-03-21T12:32:17.188Z","originalFileLocation":"api-reference/update.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=\"PUT /api/v1/publish/:slug — Publish a new version of an existing site\">\u003cmeta data-mint-head name=\"application-name\" content=\"SimpleHost\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/supalink/mIEomuMWg-2xLzpm/_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/supalink/mIEomuMWg-2xLzpm/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/supalink/mIEomuMWg-2xLzpm/_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/supalink/mIEomuMWg-2xLzpm/_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/supalink/mIEomuMWg-2xLzpm/_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/supalink/mIEomuMWg-2xLzpm/_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/supalink/mIEomuMWg-2xLzpm/_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/supalink/mIEomuMWg-2xLzpm/_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/supalink/mIEomuMWg-2xLzpm/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Update a Site - SimpleHost\">\u003cmeta data-mint-head property=\"og:description\" content=\"PUT /api/v1/publish/:slug — Publish a new version of an existing site\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"SimpleHost\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.simplehost.dev/api-reference/update\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://supalink.mintlify.site/_mintlify/api/og/v2?division=API+Reference\u0026amp;title=Update+a+Site\u0026amp;description=PUT+%2Fapi%2Fv1%2Fpublish%2F%3Aslug+%E2%80%94+Publish+a+new+version+of+an+existing+site\u0026amp;theme=5658f7a08c29f63336649f6a\u0026amp;signature=a400b7565b00b7ecb3197c4cd251d77bd3fe5248d75a6e9259b63347e5268120\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Update a Site - SimpleHost\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"PUT /api/v1/publish/:slug — Publish a new version of an existing site\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://supalink.mintlify.site/_mintlify/api/og/v2?division=API+Reference\u0026amp;title=Update+a+Site\u0026amp;description=PUT+%2Fapi%2Fv1%2Fpublish%2F%3Aslug+%E2%80%94+Publish+a+new+version+of+an+existing+site\u0026amp;theme=5658f7a08c29f63336649f6a\u0026amp;signature=a400b7565b00b7ecb3197c4cd251d77bd3fe5248d75a6e9259b63347e5268120\">\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/supalink/mIEomuMWg-2xLzpm/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"SimpleHost\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#000000\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.simplehost.dev/api-reference/update\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/update.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.simplehost.dev/#organization\",\"name\":\"SimpleHost\",\"url\":\"https://docs.simplehost.dev\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/supalink/vYScRszPkvKjJZMV/images/logo-light.svg?fit=max\u0026auto=format\u0026n=vYScRszPkvKjJZMV\u0026q=85\u0026s=3d93beab199dbf77c3650cb53946d05c\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.simplehost.dev#website\",\"name\":\"SimpleHost\",\"url\":\"https://docs.simplehost.dev\",\"publisher\":{\"@id\":\"https://docs.simplehost.dev/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.simplehost.dev/api-reference/update#webpage\",\"url\":\"https://docs.simplehost.dev/api-reference/update\",\"name\":\"Update a Site\",\"description\":\"PUT /api/v1/publish/:slug — Publish a new version of an existing site\",\"dateModified\":\"2026-03-21T12:32:17.188Z\",\"isPartOf\":{\"@id\":\"https://docs.simplehost.dev#website\"},\"breadcrumb\":{\"@id\":\"https://docs.simplehost.dev/api-reference/update#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.simplehost.dev/api-reference/update#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"API Reference\",\"item\":\"https://docs.simplehost.dev/api-reference/overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Update a Site\",\"item\":\"https://docs.simplehost.dev/api-reference/update\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.simplehost.dev/api-reference/update#article\",\"headline\":\"Update a Site\",\"name\":\"Update a Site\",\"description\":\"PUT /api/v1/publish/:slug — Publish a new version of an existing site\",\"url\":\"https://docs.simplehost.dev/api-reference/update\",\"mainEntityOfPage\":{\"@id\":\"https://docs.simplehost.dev/api-reference/update#webpage\"},\"dateModified\":\"2026-03-21T12:32:17.188Z\",\"publisher\":{\"@id\":\"https://docs.simplehost.dev/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.simplehost.dev#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"SimpleHost\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"SimpleHost\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/update.md","siteName":"SimpleHost","nav":{"global":null,"tabs":[{"tab":"Documentation","pages":[{"title":"Documentation","href":"/introduction"}]},{"tab":"Agent Skill","pages":[{"title":"Agent Skill","href":"/skill/overview"}]},{"tab":"API Reference","groups":[{"group":"API Reference","pages":[{"title":"API Overview","href":"/api-reference/overview"},{"title":"Authentication","href":"/api-reference/authentication"},{"title":"Account","href":"/api-reference/account"},{"title":"Create a Site","href":"/api-reference/publish"},{"title":"Upload Files","href":"/api-reference/upload"},{"title":"Finalize","description":"POST /api/v1/publish/:slug/finalize — Make a site live","href":"/api-reference/finalize"},{"title":"Update a Site","href":"/api-reference/update"},{"title":"List Sites","description":"GET /api/v1/publishes — List all your sites","href":"/api-reference/list-sites"},{"title":"Get Site Details","href":"/api-reference/get-site"},{"title":"Delete a Site","href":"/api-reference/delete-site"},{"title":"Duplicate a Site","href":"/api-reference/duplicate-site"},{"title":"Update Metadata","href":"/api-reference/update-metadata"},{"title":"Site Variables","href":"/api-reference/site-variables"},{"title":"Proxy Host Allowlist","href":"/api-reference/proxy-hosts"},{"title":"Site Proxy","href":"/api-reference/site-proxy"},{"title":"Claim a Site","href":"/api-reference/claim-site"},{"title":"Handle","href":"/api-reference/handle"},{"title":"Billing","href":"/api-reference/billing"},{"title":"Errors","href":"/api-reference/errors"},{"title":"Rate Limits","href":"/api-reference/rate-limits"}]}]},{"tab":"Guides","pages":[{"title":"Guides","href":"/guides/publish-with-script"}]}]},"basePath":"","title":"Update a Site - SimpleHost","deploymentId":"dpl_57NA6NKtrcUBhuxv6Tm2hAi21TK4","buildId":"dpl_57NA6NKtrcUBhuxv6Tm2hAi21TK4","dynamics":[],"chunks":[]}