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

# createMarketingImageUpload

> Start an image upload for a file on disk. PUT the file's raw bytes to the returned `url` before `expiresAt`, then call `uploadMarketingImage` with `source: { uploadId }` to compress and host it. Counts against the image upload quota.

**Required scopes:** [`marketing_templates_write`](/docs/api-reference/v3/reference/scopes#scope-marketing_templates_write)

## Arguments

<ResponseField name="input" type={<a href="/docs/api-reference/v3/reference/marketing/create-marketing-image-upload-input">CreateMarketingImageUploadInput!</a>} required>
  The size of the file to upload.

  <Expandable title="fields" lazyRender>
    <ResponseField name="byteSize" type="Int!" required>
      The file's exact size in bytes, e.g. from `wc -c < image.png`. At most 10000000. It is signed into the URL, so a file of any other size is rejected.
    </ResponseField>
  </Expandable>
</ResponseField>

## Returns

<ResponseField name="createMarketingImageUpload" type={<a href="/docs/api-reference/v3/reference/marketing/marketing-image-upload">MarketingImageUpload!</a>} required>
  A private, one-time place to PUT an image file, so its bytes never pass through the API request.

  <Expandable title="fields" lazyRender>
    <ResponseField name="expiresAt" type={<a href="/docs/api-reference/v3/reference/common/date-time">DateTime!</a>} required>
      When `url` stops accepting the file.
    </ResponseField>

    <ResponseField name="uploadId" type="String!" required>
      Pass as `source.uploadId` to `uploadMarketingImage` once the file is uploaded.
    </ResponseField>

    <ResponseField name="url" type="String!" required>
      Where to PUT the file's raw bytes, e.g. `curl --fail -X PUT --upload-file ./image.png "<url>"`. No other headers are needed; curl sends the Content-Length the URL was signed for.
    </ResponseField>
  </Expandable>
</ResponseField>

## Example

```graphql theme={null}
mutation {
  createMarketingImageUpload(input: { ... }) {
    expiresAt
    uploadId
    url
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.