---
agentTools:
  projectIndex: https://docs.cancergenomicscloud.org/llms.txt
---

# Delete a folder

files/{folder_id}

This call deletes a folder. Only an empty folder can be deleted.

[block:code]
{
  "codes": [
    {
      "code": "https://cgc-api.sbgenomics.com/v2/files/{folder_id}",
      "language": "text",
      "name": "Path"
    }
  ]
}
[/block]

\##Request
\###Example request

[block:code]
{
  "codes": [
    {
      "code": "DELETE /v2/files/{folder_id} HTTP/1.1\nHost: cgc-api.sbgenomics.com\nX-SBG-Auth-Token: 3210a98c1db9318fa9d9273156740f74\nContent-Type: application/json",
      "language": "http",
      "name": null
    },
    {
      "code": "curl -X DELETE -H \"X-SBG-Auth-Token: 3210a98c1db9318fa9d9273156740f74\" -H \"Content-Type: application/json\" \"http://cgc-api.sbgenomics.com/v2/files/5801cd381c94d72f08ba375b\"",
      "language": "curl",
      "name": "cURL"
    }
  ],
  "sidebar": true
}
[/block]

\###Header Fields

[block:parameters]
{
  "data": {
    "h-0": "Name",
    "h-1": "Description",
    "0-0": "`X-SBG-Auth-Token`\n*required* ",
    "0-1": "Your CGC [authentication token](https://docs.cancergenomicscloud.org/docs/get-your-authentication-token).",
    "h-2": "",
    "1-0": "`Content-Type`\n*required* ",
    "1-1": "`application/json`"
  },
  "cols": 2,
  "rows": 2
}
[/block]

\##Response
[See a list of CGC-specific response codes that may be contained in the body of the response](https://docs.cancergenomicscloud.org/docs/api-status-codes).