Skip to main content
POST
Move a file synchronously

Authorizations

Authorization
string
header
required

IDM-issued JWT. Obtain via the IDM authentication flow and pass as: Bearer

Headers

X-ActionId
string
default:""

A logging ID of the request. It is propagated through Phrase systems, making it easier to connect logs from various services. If no ActionId is sent with a request, one will be generated by Bifrost and returned with the response.

Body

application/json

Request payload for moving one Google Drive file to another folder.

A move is a strict relocation: the same file (same fileId, same name) ends up in the destination folder. It is never replaced by a copy, and no other file is overwritten, replaced or deleted. A file with the same name already in the destination does not block the move. Authentication is provided via connectorUuid.

connectorUuid
string
default:""
required

UUID of a configured connector that holds stored Google Drive credentials.

Example:

"b9c06f76-4a44-4d2e-8a26-3d1e4b47e123"

source
object
required

The file to move, together with where you expect it to be.

fileId is required. The last element of parentChain must be the file's direct parent, with an id, exactly as returned by list-files (a file directly in My Drive has the parent { "id": "root", "name": "My Drive" }). An empty parentChain means the drive root. name is informational: the file keeps its name.

The move happens only if the file is in that expected parent. If it is already in the destination folder, the request succeeds without a change. Otherwise the request is rejected with MOVE_SOURCE_NOT_AT_EXPECTED_LOCATION.

destination
object
required

The folder to move the file into.

  • With folderId, that folder is used directly. It must be an accessible folder.
  • Without folderId, name is required. parentChain and name are resolved like the target of upload-raw-file: parents with an id are used directly, named parents are looked up by name, and a missing named folder is created (only when the file is actually going to be moved). When several folders have the same name, the oldest one (by creation time, then by id) is used.

The destination must be in the same drive as the file: My Drive, or the same shared drive. A destination in another drive is rejected with MOVE_UNSUPPORTED.

configuration
any
default:""

Connector configuration for this request. Currently unused, but reserved for future configuration flags.

Example:
{key}
any

Response

Successful operation. If X-ResponseType is set to 'ID' or no value is sent in the header, the file is saved and can be retrieved by sending a GET request to this endpoint. If X-ResponseType is set to 'OBJECT', the file is returned as a stream.

Resolved file location inside a specific Google Drive space.

Captures drive scope, the ordered chain of parent folders, and the file identifier. For read-only workflows, fileId and all parent ids should be resolved. For export workflows, fileId may be null when creating a new file.

pathType
enum<string>
default:""
required

Shape discriminator for this path. Must be FILE for this DTO.

Available options:
FILE
Example:

"FILE"

drive
object
required

Drive scope for this path.

  • MY_DRIVE - the authenticated user's "My Drive"
  • SHARED_DRIVE - a specific shared drive identified by driveId
Example:
parentChain
object[]
required

Ordered chain of parent folders from the drive root down to the direct parent of the file. The file itself is not included.

For read-only workflows, each parent should have a non-empty id so that the connector can reconstruct the full location without additional discovery.

fileId
string | null
default:""

Google Drive file identifier, when known.

Required for listing or downloading existing files. May be null when the connector is expected to create a new file in the target folder.

Example:

"1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms"

name
string | null
default:""

Human-readable display name of the file. Optional and not guaranteed to be unique within a folder.

Example:

"welcome-email.docx"

{key}
any