Read file contents

Download a file and return its contents inline as text or base64. Perfect for reading configs, CSVs, or JSON files in automation workflows.

GET Endpoint

GET https://pushftp.com/api/read/{connectionId}?path=/path/to/file.csv

Example

curl https://pushftp.com/api/read/YOUR_CONNECTION_ID?path=/data/report.csv \
  -H "Authorization: Bearer pftp_your_key"

Log in to see your real API key and connection IDs here.

pathrequiredFull remote path to the file
encodingoptional"text" (default) or "base64" for binary files

Response

{
  "filename": "report.csv",
  "path": "/data/report.csv",
  "size": 1234,
  "encoding": "text",
  "content": "name,email,amount\nJohn,[email protected],42.50\n"
}

Limits

Maximum file size: 5 MB. For larger files, use the Download endpoint instead.

Counts as 1 action toward your monthly limit.

Read as base64

For binary files (images, PDFs), request base64 encoding:

curl "https://pushftp.com/api/read/YOUR_CONNECTION_ID?path=/images/logo.png&encoding=base64" \
  -H "Authorization: Bearer pftp_your_key"

Log in to see your real API key and connection IDs here.