curl --request POST \
--url https://studio.weaverse.io/api/v1/content/projects/{projectId}/import \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form file=@example-file \
--form 'options=<string>' \
--form 'confirm=<string>'const form = new FormData();
form.append('file', '<string>');
form.append('options', '<string>');
form.append('confirm', '<string>');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://studio.weaverse.io/api/v1/content/projects/{projectId}/import', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://studio.weaverse.io/api/v1/content/projects/{projectId}/import"
files = { "file": ("example-file", open("example-file", "rb")) }
payload = {
"options": "<string>",
"confirm": "<string>"
}
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text){
"object": "project_import",
"projectId": "clz8k2m4n0001qwer7tyu8iop",
"results": {
"theme": {
"success": true,
"message": "Theme settings imported successfully"
},
"pages": {
"success": true,
"imported": 4,
"skipped": 1,
"total": 5,
"errors": [],
"skippedInfo": [
"Replaced 1 templates: \"Homepage\""
]
},
"cleanup": null
}
}{
"object": "error",
"code": "INVALID_PARAMS",
"message": "\"confirm\" must be \"clz8k2m4n0001qwer7tyu8iop\" for this destructive operation",
"status": 400
}{
"object": "error",
"code": "UNAUTHORIZED",
"message": "<string>",
"status": 123,
"details": "<unknown>"
}{
"object": "error",
"code": "UNAUTHORIZED",
"message": "<string>",
"status": 123,
"details": "<unknown>"
}{
"object": "error",
"code": "UNAUTHORIZED",
"message": "<string>",
"status": 123,
"details": "<unknown>"
}{
"object": "error",
"code": "UNAUTHORIZED",
"message": "<string>",
"status": 123,
"details": "<unknown>"
}{
"object": "error",
"code": "UNAUTHORIZED",
"message": "<string>",
"status": 123,
"details": "<unknown>"
}Import an export file into this project
Destructive. Overwrites live content of this project in place, through the same import core the dashboard uses (format-version check, preflight of every page before the first write, theme then pages, cache reset). Writes go live immediately, bypassing drafts, and override mode replaces existing pages. Back up first with POST /projects/{projectId}/backups.
Send multipart/form-data with:
file: an export JSON fromGET /projects/{projectId}/export(max 50 MB).options: a JSON string{ "importTheme": boolean, "importPages": boolean, "pagesImportMode": "override" | "skip", "selectedPageIds"?: string[] }.overridereplaces pages whose assignment already exists;skipkeeps them.confirm: must equal theprojectIdin the path.
Limits and errors:
- The whole multipart body is byte-capped while streaming (file cap plus 64 KiB of framing); a second file part is rejected.
- 400 for an invalid file, options or confirmation; the import core’s reason is in
details.importCode(for exampleINVALID_FILE,FILE_TOO_LARGE,PARSE_ERRORforoptionsthat are not JSON,INVALID_OPTIONSforoptionsthat fail validation). - A 200 can still report per-part failures: check
results.theme.success,results.pages.errorsandresults.pages.skippedInfo.
Every key issued since scopes exist (including a baseline-only key) must use this route. The legacy /api/projects/import admits only pre-scope keys and authenticated merchant sessions, never narrow agent or MCP bearers.
Required scopes: project:manage, content:publish and content:delete (all three)
curl --request POST \
--url https://studio.weaverse.io/api/v1/content/projects/{projectId}/import \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form file=@example-file \
--form 'options=<string>' \
--form 'confirm=<string>'const form = new FormData();
form.append('file', '<string>');
form.append('options', '<string>');
form.append('confirm', '<string>');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://studio.weaverse.io/api/v1/content/projects/{projectId}/import', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://studio.weaverse.io/api/v1/content/projects/{projectId}/import"
files = { "file": ("example-file", open("example-file", "rb")) }
payload = {
"options": "<string>",
"confirm": "<string>"
}
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text){
"object": "project_import",
"projectId": "clz8k2m4n0001qwer7tyu8iop",
"results": {
"theme": {
"success": true,
"message": "Theme settings imported successfully"
},
"pages": {
"success": true,
"imported": 4,
"skipped": 1,
"total": 5,
"errors": [],
"skippedInfo": [
"Replaced 1 templates: \"Homepage\""
]
},
"cleanup": null
}
}{
"object": "error",
"code": "INVALID_PARAMS",
"message": "\"confirm\" must be \"clz8k2m4n0001qwer7tyu8iop\" for this destructive operation",
"status": 400
}{
"object": "error",
"code": "UNAUTHORIZED",
"message": "<string>",
"status": 123,
"details": "<unknown>"
}{
"object": "error",
"code": "UNAUTHORIZED",
"message": "<string>",
"status": 123,
"details": "<unknown>"
}{
"object": "error",
"code": "UNAUTHORIZED",
"message": "<string>",
"status": 123,
"details": "<unknown>"
}{
"object": "error",
"code": "UNAUTHORIZED",
"message": "<string>",
"status": 123,
"details": "<unknown>"
}{
"object": "error",
"code": "UNAUTHORIZED",
"message": "<string>",
"status": 123,
"details": "<unknown>"
}Authorizations
Bearer authentication: a shop API key (WEAVERSE_API_KEY), a scoped API key, a delegated MCP OAuth token, or (translation-unit routes only) a project-bound translation agent token. Scopes: content:read — Read projects, pages, theme settings, versions, drafts and translation units. content:write — Save drafts and make non-destructive edits (page items, metadata, SEO, assignments, languages, glossary). Never publishes or deletes. content:publish — Publish drafts, schedule/reschedule/cancel publications, restore versions, publish global sections. content:delete — Delete pages, global sections, languages, static keys, override reverts; required with project:manage for project deletion. project:manage — Create/copy/delete projects, settings, variants, hierarchy, backups, restore-as-new, previews, hostname policy. translations:read — Read translation units only (no general content access). translations:write — Apply translation units only; never mutates page content. A legacy unscoped API key keeps read/write/translation baseline access and every pre-scope endpoint, but never gains publish/delete/project-manage implicitly.
Path Parameters
Response
Import results
The response is of type object.
Was this page helpful?