Skip to main content
PATCH
Rename, move, trash, or restore Google Drive file metadata; never permanently delete

Authorizations

x-api-key
string
header
required

Organization API key passed as the x-api-key header. The raw key is the header value; do not prefix it with Bearer.

Path Parameters

fileId
string
required
Required string length: 1 - 512
Pattern: ^[A-Za-z0-9_-]+$

Body

application/json
name
string
Required string length: 1 - 255
addParentId
string

Move destination folder ID. Also supply removeParentId from current file metadata; folder changes use Google addParents/removeParents query parameters.

Required string length: 1 - 512
Pattern: ^[A-Za-z0-9_-]+$
removeParentId
string
Required string length: 1 - 512
Pattern: ^[A-Za-z0-9_-]+$
trashed
boolean

true moves to trash; false restores. Never permanently deletes.

confirmTrash
boolean

Required explicit user approval when trashed=true; trashing a folder affects its children.

Response

Google-confirmed result.

ok
boolean
required
file
object
required