Copy a file

Copy files between connections — or within the same connection.

POST Endpoint

POST https://pushftp.com/api/copy

Requires: Authorization: Bearer pftp_your_key

Copy between two connections

Read a file from one server and write it to another. Works across SFTP, FTP, and S3.

curl -X POST https://pushftp.com/api/copy \
  -H "Authorization: Bearer pftp_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "source_connection_id": "YOUR_CONNECTION_ID",
    "source_path": "/reports/daily.csv",
    "dest_connection_id": "DEST_CONNECTION_ID",
    "dest_path": "/incoming/daily.csv"
  }'

Log in to see your connection IDs pre-filled.

source_connection_idrequired
Connection to read from
source_pathrequired
Full path to the source file
dest_connection_idrequired
Connection to write to (can be the same as source)
dest_pathoptional
Destination path — defaults to same as source_path

Copy within the same connection

Duplicate a file to a different path on the same server.

curl -X POST https://pushftp.com/api/copy \
  -H "Authorization: Bearer pftp_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "source_connection_id": "YOUR_CONNECTION_ID",
    "source_path": "/reports/daily.csv",
    "dest_connection_id": "YOUR_CONNECTION_ID",
    "dest_path": "/archive/daily-backup.csv"
  }'

Log in to see your connection IDs pre-filled.

Use cases

  • Sync files between an SFTP server and S3 bucket
  • Archive files to a backup connection before deleting
  • Fan out: send one file to multiple destinations via Zapier or Make
  • Migrate data between servers

Response

{
  "success": true,
  "transferId": "abc123",
  "filename": "daily.csv",
  "sourcePath": "/reports/daily.csv",
  "destPath": "/incoming/daily.csv",
  "sourceConnectionId": "conn_source",
  "destConnectionId": "conn_dest",
  "fileSize": 24576,
  "durationMs": 1250
}

Errors

  • 404 — Source file not found, or connection not found
  • 401 — Authentication failed on source or destination
  • 403 — Permission denied reading or writing
  • 429 — Transfer limit reached for your plan