Copy, Move or Restore Object

Server-side copy of an object - also how the console moves, renames, and restores old versions.
EndpointMethodAdmin Required
/api/v1/objects/copyPOSTNo

Copies an object to a new key, within one bucket or between two buckets you own, entirely server-side. The same call covers three operations the object browser offers:

  • Copy - a new object at destinationKey, source untouched.
  • Move / rename - set deleteSource: true; the source is removed once the copy is durable. A rename is a move within the same bucket.
  • Restore a version - set sourceVersionId and keep destinationKey equal to sourceKey. The old version is copied onto its own key as the new current version, which is S3's own idiom for restoring.

The copy behaves like S3 CopyObject: it overwrites an existing object at the destination without warning, creates a new version on a versioning-enabled destination bucket, and fires the bucket's webhook and replication rules. Deleting the source follows the console's delete semantics - a delete marker on a versioning-enabled bucket, a permanent delete otherwise.

Request Body

sourceBucket
string required
Bucket holding the object to copy. Must be owned by you.
sourceKey
string required
Key of the object to copy. Must name an object, not a folder (no trailing /).
sourceVersionId
string
Copy this specific version instead of the current one. Required for a restore.
destinationBucket
string required
Bucket to copy into. Must be owned by you (may equal sourceBucket).
destinationKey
string required
Key to write. Must name an object, not a folder, and pass the usual key rules (no NUL bytes, at most 1024 bytes, no path component over 240 bytes).
deleteSource
boolean
Remove the source after the copy succeeds - a move or rename. Default: false.

Copy

{
    "sourceBucket": "my-bucket",
    "sourceKey": "drafts/report.pdf",
    "destinationBucket": "archive",
    "destinationKey": "2025/report.pdf"
}

Rename

{
    "sourceBucket": "my-bucket",
    "sourceKey": "drafts/report-v2.pdf",
    "destinationBucket": "my-bucket",
    "destinationKey": "drafts/report.pdf",
    "deleteSource": true
}

Restore a version

{
    "sourceBucket": "my-bucket",
    "sourceKey": "report.pdf",
    "sourceVersionId": "abc123def456",
    "destinationBucket": "my-bucket",
    "destinationKey": "report.pdf"
}

Response

The newly written object, in the same shape as a List Objects item:

{
    "key": "2025/report.pdf",
    "size": 245678,
    "contentType": "application/pdf",
    "etag": "d41d8cd98f00b204e9800998ecf8427e",
    "lastModified": "2025-01-15T10:30:00Z",
    "isFolder": false,
    "versionId": "9f8e7d6c5b4a",
    "isLatest": true
}

Errors

StatusReason
400Source or destination key names a folder, destination key is invalid, source and destination are the same object without sourceVersionId, or an object would be moved onto itself
404Source or destination bucket not found (or not owned by you), or the source object/version does not exist
500Copying the object failed