Extract zip file using CMS API

Hi,

I have upload zip file in Design Manager using following CMS Source Code API.

Upload Zip file in Desing Manager

[POST] {{baseUrl}}/cms/v3/source-code/published/content/api-test-folder/theme-folder.zip

[FORM-DATA] file: <<select zip file here>>

Above API give response

{

"id": "/api-test-folder/theme-folder.zip",

"name": "base.css",

"folder": false,

"children": null,

"updatedAt": 1723639888118,

"createdAt": 0,

"archivedAt": null

}

File uploaded successfully and show in design manager also BUT problem is how to extract zip file.

Design manager does not provide any UI option to extract it.

I have try following API but no success.

[1] Extracting a file package

[POST] {{baseUrl}}/cms/v3/source-code/extract/api-test-folder/theme-folder.zip

Above API gives response as “204 No Content”.

[2] Extract a zip file

[POST] {{baseUrl}}/cms/v3/source-code/extract/async

[DATA] {

"path": "/api-test-folder/theme-folder.zip"

}

Above API give following response.

{

"id": "100729881",

"links": {

    "status": "https://api-na1.hubspot.com/cms/v3/source-code/extract/async/tasks/100729881/status"

}

}

But when check status using status link its give following response.

{

"status": "CANCELED",

"startedAt": "2024-08-14T13:12:24.146Z",

"completedAt": "2024-08-14T13:12:24.146Z"

}

Can someone show me where i am wrong?

Someone suggest me right path to upload zip file in design manager and how to extract it?

Thanks and please do the helpful.

Hi @FSandbox,

Could you please clarify why you chose to upload the theme in a zip format?

If you’re working locally, the recommended approach is to upload the directory with the HubSpot CLI (hs upload) rather than packaging it as a ZIP. If you’re building an app that needs to manage Design Manager assets programmatically, use the CMS Source Code API instead; the Source Code API supports uploading ZIP file packages and extracting them in the developer file system.

In your local CLI, you can run:

hs upload theme-folder theme-folder

It will upload all files and subdirectories.

Best regards,

Abraham Ernesto

Moderator Note: this post was reviewed for relevancy and optimized for clarity on September 30, 2026. Thank you for your contributions to the HubSpot Community!

Hi @GiantFocal,

Yes, I know the CLI way but I have plan to build public app and in app requirements i need to upload theme file in Design Manager.
So I need to upload theme file using CMS API but in API document there is not properly explain in depth details and not have properly example to describe it.

Thanks.

did you ever resolve this? having the same issue.