# moveExternalFile

```graphql
mutation MoveExternalFile($input: ExternalStorageMoveInput!) {
  moveExternalFile(input: $input) {
    id
    provider
    name
    path
    mimeType
    sizeBytes
    kind
    parentId
    modifiedAt
    etag
    thumbnailUrl
    webUrl
  }
}
```

Move external file. Requires project.integrations.connect.

## Arguments

| Name                     | Type                      | Required | Description                                                                                                                                                                                                            |
| ------------------------ | ------------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `input`                  | ExternalStorageMoveInput! | Yes      |                                                                                                                                                                                                                        |
| `input.provider`         | String!                   | Yes      | Storage provider accessed through the caller's own personal connection. A human caller is required; agent, run, and service-account credentials are refused.                                                           |
| `input.projectReference` | String                    |          | Project ID or slug. Requires project.integrations.connect through the caller's own personal provider connection.                                                                                                       |
| `input.fileId`           | String!                   | Yes      |                                                                                                                                                                                                                        |
| `input.folderId`         | String                    |          | Destination folder. Provider name conflicts return conflict; Google Drive allows duplicate names. SharePoint moves remain within the same site. Use a folder item ID or root. Required unless newParentId is supplied. |
| `input.name`             | String                    |          | New name, 1-255 characters without / or control characters.                                                                                                                                                            |
| `input.newParentId`      | String                    |          |                                                                                                                                                                                                                        |
| `input.newName`          | String                    |          | Legacy new name. Empty keeps the current name; control characters are not allowed.                                                                                                                                     |

## Variables

```json
{
  "input": {
    "provider": "string",
    "fileId": "string"
  }
}
```

## Responses

| Status | Description                                        |
| ------ | -------------------------------------------------- |
| 200    | The ExternalStorageFile! in data.moveExternalFile. |

## 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 MoveExternalFile($input: ExternalStorageMoveInput!) {\n  moveExternalFile(input: $input) {\n    id\n    provider\n    name\n    path\n    mimeType\n    sizeBytes\n    kind\n    parentId\n    modifiedAt\n    etag\n    thumbnailUrl\n    webUrl\n  }\n}",
  "variables": {
    "input": {
      "provider": "string",
      "fileId": "string"
    }
  }
}'
```

## Example response

```json
{
  "data": {
    "moveExternalFile": {
      "id": "string",
      "provider": "string",
      "name": "string",
      "path": "string",
      "mimeType": "string",
      "sizeBytes": 0,
      "kind": "string",
      "parentId": "string",
      "modifiedAt": "string",
      "etag": "string",
      "thumbnailUrl": "https://example.com",
      "webUrl": "https://example.com"
    }
  }
}
```
