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

# upload action

You can upload files to a storage group with the `upload` action. You need to include "non-empty" header content to serve as the `[Body]` for an "upload" action.

> 🚧 Avoid breaking your workflow
>
> If you use this API to upload content, using other using other [access methods](https://techdocs.akamai.com/netstorage/docs/manage-content-access-methods) is not supported. You must continue using the Usage API exclusively to manage your content.

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "upload",
    "version": "v1"
  },
  "servers": [
    {
      "url": "https://{domainPrefix}-nsu.akamaihd.net"
    }
  ],
  "paths": {
    "/{cpCode}/{path}/{filename}": {
      "parameters": [
        {
          "description": "Form the header value as a query parameter string with these fields:\n  - `version=1`. This value is constant.\n  - `action=upload`. This is the action for this API operation.\n\n**Optional parameters**\nYou can append these optional parameters to the end of the header, prefaced by an ampersand (\"&\").\n  - `index-zip=1`. Include this to enable az2z processing of an uploaded \".zip\" archive file for use with the [Serve from Zip](https://techdocs.akamai.com/netstorage/docs/serve-content-from-zip-files) feature.\n  - `size=[#]`. Enforce that the uploaded file is precisely [#] size (in bytes). The server returns a 412 error for `size` mismatches.\n  - `upload-type=[type]`. Include this field to specify the upload type. The following are supported as the \"`[type]`\":\n      - `binary`. To specify a binary-encoded upload (e.g., &upload-type=binary)\n      - `form`. To specify a form-encoded upload. In this case, you must include one of these two header fields:\n          - `field-name=[X]`. The upload is a multi-part form, and the content named in the field, [X] should be targeted for the upload (for example, `&upload-type=form&field-name=Upload`).\n          - `field-index=[#]`. The upload is a multi-part form, and the content specified in field number [#] should be targeted for the upload (for example, `&upload-type=form&field-index=1`). This field is zero-based. Use \"0\" as the variable value (`field-index=0`) to select the first field, \"1\" to select the second, and so on.\n",
          "in": "header",
          "name": "X-Akamai-ACS-Action",
          "required": true,
          "schema": {
            "example": "version=1&action=upload&[Optional action header field variables]",
            "type": "string"
          }
        },
        {
          "description": "This required header is referred to as `[signature header 1]`.\n\n`X-Akamai-ACS-Auth-Data: [version], [0.0.0.0], [0.0.0.0], [current epoch time], [unique-number-id], [uploadAccountId]`\n\n  - `[version]`. Indicate your authentication encryption format.\n  - `[0.0.0.0]`. This is a reserved field you specify as `0.0.0.0`.\n  - `[current epoch time]`. This is the time of your API client within one (1) minute of the current time.\n  - `[unique-number-id]`. A random numeric ID your client creates to guarantee uniqueness to support multiple requests.\n  - `[uploadAccountId]`. The name of an [upload account](https://techdocs.akamai.com/netstorage/reference/get-upload-accounts) with access to the target storage group.\n\nLearn more about the [\"X-Akamai-ACS-Auth-Data\" authentication header](ref:each-call-needs-signature-header-authentication#the-x-akamai-acs-auth-data-authentication-header).\n",
          "in": "header",
          "name": "X-Akamai-ACS-Auth-Data",
          "required": true,
          "schema": {
            "example": "5, 0.0.0.0, 0.0.0.0, 1280000000, 382644692, UploadAccountMedia",
            "type": "string"
          }
        },
        {
          "description": "This required header is referred to as `[signature header 2]`. It's a Base64-encoded-signature comprised of HMAC-SHA256([key], [data] + [sign-string]).\n\nLearn more about the [\"X-Akamai-ACS-Auth-Sign\" authentication header](ref:each-call-needs-signature-header-authentication#the-x-akamai-acs-auth-sign-header).\n",
          "in": "header",
          "name": "X-Akamai-ACS-Auth-Sign",
          "required": true,
          "schema": {
            "example": "yh1MXm/rv7RKZhfKlTuSUBV69Acph5IyOWCU0/nFjms=",
            "type": "string"
          }
        },
        {
          "description": "This is your full NetStorage Usage API [connection hostname](ref:key-concepts-and-terms).\n",
          "in": "header",
          "name": "Host",
          "required": true,
          "schema": {
            "example": "example-nsu.akamaihd.net",
            "type": "string"
          }
        },
        {
          "description": "The unique CP code that represents the root directory in the applicable NetStorage storage group.\n\nLearn more about [CP codes](ref:key-concepts-and-terms).\n",
          "in": "path",
          "name": "cpCode",
          "required": true,
          "schema": {
            "example": 123456,
            "type": "integer"
          }
        },
        {
          "description": "If applicable, any additional sub-directories that exist within the path to the desired file or symbolic link.\n",
          "in": "path",
          "name": "path",
          "required": true,
          "schema": {
            "example": "baseball_folder",
            "type": "string"
          }
        },
        {
          "description": "The complete filename and extension of the object.\n",
          "in": "path",
          "name": "filename",
          "required": true,
          "schema": {
            "example": "sweep.m4a",
            "type": "string"
          }
        }
      ],
      "put": {
        "operationId": "put-upload",
        "summary": "upload action",
        "description": "You can upload files to a storage group with the `upload` action. You need to include \"non-empty\" header content to serve as the `[Body]` for an \"upload\" action.\n",
        "tags": [
          "upload - don't remove"
        ],
        "responses": {
          "204": {
            "description": "The command succeeded, with no response data.\n"
          },
          "400": {
            "description": "[Malformed request](ref:400), such as an illegal combination of parameters in the `X-Akamai-ACS-Action` request header. There may be more information in the response body, represented as unstructured text.\n"
          }
        }
      }
    }
  },
  "x-readme": {
    "samples-languages": [
      "curl",
      "python",
      "node"
    ],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "externalDocs": {
    "url": "https://techdocs.akamai.com/netstorage-usage/reference",
    "description": "See documention for Akamai's NetStorage Usage API"
  }
}
```

# Sub pages

* [Usage details for "upload"](https://techdocs.akamai.com/netstorage-usage/reference/usage-details-for-upload.md)

# Sibling pages

* [delete action](https://techdocs.akamai.com/netstorage-usage/reference/put-delete.md)
* [dir action](https://techdocs.akamai.com/netstorage-usage/reference/get-dir.md)
* [download action](https://techdocs.akamai.com/netstorage-usage/reference/get-download.md)
* [du action](https://techdocs.akamai.com/netstorage-usage/reference/get-du.md)
* [list action](https://techdocs.akamai.com/netstorage-usage/reference/get-list.md)
* [mkdir action](https://techdocs.akamai.com/netstorage-usage/reference/put-mkdir.md)
* [mtime action](https://techdocs.akamai.com/netstorage-usage/reference/post-mtime.md)
* [quick-delete action](https://techdocs.akamai.com/netstorage-usage/reference/post-quick-delete.md)
* [rename action](https://techdocs.akamai.com/netstorage-usage/reference/put-rename.md)
* [rmdir action](https://techdocs.akamai.com/netstorage-usage/reference/put-rmdir.md)
* [stat action](https://techdocs.akamai.com/netstorage-usage/reference/get-stat.md)
* [symlink action](https://techdocs.akamai.com/netstorage-usage/reference/post-symlink.md)