Upload a file

Send files to your SFTP, FTP, or S3 connection via HTTP.

POST Endpoint

POST https://pushftp.com/api/upload/{connectionId}

Requires: Authorization: Bearer pftp_your_key

Option 1: Multipart form data

Best for sending actual files from tools like curl, Postman, or Make.

curl -X POST https://pushftp.com/api/upload/YOUR_CONNECTION_ID \
  -H "Authorization: Bearer pftp_your_key" \
  -F "[email protected]" \
  -F "path=/uploads/reports/"

Log in to see your connection IDs pre-filled.

filerequired
The file to upload
pathoptional
Remote directory (defaults to connection's default path)
filenameoptional
Override the filename

Option 2: JSON with base64

Useful when the file content is already in memory.

curl -X POST https://pushftp.com/api/upload/YOUR_CONNECTION_ID \
  -H "Authorization: Bearer pftp_your_key" \
  -H "Content-Type: application/json" \
  -d '{"filename":"report.csv","content":"aGVsbG8=","path":"/uploads/"}'

Log in to see your connection IDs pre-filled.

filenamerequired
Name for the uploaded file
contentrequired
File contents as base64 string
pathoptional
Remote directory

Option 3: Upload from URL

Pass a file URL — PushFTP fetches and uploads it. Perfect for Zapier, where files from Gmail and Google Drive come as download URLs.

curl -X POST https://pushftp.com/api/upload/YOUR_CONNECTION_ID \
  -H "Authorization: Bearer pftp_your_key" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com/reports/march.csv", "path": "/uploads/"}'

Log in to see your connection IDs pre-filled.

urlrequired
URL of the file to fetch and upload
filenameoptional
Override filename (auto-detected from URL if omitted)
pathoptional
Remote directory

Overwrite control

Add overwrite=false as a query param or JSON body field to skip if the file already exists. Returns 409 with "skipped": true.

Response

{
  "success": true,
  "transfer": {
    "id": "abc123",
    "filename": "report.csv",
    "path": "/uploads/report.csv",
    "size": 1234,
    "durationMs": 350,
    "connection": { "id": "xyz789", "name": "Production SFTP", "type": "sftp" }
  }
}