> ## 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.

# Create Image Upload URL

> Get a presigned URL for a block-ready email image

Returns a company-scoped authenticated API URL for uploading an image to
Sequenzy's shared media library. PUT the exact bytes to `uploadUrl` with the
same API credentials, then call [Complete Image
Upload](/api-reference/media/complete-upload) with the returned `key`.

PNG, JPEG, GIF, and WebP images up to 5MB are accepted. These formats can be
used immediately in email image blocks without an asynchronous conversion.

## Request

<ParamField body="filename" type="string" required>
  Original file name, including a supported image extension.
</ParamField>

<ParamField body="contentType" type="string" required>
  Image MIME type, such as `image/png`.
</ParamField>

<ParamField body="fileSizeBytes" type="number" required>
  Exact image size in bytes, from 1 through 5242880.
</ParamField>

```bash theme={null}
curl -X POST "https://api.sequenzy.com/api/v1/media/upload-url" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"filename":"product-shot.png","contentType":"image/png","fileSizeBytes":248132}'

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,
    "uploadUrl": "https://api.sequenzy.com/api/v1/media/upload-bytes?...",
    "publicUrl": "https://images.sequenzy.com/email-images/comp_123/.../product-shot.png",
    "key": "email-images/comp_123/.../product-shot.png",
    "fileName": "product-shot.png"
  }
  ```

  ```json 400 theme={null}
  {
    "success": false,
    "error": "Unsupported image type. Use PNG, JPEG, GIF, or WebP."
  }
  ```

  ```json 503 theme={null}
  {
    "success": false,
    "error": "Image uploads are not configured on this server."
  }
  ```
</ResponseExample>
