{
"error": "You do not have access to this resource."
}
{
"error": "You do not have access to this resource."
}
{
"error": "You do not have access to this resource."
}
{
"error": "You do not have access to this resource."
}
{
"error": "You do not have access to this resource."
}
Artifacts
Read artifact files
Returns the contents of one or more files in an artifact. Files that
don’t exist in the artifact are simply omitted from the response.
This endpoint uses POST (with a request body) rather than GET (with a
query string) so file names containing /, commas, or other special
characters don’t need URL encoding.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Magic Patterns","description":"Magic Patterns is an AI design tool for product teams. Create prototypes with your real design system, hand off to engineering, and speed up your software development lifecycle.","colors":{"primary":"#9784BF","light":"#FFFFFF","dark":"#001617"},"logo":{"light":"https://mintcdn.com/magicpatterns/owWJh7xQtXBlIJ16/logo/magicpatterns_logo_light.svg?fit=max\u0026auto=format\u0026n=owWJh7xQtXBlIJ16\u0026q=85\u0026s=2a7a773a8194091ebfe3e1c0104f2c92","dark":"https://mintcdn.com/magicpatterns/owWJh7xQtXBlIJ16/logo/magicpatterns_logo_dark.svg?fit=max\u0026auto=format\u0026n=owWJh7xQtXBlIJ16\u0026q=85\u0026s=20e5d64413256401004cd68c98e798d0"},"favicon":"https://mintcdn.com/magicpatterns/owWJh7xQtXBlIJ16/icon.svg?fit=max\u0026auto=format\u0026n=owWJh7xQtXBlIJ16\u0026q=85\u0026s=7854f15b01790c1d076cf1f1e10c61b0","api":{"openapi":["openapi-v3.yml","openapi.yml"]},"navbar":{"links":[{"href":"https://www.magicpatterns.com/customers","label":"Case Studies"}],"primary":{"type":"button","label":"Start designing","href":"https://www.magicpatterns.com"}},"footer":{"socials":{"twitter":"https://x.com/magicpatterns","github":"https://github.com/magicpatterns","linkedin":"https://www.linkedin.com/company/magicpatterns"}},"integrations":{"intercom":{"appId":"ftkg08cn"}},"contextual":{"options":["copy","view","chatgpt","claude","cursor"],"display":"header"},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"magicpatterns","hasAudioNarration":false,"actualSubdomain":"magicpatterns","customDomains":["www.magicpatterns.com"],"gitSource":{"type":"github","owner":"magicpatterns","repo":"patterns","deployBranch":"main","contentDirectory":"docs","isPrivate":false,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6aecbba141290b71c3828cbd","collectionId":"2e385020-b02a-471f-85a4-79efe7f6e8f4","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6aecbba141290b71c3828cbd"},"feedback":{"thumbs":true,"edits":false,"issues":false},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6aece1b3a84f97fba518a7c7","clientVersion":"0.0.4076","searchFilterCounts":[{"language":"default","tag":"Publish and Integrate","count":37},{"language":"default","tag":"Designs","count":18},{"language":"default","tag":"Introduction","count":15},{"language":"default","tag":"API","count":14},{"language":"default","tag":"Design Systems","count":14},{"language":"default","tag":"Integrations","count":11},{"language":"default","tag":"Teams and Enterprise","count":9},{"language":"default","tag":"Workflows and Video Guide","count":8},{"language":"default","tag":"Prompting and iterating","count":6},{"language":"default","tag":"Importing your Design System","count":6}]},"assistantConfig":{"deflection":{"enabled":true,"email":"support@magicpatterns.com","showHelpButton":true}},"basePath":"/docs","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":"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},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"comment-mode","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":".nav-tabs-item[href^=\"/documentation/magic-os/\"]::after{content:\"NEW\";margin-left:0.375rem;padding:0.0625rem 0.375rem;border-radius:9999px;font-size:0.625rem;font-weight:600;line-height:1rem;color:rgb(var(--primary));background-color:rgb(var(--primary) / 0.1)}"}],"page":{"pagePath":"api/read-artifact-files","slug":"/api/read-artifact-files","pageMetadata":{"openapi":"openapi-v3.yml post /v3/designs/{editorId}/artifacts/{artifactId}/files/read","title":"Read artifact files","description":"Returns the contents of one or more files in an artifact. Files that\ndon't exist in the artifact are simply omitted from the response.\n\nThis endpoint uses POST (with a request body) rather than GET (with a\nquery string) so file names containing `/`, commas, or other special\ncharacters don't need URL encoding.\n","href":"/api/read-artifact-files"},"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 p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_Fragment, {\n children: [_jsx(_components.p, {\n children: \"Returns the contents of one or more files in an artifact. Files that\\ndon’t exist in the artifact are simply omitted from the response.\"\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"This endpoint uses POST (with a request body) rather than GET (with a\\nquery string) so file names containing \", _jsx(_components.code, {\n children: \"/\"\n }), \", commas, or other special\\ncharacters don’t need URL encoding.\"]\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":{"openapi":"openapi-v3.yml post /v3/designs/{editorId}/artifacts/{artifactId}/files/read","title":"Read artifact files","description":"Returns the contents of one or more files in an artifact. Files that\ndon't exist in the artifact are simply omitted from the response.\n\nThis endpoint uses POST (with a request body) rather than GET (with a\nquery string) so file names containing `/`, commas, or other special\ncharacters don't need URL encoding.\n","href":"/api/read-artifact-files"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"summary":"Read artifact files","description":"Returns the contents of one or more files in an artifact. Files that\ndon't exist in the artifact are simply omitted from the response.\n\nThis endpoint uses POST (with a request body) rather than GET (with a\nquery string) so file names containing `/`, commas, or other special\ncharacters don't need URL encoding.\n","operationId":"readArtifactFilesV3","tags":["Artifacts"],"parameters":["8cf426f4-be98-4bd6-8ed9-8003edebbfe4","eb3daa3e-0885-4337-9a0f-f2bb69f9721d"],"requestBody":"5fd12198-e50c-416a-9841-d361035b9d72","responses":{"200":"5e384a8d-96fe-437d-bee4-284b5e3d6db1","400":"8277518d-4244-41e7-8740-8af04ecfa191","401":"ae6e3664-dce6-4d70-bab7-102a56448826","403":"3268a4de-e291-4c85-bf7c-0973ec5d508e","404":"a75ac394-ba84-4d15-8985-67db03ac2032","500":"997d0841-54b9-4aa7-8c95-4fbe6c93bf23"},"method":"post","type":"path","servers":["16a655ae-93ce-4eda-95a5-8198d7b1febb"],"security":["9cc8e0f0-34b7-4808-bee7-0bea238e1ec7"],"path":"/v3/designs/{editorId}/artifacts/{artifactId}/files/read","baseUrlOptions":["https://api.magicpatterns.com/api"],"title":"Read artifact files","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{"8cf426f4-be98-4bd6-8ed9-8003edebbfe4":{"name":"editorId","in":"path","required":true,"description":"The design's editor ID.","schema":{"type":"string","example":"abc123","isRequired":true,"description":"The design's editor ID.","uniqueKey":"","typeLabel":"string"}},"eb3daa3e-0885-4337-9a0f-f2bb69f9721d":{"name":"artifactId","in":"path","required":true,"description":"The artifact ID.","schema":{"type":"string","isRequired":true,"description":"The artifact ID.","uniqueKey":"","typeLabel":"string"}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["fileNames"],"properties":{"fileNames":{"type":"array","description":"The file names to read.","items":{"type":"string","uniqueKey":"fileNames.items.[INDEX]","typeLabel":"string"},"example":["App.tsx","index.css"],"isRequired":true,"uniqueKey":"fileNames","typeLabel":"string[]"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"fileNames":["App.tsx","index.css"]}}},"exampleType":"generated"}},"exampleType":"generated"},"responses":{"5e384a8d-96fe-437d-bee4-284b5e3d6db1":{"description":"Requested files.","content":{"application/json":{"schema":{"type":"object","properties":{"files":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","example":"App.tsx","uniqueKey":"files.items.[INDEX].name","typeLabel":"string"},"content":{"type":"string","uniqueKey":"files.items.[INDEX].content","typeLabel":"string"}},"uniqueKey":"files.items.[INDEX]","typeLabel":"object"},"uniqueKey":"files","typeLabel":"object[]"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"files":[{"name":"App.tsx","content":"\u003cstring>"}]}}},"exampleType":"generated"}},"exampleType":"generated"},"8277518d-4244-41e7-8740-8af04ecfa191":{"description":"Invalid or missing required input.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message.","example":"You do not have access to this resource.","uniqueKey":"error","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":"You do not have access to this resource."}}},"exampleType":"generated"}},"exampleType":"generated"},"ae6e3664-dce6-4d70-bab7-102a56448826":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message.","example":"You do not have access to this resource.","uniqueKey":"error","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":"You do not have access to this resource."}}},"exampleType":"generated"}},"exampleType":"generated"},"3268a4de-e291-4c85-bf7c-0973ec5d508e":{"description":"The caller does not have access to this resource.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message.","example":"You do not have access to this resource.","uniqueKey":"error","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":"You do not have access to this resource."}}},"exampleType":"generated"}},"exampleType":"generated"},"a75ac394-ba84-4d15-8985-67db03ac2032":{"description":"The requested design or artifact does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message.","example":"You do not have access to this resource.","uniqueKey":"error","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":"You do not have access to this resource."}}},"exampleType":"generated"}},"exampleType":"generated"},"997d0841-54b9-4aa7-8c95-4fbe6c93bf23":{"description":"Unexpected server error.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Human-readable error message.","example":"You do not have access to this resource.","uniqueKey":"error","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":"You do not have access to this resource."}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"9cc8e0f0-34b7-4808-bee7-0bea238e1ec7":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-mp-api-key","description":"Magic Patterns API key. The same key authenticates v3 REST and the\nMCP server. Create one at https://www.magicpatterns.com/settings/api-keys.\n","scopes":[],"schemeName":"ApiKeyAuth"}}},"servers":{"16a655ae-93ce-4eda-95a5-8198d7b1febb":{"url":"https://api.magicpatterns.com/api"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"apiKey","in":"header","name":"x-mp-api-key","description":"Magic Patterns API key. The same key authenticates v3 REST and the\nMCP server. Create one at https://www.magicpatterns.com/settings/api-keys.\n","scopes":[],"schemeName":"ApiKeyAuth"},"schema":{"title":"x-mp-api-key","type":"string","description":"Magic Patterns API key. The same key authenticates v3 REST and the\nMCP server. Create one at https://www.magicpatterns.com/settings/api-keys.\n","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"ApiKeyAuth","name":"x-mp-api-key"}],"title":"ApiKeyAuth"}]},"originalFileLocation":"openapi-v3.yml"},"subdomain":"magicpatterns","siteName":"Magic Patterns","title":"Read artifact files - Magic Patterns","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-05-23T00:50:34.846Z","originalFileLocation":"api/read-artifact-files.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=\"Returns the contents of one or more files in an artifact. Files that don\u0026#x27;t exist in the artifact are simply omitted from the response. This endpoint uses POST (with a request body) rather than GET (with a query string) so file names containing /, commas, or other special characters don\u0026#x27;t need URL encoding.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Magic Patterns\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/magicpatterns/7ZqRXq6s1-Htf8k5/_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=\"/docs/mintlify-assets/_mintlify/favicons/magicpatterns/7ZqRXq6s1-Htf8k5/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/magicpatterns/7ZqRXq6s1-Htf8k5/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/magicpatterns/7ZqRXq6s1-Htf8k5/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/magicpatterns/7ZqRXq6s1-Htf8k5/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/magicpatterns/7ZqRXq6s1-Htf8k5/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/magicpatterns/7ZqRXq6s1-Htf8k5/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/magicpatterns/7ZqRXq6s1-Htf8k5/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/magicpatterns/7ZqRXq6s1-Htf8k5/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Read artifact files - Magic Patterns\">\u003cmeta data-mint-head property=\"og:description\" content=\"Returns the contents of one or more files in an artifact. Files that don\u0026#x27;t exist in the artifact are simply omitted from the response. This endpoint uses POST (with a request body) rather than GET (with a query string) so file names containing /, commas, or other special characters don\u0026#x27;t need URL encoding.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Magic Patterns\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://www.magicpatterns.com/docs/api/read-artifact-files\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://magicpatterns.mintlify.site/docs/_mintlify/api/og/v2?division=Artifacts\u0026amp;title=Read+artifact+files\u0026amp;description=Returns+the+contents+of+one+or+more+files+in+an+artifact.+Files+that%0Adon%27t+exist+in+the+artifact+are+simply+omitted+from+the+response.%0A%0AThis+endpoint+uses+POST+\u0026amp;theme=58b3985732190453b80d7ef2\u0026amp;signature=65d61ff26ab05f347fc64f2190fc4cd0a8e3434d5485b23f035a1a680efc1222\">\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=\"Read artifact files - Magic Patterns\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Returns the contents of one or more files in an artifact. Files that don\u0026#x27;t exist in the artifact are simply omitted from the response. This endpoint uses POST (with a request body) rather than GET (with a query string) so file names containing /, commas, or other special characters don\u0026#x27;t need URL encoding.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://magicpatterns.mintlify.site/docs/_mintlify/api/og/v2?division=Artifacts\u0026amp;title=Read+artifact+files\u0026amp;description=Returns+the+contents+of+one+or+more+files+in+an+artifact.+Files+that%0Adon%27t+exist+in+the+artifact+are+simply+omitted+from+the+response.%0A%0AThis+endpoint+uses+POST+\u0026amp;theme=58b3985732190453b80d7ef2\u0026amp;signature=65d61ff26ab05f347fc64f2190fc4cd0a8e3434d5485b23f035a1a680efc1222\">\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=\"/docs/mintlify-assets/_mintlify/favicons/magicpatterns/7ZqRXq6s1-Htf8k5/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Magic Patterns\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#9784BF\">\u003clink data-mint-head rel=\"canonical\" href=\"https://www.magicpatterns.com/docs/api/read-artifact-files\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/docs/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/api/read-artifact-files.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://www.magicpatterns.com/#organization\",\"name\":\"Magic Patterns\",\"url\":\"https://www.magicpatterns.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/magicpatterns/owWJh7xQtXBlIJ16/logo/magicpatterns_logo_light.svg?fit=max\u0026auto=format\u0026n=owWJh7xQtXBlIJ16\u0026q=85\u0026s=2a7a773a8194091ebfe3e1c0104f2c92\"}},{\"@type\":\"WebSite\",\"@id\":\"https://www.magicpatterns.com/docs#website\",\"name\":\"Magic Patterns\",\"url\":\"https://www.magicpatterns.com/docs\",\"publisher\":{\"@id\":\"https://www.magicpatterns.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://www.magicpatterns.com/docs/api/read-artifact-files#webpage\",\"url\":\"https://www.magicpatterns.com/docs/api/read-artifact-files\",\"name\":\"Read artifact files\",\"description\":\"Returns the contents of one or more files in an artifact. Files that don't exist in the artifact are simply omitted from the response. This endpoint uses POST (with a request body) rather than GET (with a query string) so file names containing /, commas, or other special characters don't need URL encoding.\",\"dateModified\":\"2026-05-23T00:50:34.846Z\",\"isPartOf\":{\"@id\":\"https://www.magicpatterns.com/docs#website\"},\"breadcrumb\":{\"@id\":\"https://www.magicpatterns.com/docs/api/read-artifact-files#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://www.magicpatterns.com/docs/api/read-artifact-files#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"API\",\"item\":\"https://www.magicpatterns.com/docs/api/getting-started\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Artifacts\",\"item\":\"https://www.magicpatterns.com/docs/api/get-active-artifact\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Read artifact files\",\"item\":\"https://www.magicpatterns.com/docs/api/read-artifact-files\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://www.magicpatterns.com/docs/api/read-artifact-files#apireference\",\"headline\":\"Read artifact files\",\"name\":\"Read artifact files\",\"description\":\"Returns the contents of one or more files in an artifact. Files that don't exist in the artifact are simply omitted from the response. This endpoint uses POST (with a request body) rather than GET (with a query string) so file names containing /, commas, or other special characters don't need URL encoding.\",\"url\":\"https://www.magicpatterns.com/docs/api/read-artifact-files\",\"mainEntityOfPage\":{\"@id\":\"https://www.magicpatterns.com/docs/api/read-artifact-files#webpage\"},\"dateModified\":\"2026-05-23T00:50:34.846Z\",\"publisher\":{\"@id\":\"https://www.magicpatterns.com/#organization\"},\"isPartOf\":{\"@id\":\"https://www.magicpatterns.com/docs#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Magic Patterns\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Magic Patterns","nav":{"global":null,"tabs":[{"tab":"Introduction","pages":[{"title":"Introduction","href":"/documentation/get-started/introduction"}]},{"tab":"Designs","pages":[{"title":"Designs","href":"/documentation/editor/what-is-a-design"}]},{"tab":"MagicOS","pages":[{"title":"MagicOS","href":"/documentation/magic-os/overview"}]},{"tab":"Design Systems","pages":[{"title":"Design Systems","href":"/documentation/design-systems/overview"}]},{"tab":"Publish and Integrate","groups":[{"group":"Publishing","pages":[{"title":"Custom Publish URL","icon":"link","href":"/documentation/publishing/publish-url"},{"title":"Host on a Custom Domain","icon":"cloud","href":"/documentation/get-started/custom-domain"},{"title":"Website Metadata","icon":"hashtag","href":"/documentation/publishing/metadata"},{"title":"Password Protection","icon":"lock","href":"/documentation/publishing/password-protection"}]},{"group":"Export","pages":[{"title":"Overview of exporting","icon":"share","href":"/documentation/exporting/overview"},{"title":"Copy Code as Prompt","icon":"file-lines","href":"/documentation/get-started/copy-code-as-prompt"},{"title":"Sync with Github","icon":"github","href":"/documentation/get-started/sync-to-github"},{"title":"Bring your designs into code","icon":"code","href":"/documentation/get-started/download-code"},{"title":"Export to Figma","icon":"figma","href":"/documentation/get-started/figma-plugin"},{"title":"Integration Skill for AI Agents","icon":"wand-magic-sparkles","href":"/documentation/exporting/integration-skill"}]},{"group":"MCP server","pages":[{"title":"Overview of MCP","icon":"server","href":"/documentation/features/mcp-server/overview"},{"title":"MCP Tools \u0026 Workflows","icon":"toolbox","href":"/documentation/features/mcp-server/available_tools"}]},{"group":"Integrations","pages":[{"title":"Overview","icon":"puzzle-piece","href":"/documentation/integrations/overview"},{"title":"OpenAI","icon":"openai","href":"/documentation/integrations/openai"},{"title":"Anthropic","icon":"microchip-ai","href":"/documentation/integrations/anthropic"},{"title":"Google Sheets","icon":"google","href":"/documentation/integrations/google-sheets"},{"title":"EmailJS","icon":"envelope","href":"/documentation/integrations/emailjs"},{"title":"Collecting Feedback","icon":"comment","href":"/documentation/integrations/collecting-feedback"},{"title":"Google Analytics","icon":"chart-mixed","href":"/documentation/integrations/google-analytics"},{"title":"PostHog","icon":"chart-area","href":"/documentation/integrations/posthog"},{"title":"Meta Pixel","icon":"meta","href":"/documentation/integrations/meta-pixel"},{"title":"Shopify","icon":"shop","href":"/documentation/integrations/shopify"},{"title":"LinkedIn","icon":"linkedin","href":"/documentation/integrations/linkedin"}]},{"group":"API","pages":[{"title":"Getting Started","icon":"terminal","href":"/api/getting-started"},{"openapi":"openapi-v3.yml get /v3/health","title":"Health check","href":"/api/health"},{"openapi":"openapi-v3.yml get /v3/design-systems","title":"List design systems","href":"/api/list-design-systems"},{"group":"Designs","pages":[{"openapi":"openapi-v3.yml post /v3/designs","title":"Create a design","href":"/api/create-design"},{"openapi":"openapi-v3.yml post /v3/designs/resolve-url","title":"Resolve a Magic Patterns URL to an editor ID","href":"/api/resolve-design-url"},{"openapi":"openapi-v3.yml get /v3/designs/{editorId}/status","title":"Get design status","href":"/api/get-design-status"},{"openapi":"openapi-v3.yml post /v3/designs/{editorId}/prompts","title":"Send a prompt","href":"/api/send-prompt"},{"openapi":"openapi-v3.yml get /v3/designs/{editorId}/messages","title":"Read recent message history","href":"/api/get-design-messages"},{"openapi":"openapi-v3.yml get /v3/designs/{editorId}/versions","title":"List version history","href":"/api/get-design-versions"}]},{"group":"Artifacts","pages":[{"openapi":"openapi-v3.yml get /v3/designs/{editorId}/active-artifact","title":"Get the active artifact","href":"/api/get-active-artifact"},{"openapi":"openapi-v3.yml post /v3/designs/{editorId}/artifacts","title":"Create a new artifact","description":"Creates a new artifact by cloning an existing one (typically the\ncurrently active artifact). The new artifact becomes the active\nartifact for the design and a new version entry is added to the\ntimeline.\n\nUse this to create a safe working branch before writing files —\nusers can revert to the previous artifact if needed.\n","href":"/api/create-artifact"},{"openapi":"openapi-v3.yml post /v3/designs/{editorId}/artifacts/{artifactId}/files/read","title":"Read artifact files","href":"/api/read-artifact-files"},{"openapi":"openapi-v3.yml patch /v3/designs/{editorId}/artifacts/{artifactId}/files","title":"Write artifact files","description":"Creates or overwrites one or more files in an artifact. Files that\nalready exist are replaced; new files are appended. Files not\nmentioned in the request are left untouched.\n\nThis only updates source files — it does **not** compile or publish.\nCall `POST /v3/designs/{editorId}/artifacts/{artifactId}/publish` when\nyou're done with all file changes to compile and set the artifact\nactive.\n","href":"/api/write-artifact-files"},{"openapi":"openapi-v3.yml post /v3/designs/{editorId}/artifacts/{artifactId}/publish","title":"Publish an artifact","href":"/api/publish-artifact"}]}]}]},{"tab":"Teams and Enterprise","pages":[{"title":"Teams and Enterprise","href":"/documentation/collaboration/team-workspaces"}]},{"tab":"Changelog","pages":[{"title":"Changelog","href":"/documentation/feature-releases/changelog"}]}]},"basePath":"","title":"Read artifact files - Magic Patterns","buildId":"dpl_ATnXPMW25DMPUr9VBw6kL6MfBt6T","deploymentId":"dpl_ATnXPMW25DMPUr9VBw6kL6MfBt6T","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-CNqlzjVB.js","utils-BqFiXZ79.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-CnR4QBe6.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-BY2ZM1OO.js","snippetPresets-x-8ACO8V.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-Ch-SJE05.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-CqqG_0NE.js","shallow-BXrZ2b0C.js","getApiPlaygroundDisplay-n7J_wkjq.js","CodeSnippet-CQsp4vyQ.js","CodeSnippets-BfuHqvZx.js","Page-CTxrMSpo.js","getPastedJson-BjrGIK1i.js","icon-7iLZnVOC.js","MethodPill-TBS1m84e.js","DuplicateIcon-BNMrV4Vs.js","createIcon-C5kCqeU2.js","DynamicMarkdown-Bq09mRwR.js","SectionHeading-G4Bflf5Q.js","axios-vUo_bRtp.js","Markdown-BTUds0aX.js","clsx-6wHzaN2_.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-BPypQKlo.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-o6bee4ro.js"]}