Configure SFTP Delivery
curl --request POST \
--url https://api.lobstr.io/v1/delivery \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"ftp_fields.host": "<string>",
"ftp_fields.port": 123,
"ftp_fields.username": "<string>",
"ftp_fields.password": "<string>",
"ftp_fields.directory": "<string>",
"ftp_fields.is_active": true
}
'import requests
url = "https://api.lobstr.io/v1/delivery"
payload = {
"ftp_fields.host": "<string>",
"ftp_fields.port": 123,
"ftp_fields.username": "<string>",
"ftp_fields.password": "<string>",
"ftp_fields.directory": "<string>",
"ftp_fields.is_active": True
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "<content-type>"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': '<content-type>'},
body: JSON.stringify({
'ftp_fields.host': '<string>',
'ftp_fields.port': 123,
'ftp_fields.username': '<string>',
'ftp_fields.password': '<string>',
'ftp_fields.directory': '<string>',
'ftp_fields.is_active': true
})
};
fetch('https://api.lobstr.io/v1/delivery', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.lobstr.io/v1/delivery",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'ftp_fields.host' => '<string>',
'ftp_fields.port' => 123,
'ftp_fields.username' => '<string>',
'ftp_fields.password' => '<string>',
'ftp_fields.directory' => '<string>',
'ftp_fields.is_active' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: <content-type>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.lobstr.io/v1/delivery"
payload := strings.NewReader("{\n \"ftp_fields.host\": \"<string>\",\n \"ftp_fields.port\": 123,\n \"ftp_fields.username\": \"<string>\",\n \"ftp_fields.password\": \"<string>\",\n \"ftp_fields.directory\": \"<string>\",\n \"ftp_fields.is_active\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("Content-Type", "<content-type>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.lobstr.io/v1/delivery")
.header("Authorization", "<authorization>")
.header("Content-Type", "<content-type>")
.body("{\n \"ftp_fields.host\": \"<string>\",\n \"ftp_fields.port\": 123,\n \"ftp_fields.username\": \"<string>\",\n \"ftp_fields.password\": \"<string>\",\n \"ftp_fields.directory\": \"<string>\",\n \"ftp_fields.is_active\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lobstr.io/v1/delivery")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = '<content-type>'
request.body = "{\n \"ftp_fields.host\": \"<string>\",\n \"ftp_fields.port\": 123,\n \"ftp_fields.username\": \"<string>\",\n \"ftp_fields.password\": \"<string>\",\n \"ftp_fields.directory\": \"<string>\",\n \"ftp_fields.is_active\": true\n}"
response = http.request(request)
puts response.read_body{
"ftp_fields.host": "<string>",
"ftp_fields.port": 123,
"ftp_fields.username": "<string>",
"ftp_fields.password": "<string>",
"ftp_fields.directory": "<string>",
"ftp_fields.is_active": true
}Delivery
Configure SFTP Delivery
Set up secure SFTP server delivery for squid run results
POST
/
v1
/
delivery
Configure SFTP Delivery
curl --request POST \
--url https://api.lobstr.io/v1/delivery \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"ftp_fields.host": "<string>",
"ftp_fields.port": 123,
"ftp_fields.username": "<string>",
"ftp_fields.password": "<string>",
"ftp_fields.directory": "<string>",
"ftp_fields.is_active": true
}
'import requests
url = "https://api.lobstr.io/v1/delivery"
payload = {
"ftp_fields.host": "<string>",
"ftp_fields.port": 123,
"ftp_fields.username": "<string>",
"ftp_fields.password": "<string>",
"ftp_fields.directory": "<string>",
"ftp_fields.is_active": True
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "<content-type>"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': '<content-type>'},
body: JSON.stringify({
'ftp_fields.host': '<string>',
'ftp_fields.port': 123,
'ftp_fields.username': '<string>',
'ftp_fields.password': '<string>',
'ftp_fields.directory': '<string>',
'ftp_fields.is_active': true
})
};
fetch('https://api.lobstr.io/v1/delivery', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.lobstr.io/v1/delivery",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'ftp_fields.host' => '<string>',
'ftp_fields.port' => 123,
'ftp_fields.username' => '<string>',
'ftp_fields.password' => '<string>',
'ftp_fields.directory' => '<string>',
'ftp_fields.is_active' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: <content-type>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.lobstr.io/v1/delivery"
payload := strings.NewReader("{\n \"ftp_fields.host\": \"<string>\",\n \"ftp_fields.port\": 123,\n \"ftp_fields.username\": \"<string>\",\n \"ftp_fields.password\": \"<string>\",\n \"ftp_fields.directory\": \"<string>\",\n \"ftp_fields.is_active\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
req.Header.Add("Content-Type", "<content-type>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.lobstr.io/v1/delivery")
.header("Authorization", "<authorization>")
.header("Content-Type", "<content-type>")
.body("{\n \"ftp_fields.host\": \"<string>\",\n \"ftp_fields.port\": 123,\n \"ftp_fields.username\": \"<string>\",\n \"ftp_fields.password\": \"<string>\",\n \"ftp_fields.directory\": \"<string>\",\n \"ftp_fields.is_active\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lobstr.io/v1/delivery")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = '<content-type>'
request.body = "{\n \"ftp_fields.host\": \"<string>\",\n \"ftp_fields.port\": 123,\n \"ftp_fields.username\": \"<string>\",\n \"ftp_fields.password\": \"<string>\",\n \"ftp_fields.directory\": \"<string>\",\n \"ftp_fields.is_active\": true\n}"
response = http.request(request)
puts response.read_body{
"ftp_fields.host": "<string>",
"ftp_fields.port": 123,
"ftp_fields.username": "<string>",
"ftp_fields.password": "<string>",
"ftp_fields.directory": "<string>",
"ftp_fields.is_active": true
}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
string
required
Your API authentication token. Value:
Token YOUR_API_KEYstring
required
Must be application/json. Value:
application/jsonQuery Parameters
string
required
The unique identifier (hash) of the squid for which to configure SFTP delivery. Example:
c106a44a98044ef18acc59986ae10967Request Body
string
required
SFTP server hostname or IP address. Example:
"sftp.example.com"integer
required
SFTP server port number (default is 22). Example:
22string
required
Username for SFTP authentication. Example:
"user"string
required
Password for SFTP authentication. Example:
"myC00lP@ssword"string
required
Target directory path on the SFTP server where files will be uploaded. Example:
"/upload/path"boolean
required
Set to true to enable SFTP delivery, false to disable. Example:
trueResponse Field Explanations
string
SFTP server hostname. Example:
"sftp.example.com"integer
SFTP server port. Example:
22string
SFTP username. Example:
"user"string
SFTP password (returned in response). Example:
"myC00lP@ssword"string
Target directory path. Example:
"/upload/path"boolean
Whether SFTP delivery is active. Example:
trueEnsure 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
}
}'
import requests
url = "https://api.lobstr.io/v1/delivery"
headers = {
"Authorization": "Token YOUR_API_KEY",
"Content-Type": "application/json"
}
params = {
"squid": "YOUR_SQUID_HASH"
}
payload = {
"ftp_fields": {
"host": "sftp.example.com",
"port": 22,
"username": "user",
"password": "password",
"directory": "/upload/path",
"is_active": True
}
}
response = requests.post(url, headers=headers, params=params, json=payload)
result = response.json()
print("SFTP delivery configured successfully!")
print(f"Host: {result['ftp_fields']['host']}")
print(f"Port: {result['ftp_fields']['port']}")
print(f"Username: {result['ftp_fields']['username']}")
print(f"Directory: {result['ftp_fields']['directory']}")
print(f"Active: {result['ftp_fields']['is_active']}")
Response
201
{
"ftp_fields": {
"host": "sftp.example.com",
"port": 22,
"username": "user",
"password": "password",
"directory": "/upload/path"
}
}
⌘I