Skip to content
Delivery

Configure SFTP Delivery

Set up secure SFTP server delivery for squid run results

The v1 API, for batchesSquids, tasks and runs: many calls on a schedule, delivered where you work. For one call that answers in seconds, use the API v2.
POSThttps://api.lobstr.io/v1/delivery?squid={squid_hash}

Configure SFTP delivery to securely store run results on your own SFTP server. Results will be automatically uploaded to your specified server and directory when runs complete.

Headers

Authorizationstringheaderrequired

Your API authentication token. Value: Token YOUR_API_KEY

Content-Typestringheaderrequired

Must be application/json. Value: application/json

Query Parameters

squidstringqueryrequired

The unique identifier (hash) of the squid for which to configure SFTP delivery. Example: c106a44a98044ef18acc59986ae10967

Request Body

ftp_fields.hoststringrequired

SFTP server hostname or IP address. Example: "sftp.example.com"

ftp_fields.portintegerrequired

SFTP server port number (default is 22). Example: 22

ftp_fields.usernamestringrequired

Username for SFTP authentication. Example: "user"

ftp_fields.passwordstringrequired

Password for SFTP authentication. Example: "myC00lP@ssword"

ftp_fields.directorystringrequired

Target directory path on the SFTP server where files will be uploaded. Example: "/upload/path"

ftp_fields.is_activebooleanrequired

Set to true to enable SFTP delivery, false to disable. Example: true

Response Field Explanations

ftp_fields.hoststring

SFTP server hostname. Example: "sftp.example.com"

ftp_fields.portinteger

SFTP server port. Example: 22

ftp_fields.usernamestring

SFTP username. Example: "user"

ftp_fields.passwordstring

SFTP password (returned in response). Example: "myC00lP@ssword"

ftp_fields.directorystring

Target directory path. Example: "/upload/path"

ftp_fields.is_activeboolean

Whether SFTP delivery is active. Example: true

Ensure your SFTP server is accessible from lobstr.io's servers. Check firewall rules and IP allowlists if connection fails.

Use the Test SFTP endpoint to verify your credentials and server connectivity before activating automatic delivery.

The directory path must exist on the server. Lobstr will not create directories automatically.

Store SFTP credentials securely. While they're returned in API responses, treat them as sensitive data.

Set is_active to false to temporarily disable SFTP delivery without removing your configuration.

Code Examples

curl -X POST "https://api.lobstr.io/v1/delivery?squid=YOUR_SQUID_HASH" \
  -H "Authorization: Token YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "ftp_fields": {
      "host": "sftp.example.com",
      "port": 22,
      "username": "user",
      "password": "password",
      "directory": "/upload/path",
      "is_active": true
    }
  }'

Response

201
{
  "ftp_fields": {
    "host": "sftp.example.com",
    "port": 22,
    "username": "user",
    "password": "password",
    "directory": "/upload/path"
  }
}