# Create asset upload session (/en/docs/api/compatible/cloudflare/createAssetUploadSession)



`POST /cloudflare/client/v4/accounts/{account_id}/workers/scripts/{script_name}/assets-upload-session`

Declare the static file manifest; the answer lists missing hashes in batches and an upload token.

**Support: supported**

## Parameters [#parameters]

| Name         | Location | Type   | Required | Description                                     |
| ------------ | -------- | ------ | -------- | ----------------------------------------------- |
| account\_id  | path     | string | true     | Any value; your account comes from the API key. |
| script\_name | path     | string | true     | Worker name.                                    |

## Request body (application/json) [#request-body-applicationjson]

Required: true

| Name     | Type   | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| -------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| manifest | object | Map of static file path to content hash and byte size. Paths start with /; the same hash must declare the same size. The root paths /\_headers and /\_redirects are response-header and redirect rule files and are not served as assets; same-named files in subdirectories are ordinary assets. \_headers allows at most 100 rules and 2000 characters per line (whitespace included); \_redirects allows at most 2000 static and 100 dynamic rules and 1000 characters per rule (whitespace included), and rules after the first dynamic rule count toward the dynamic quota. Exceeding a limit makes CreateVersion return INVALID\_PARAMS, with violations.field pointing at the manifest entry. |

```json
{
  "type": "object",
  "required": [
    "manifest"
  ],
  "properties": {
    "manifest": {
      "$ref": "#/components/schemas/cloudflare-AssetManifest"
    }
  }
}
```

## Response [#response]

### HTTP 200 [#http-200]

Success

**application/json**

| Name | Type | Description |
| --- | --- | --- |
| success | boolean | Always true on success. |
| errors | array&lt;any&gt; | Always empty on success. |
| messages | array&lt;any&gt; | Always empty on success. |
| result | object |  |
| result.jwt | string | Upload token, valid for one hour. |
| result.buckets | array&lt;array&lt;string&gt;&gt; | Hashes still missing, grouped into upload batches. |
| result_info | object | Present on list responses. |
| result_info.page | integer | Page number. |
| result_info.per_page | integer | Page size. |
| result_info.count | integer | Items on this page. |
