---
updatedAt: 2026-03-01T18:07:43.000Z
agentTools:
  siteIndex: https://techdocs.akamai.com/llms.txt
  projectIndex: https://techdocs.akamai.com/netstorage-usage/llms.txt
---

# Delete content from a storage group

```python Python
import requests

apiKey = "AbCd3fgoURanooXsbZ6deuZwIBRui4HvO57gf6Hr1CZGu"
domainPrefix = "baseball"
apiHostname = "-nsu.akamaihd.net"
fullHostname = "{domainPrefix}{apiHostname}"
url = "https://{fullHostname}/123456/files_baseball/sweep.m4a"

headers = {
    "Accept": "text/html",
    "X-Akamai-ACS-Action": "version=1&action=delete",
    "X-Akamai-ACS-Auth-Data": "5, 0.0.0.0, 0.0.0.0, 1280000000, 382644692, UploadAccountMedia",
    "X-Akamai-ACS-Auth-Sign": "yh1MXm/rv7RKZhfKlTuSUBV69Acph5IyOWCU0/nFjms=",
    "Host": "baseball-nsu.akamaihd.net"
}

response = requests.request("PUT", url, headers=headers)

print(response.text)
```

```json Response Example
{"success":true}
```

# Obtain your API key

<!-- python@3 -->

Each call to the API requires the `apiKey` assigned to your upload account.

You can use the [Config API](https://techdocs.akamai.com/netstorage/reference/get-upload-account) or [Control Center](https://techdocs.akamai.com/netstorage/docs/the-netstorage-usage-api-1) to get this value. Store the `key` value.

# Define your prefix and hostname

<!-- python@4-6 -->

Each call uses your [domain name prefix](https://techdocs.akamai.com/netstorage-usage/reference/how-to-format-an-api-call#each-call-needs-your-connection-hostname).

This API uses the `-nsu.akamaihd.net` for the `apiHostname` URL.

Prepend your `domainPrefix` to the `apiHostname` to create the `fullHostname`.

# Define the endpoint

<!-- python@7 -->

Include the `fullHostname` and path of the object to delete.

# Define your action header

<!-- python@11 -->

Define your action. Include `version=1` as a constant value, followed by the action.

# Build your auth-data header

<!-- python@12 -->

See [X-Akamai-ACS-Auth-Data](https://techdocs.akamai.com/netstorage-usage/reference/each-call-needs-signature-header-authentication#the-x-akamai-acs-auth-data-authentication-header) for details.

# Sign your header

<!-- python@13 -->

See [X-Akamai-ACS-Auth-Sign](https://techdocs.akamai.com/netstorage-usage/reference/each-call-needs-signature-header-authentication#the-x-akamai-acs-auth-sign-header) for details.

# Include your host

<!-- python@14 -->

Include your `fullHostname` for the `Host` value.

# Confirm your headers

<!-- python@9-15 -->

Ensure your headers are accurate with the correct keys.

# Submit your request

<!-- python@17 -->

Populate your request with the method, url, and headers.

# View your response

<!-- python@19 -->