> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://contentful.com/developers/docs/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://contentful.com/developers/docs/_mcp/server.

# Create an upload resource

POST https://api.contentful.com/spaces/{space_id}/environments/{environment_id}/uploads
Content-Type: application/octet-stream

Reference: https://contentful.com/developers/docs/references/content-management-api/uploads/create-an-upload-resource

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Path parameters

- `space_id` (string, required) — Alphanumeric `id` of the space to retrieve.
- `environment_id` (string, optional) — Alphanumeric `id` of the environment. Defaults to `master`.

### Body (application/octet-stream)

This endpoint expects binary data of type application/octet-stream.

- Binary request body.

## Response

### 201

Created - Resource created successfully

- `map from string to any`

## Examples

**Response**

```json
{
  "sys": {
    "createdAt": "2025-05-28T21:29:53.000Z",
    "createdBy": {
      "sys": {
        "id": "4FLrUHftHW3v2BLi9fzfjU",
        "linkType": "User",
        "type": "Link"
      }
    },
    "expiresAt": "2025-03-15T06:21:37.000Z",
    "id": "2DNvIbYNELgqLJUkgTeIOV",
    "space": {
      "sys": {
        "id": "yadj1kx9rmg0",
        "linkType": "Space",
        "type": "Link"
      }
    },
    "type": "Upload"
  }
}
```