# moveUpload

```graphql
mutation MoveUpload($input: MoveUploadInput!) {
  moveUpload(input: $input) {
    success
    error
    file {
      id
      path
      name
      size
      mimeType
      createdAt
      updatedAt
    }
    id
    path
    fileName
    contentType
    sizeBytes
    url
    status
    visibility
    createdAt
    updatedAt
    deletedAt
  }
}
```

Move an upload to another path in the same project, keeping its ID. Requires project.uploads.write.

## Arguments

| Name                     | Type             | Required | Description                                                 |
| ------------------------ | ---------------- | -------- | ----------------------------------------------------------- |
| `input`                  | MoveUploadInput! | Yes      |                                                             |
| `input.projectReference` | String           |          | Project ID                                                  |
| `input.uploadReference`  | String           |          | Upload UUID or project-relative path of the upload to move. |
| `input.sourcePath`       | String           |          | Another spelling of uploadReference. Send one of the two.   |
| `input.destinationPath`  | String!          | Yes      | Destination file path                                       |

## Variables

```json
{
  "input": {
    "destinationPath": "string"
  }
}
```

## Responses

| Status | Description                                |
| ------ | ------------------------------------------ |
| 200    | The MoveUploadPayload! in data.moveUpload. |

## Call it

```bash
curl -X POST "https://api.veryfront.com/graphql" \
  -H "Authorization: Bearer $VERYFRONT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "query": "mutation MoveUpload($input: MoveUploadInput!) {\n  moveUpload(input: $input) {\n    success\n    error\n    file {\n      id\n      path\n      name\n      size\n      mimeType\n      createdAt\n      updatedAt\n    }\n    id\n    path\n    fileName\n    contentType\n    sizeBytes\n    url\n    status\n    visibility\n    createdAt\n    updatedAt\n    deletedAt\n  }\n}",
  "variables": {
    "input": {
      "destinationPath": "string"
    }
  }
}'
```

## Example response

```json
{
  "data": {
    "moveUpload": {
      "success": false,
      "error": "string",
      "file": {
        "id": "string",
        "path": "string",
        "name": "string",
        "size": 0,
        "mimeType": "string",
        "createdAt": "string",
        "updatedAt": "string"
      },
      "id": "string",
      "path": "string",
      "fileName": "string",
      "contentType": "string",
      "sizeBytes": 0,
      "url": "https://example.com",
      "status": "pending",
      "visibility": "project",
      "createdAt": "2026-01-01T00:00:00Z",
      "updatedAt": "2026-01-01T00:00:00Z",
      "deletedAt": "2026-01-01T00:00:00Z"
    }
  }
}
```
