> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sequenzy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Upload Image Bytes

> Validate and store image bytes at the authenticated upload URL

Upload the exact image bytes to the `uploadUrl` returned by [Create Image
Upload URL](/api-reference/media/upload-url). Send the same API key and company
selection headers used to create the URL. The query parameters are already
included in `uploadUrl`; do not modify them.

The server reads at most the declared size (up to 5MB), verifies the PNG, JPEG,
GIF, or WebP file signature, and only then creates the public object. Each URL
can create its object once, so request a new upload URL after a `409` response.

```bash theme={null}
curl -X PUT "UPLOAD_URL_FROM_RESPONSE" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: image/png" \
  --data-binary @product-shot.png
```

## Responses

<ResponseExample>
  ```json 200 theme={null}
  {
    "success": true,
    "key": "email-images/comp_123/.../product-shot.png",
    "publicUrl": "https://images.sequenzy.com/email-images/comp_123/.../product-shot.png"
  }
  ```

  ```json 400 theme={null}
  {
    "success": false,
    "error": "The uploaded image bytes do not match the declared content type."
  }
  ```

  ```json 409 theme={null}
  {
    "success": false,
    "error": "This image upload URL has already been used."
  }
  ```
</ResponseExample>
