> To build or manage a Wix site with an AI agent, follow https://www.wix.com/headless/skill.md
> It builds a new Wix site or puts your own site online, from a prompt, and keeps changing it afterwards. The pages are code in any web technology, and Wix runs the backend.
> It works through the Wix plugin (the Wix MCP and the Wix skills), the Wix CLI or no Wix login, and puts the site live on Wix hosting or on another host.
> Business features include a store, bookings, events and tickets, a restaurant, a blog, forms, members and many more.
> Read the Wix skills online at https://www.wix.com/skills
> 
> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - If a reference page seems to be missing its schema (parameters, return types, or type definitions), append `?schema=true` to its `.md` URL (e.g. `https://dev.wix.com/docs/contexts/contexts/stores/category-info/use-category-info-context.md?schema=true`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

# CreateFileUploadUrl

# Package: operations

# Namespace: DataMovementService

# Method link: https://dev.wix.com/docs/api-reference/business-solutions/cms/operations/data-movement-jobs/create-file-upload-url.md

## Permission Scopes:
Data Mover Manage Jobs: SCOPE.DC-DATA.MANAGE_MOVEMENT_JOBS

## Introduction

Creates an upload URL for a data source file.

Before submitting a job to import data from a file to a collection, call this method to generate an upload URL. Use the `uploadUrl` in the response to upload your source file. For example:

`curl --request PUT --upload-file "${path_to_file}" "${uploadUrl}"`

> **Note**: The URL is valid for 15 minutes.

---

## REST API

### Schema

```
 Method: createFileUploadUrl
 Description: Creates an upload URL for a data source file.  Before submitting a job to import data from a file to a collection, call this method to generate an upload URL. Use the `uploadUrl` in the response to upload your source file. For example:  `curl --request PUT --upload-file "${path_to_file}" "${uploadUrl}"`  > **Note**: The URL is valid for 15 minutes.
 URL: https://www.wixapis.com/data-mover/v1/temporary-files/upload-url
 Method: POST
 Method parameters:
   param name: fileName | type: fileName | description: Name of uploaded file.  | validation: maxLength 512
 Return type: CreateFileUploadUrlResponse
  - name: fileId | type: string | description: File GUID.  | validation: maxLength 512
  - name: uploadUrl | type: string | description: URL to which you can upload the file.  | validation: maxLength 8192


```

### Examples

### Create a file upload URL
```curl
curl -X POST 'https://www.wixapis.com/data-mover/v1/temporary-files/upload-url' \
    -H 'Authorization: <AUTH>'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.data.movementJobs.createFileUploadUrl(options)
 Description: Creates an upload URL for a data source file.  Before submitting a job to import data from a file to a collection, call this method to generate an upload URL. Use the `uploadUrl` in the response to upload your source file. For example:  `curl --request PUT --upload-file "${path_to_file}" "${uploadUrl}"`  > **Note**: The URL is valid for 15 minutes.
 Method parameters:
   param name: options | type: CreateFileUploadUrlOptions  none  
        - name: fileName | type: string | description: Name of uploaded file.  | validation: maxLength 512
 Return type: PROMISE<CreateFileUploadUrlResponse>
  - name: fileId | type: string | description: File GUID.  | validation: maxLength 512
  - name: uploadUrl | type: string | description: URL to which you can upload the file.  | validation: maxLength 8192


```

### Examples

### createFileUploadUrl
```javascript
import { movementJobs } from '@wix/data';

async function createFileUploadUrl(options) {
  const response = await movementJobs.createFileUploadUrl(options);
};
```

### createFileUploadUrl (with elevated permissions)
```javascript
import { movementJobs } from '@wix/data';
import { auth } from '@wix/essentials';

async function myCreateFileUploadUrlMethod(options) {
  const elevatedCreateFileUploadUrl = auth.elevate(movementJobs.createFileUploadUrl);
  const response = await elevatedCreateFileUploadUrl(options);
}
```

### createFileUploadUrl (self-managed)
Self-managed SDK calls require you to [create a client](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/about-the-wix-client.md).

```javascript
import { createClient } from '@wix/sdk';
import { movementJobs } from '@wix/data';
// Import the auth strategy for the relevant access type
// Import the relevant host module if needed

const myWixClient = createClient ({
  modules: { movementJobs },
  // Include the auth strategy and host as relevant
});


async function createFileUploadUrl(options) {
  const response = await myWixClient.movementJobs.createFileUploadUrl(options);
};
```

---