# Extract zip file using CMS API

**URL:** <https://community.hubspot.com/t/extract-zip-file-using-cms-api/114474>\
**Category:** APIs & Integrations\
**Tags:** cms-content, developer-tools\
**Created:** [August 14, 2024, 1:32pm UTC](https://community.hubspot.com/t/extract-zip-file-using-cms-api/114474 "2024-08-14T13:32:35Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![FSandbox](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/fsandbox/32/56602_2.png) [@FSandbox](https://community.hubspot.com/u/FSandbox)\
**Post date:** [August 14, 2024, 1:32pm UTC](https://community.hubspot.com/t/extract-zip-file-using-cms-api/114474/1 "2024-08-14T13:32:35Z")

</div>

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

> **[CMS | Source Code API - HubSpot docs](https://developers.hubspot.com/docs/api-reference/legacy/cms/source-code/guide)**
>
> Create, fetch, update, and delete, files in the HubSpot developer file system. Additionally you can validate files for different types of errors & warnings

[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

> **[CMS | Source Code API - HubSpot docs](https://developers.hubspot.com/docs/api-reference/legacy/cms/source-code/guide)**
>
> Create, fetch, update, and delete, files in the HubSpot developer file system. Additionally you can validate files for different types of errors & warnings

[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.

---

<div class="post-metadata">

**Author:** ![GiantFocal](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/giantfocal/32/41969_2.png) [@GiantFocal](https://community.hubspot.com/u/GiantFocal)\
**Post date:** [August 14, 2024, 5:01pm UTC](https://community.hubspot.com/t/extract-zip-file-using-cms-api/114474/2 "2024-08-14T17:01:10Z")

</div>

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!_

---

<div class="post-metadata">

**Author:** ![FSandbox](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/fsandbox/32/56602_2.png) [@FSandbox](https://community.hubspot.com/u/FSandbox)\
**Post date:** [August 17, 2024, 9:07am UTC](https://community.hubspot.com/t/extract-zip-file-using-cms-api/114474/3 "2024-08-17T09:07:49Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![huffit](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/huffit/32/34147_2.png) [@huffit](https://community.hubspot.com/u/huffit)\
**Post date:** [October 18, 2024, 8:30pm UTC](https://community.hubspot.com/t/extract-zip-file-using-cms-api/114474/4 "2024-10-18T20:30:08Z")

</div>

did you ever resolve this? having the same issue.
