Cloudflare
Upload assets
Upload assets
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
| 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)
Required: true
| Name | Type | Description |
|---|
{
"type": "object",
"additionalProperties": {
"type": "string"
},
"description": "One form field per file: the field name is the hash, the value the content."
}Response
HTTP 201
Success
application/json
| Name | Type | Description |
|---|---|---|
| success | boolean | Always true on success. |
| errors | array<any> | Always empty on success. |
| messages | array<any> | Always empty on success. |
| result | object | |
| result.jwt | string | 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
Batch stored; more batches remain (no completion token yet).
application/json
| Name | Type | Description |
|---|---|---|
| success | boolean | Always true on success. |
| errors | array<any> | Always empty on success. |
| messages | array<any> | 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. |