Append to a file

Add content to the end of an existing file. Useful for logs, CSV rows, or any file you build up over time.

POST Endpoint

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

Append a line to a log file

curl -X POST https://pushftp.com/api/append/YOUR_CONNECTION_ID \
  -H "Authorization: Bearer pftp_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "path": "/logs/app.log",
    "content": "2026-04-06 INFO New user signed up\n"
  }'

Log in to see your connection IDs pre-filled.

pathrequired
Full remote path to the file to append to
contentrequired
Content to append (text or base64 string)
encodingoptional
"text" (default) or "base64"

Append a CSV row

curl -X POST https://pushftp.com/api/append/YOUR_CONNECTION_ID \
  -H "Authorization: Bearer pftp_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "path": "/data/orders.csv",
    "content": "2026-04-06,ORD-1234,49.99,completed\n"
  }'

Log in to see your connection IDs pre-filled.

Append binary data (base64)

curl -X POST https://pushftp.com/api/append/YOUR_CONNECTION_ID \
  -H "Authorization: Bearer pftp_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "path": "/data/records.bin",
    "content": "SGVsbG8gV29ybGQ=",
    "encoding": "base64"
  }'

Log in to see your connection IDs pre-filled.

Response

{
  "success": true,
  "transfer": {
    "id": "abc123",
    "filename": "app.log",
    "path": "/logs/app.log",
    "appendedBytes": 42,
    "durationMs": 95,
    "connection": { "id": "xyz789", "name": "Production SFTP", "type": "sftp" }
  }
}

Notes

  • The file must already exist — append does not create new files. Use Write to create first.
  • Not supported on S3 connections. S3 does not natively support append; use Write to replace the full file.
  • Counts as 1 action toward your monthly limit.
  • Remember to include \n in your content if you want a newline at the end.