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/"
filerequiredThe file to uploadpathoptionalRemote directory (defaults to connection's default path)filenameoptionalOverride the filenameOption 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/"}'filenamerequiredName for the uploaded filecontentrequiredFile contents as base64 stringpathoptionalRemote directoryOverwrite 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" }
}
}