# Upload assets (/en/docs/api/compatible/cloudflare/uploadAssets)



`POST /cloudflare/client/v4/accounts/{account_id}/workers/assets/upload`

Upload one batch as multipart form fields (hash → content; base64 when base64=true). Send the upload token as Authorization: Bearer and your API key in X-API-Key. Earlier batches answer 202; the last answers 201 with the completion token.

**Support: partial**

Upload one batch as multipart form fields (hash → content; base64 when base64=true). Send the upload token as Authorization: Bearer and your API key in X-API-Key. Earlier batches answer 202; the last answers 201 with the completion token.

## Parameters [#parameters]

| Name        | Location | Type    | Required | Description                                     |
| ----------- | -------- | ------- | -------- | ----------------------------------------------- |
| account\_id | path     | string  | true     | Any value; your account comes from the API key. |
| base64      | query    | boolean | false    | Field values are base64.                        |

## Request body (multipart/form-data) [#request-body-multipartform-data]

Required: true

| Name | Type | Description |
| ---- | ---- | ----------- |

```json
{
  "type": "object",
  "additionalProperties": {
    "type": "string"
  },
  "description": "One form field per file: the field name is the hash, the value the content."
}
```

## Response [#response]

### HTTP 201 [#http-201]

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 &#124; null | Completion token after the last batch; null for earlier 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. |

### HTTP 202 [#http-202]

Batch stored; more batches remain (no completion token yet).

**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_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. |
