Update SFTP connection
curl --request PUT \
--url https://api.creditor.younegotiate.com/sftp/{sftpConnection} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Updated SFTP Connection",
"host": "sftp.example.com",
"port": 22,
"username": "sftp_user",
"used_for": "export",
"export_filepath": "/exports"
}
'import requests
url = "https://api.creditor.younegotiate.com/sftp/{sftpConnection}"
payload = {
"name": "Updated SFTP Connection",
"host": "sftp.example.com",
"port": 22,
"username": "sftp_user",
"used_for": "export",
"export_filepath": "/exports"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Updated SFTP Connection',
host: 'sftp.example.com',
port: 22,
username: 'sftp_user',
used_for: 'export',
export_filepath: '/exports'
})
};
fetch('https://api.creditor.younegotiate.com/sftp/{sftpConnection}', 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.creditor.younegotiate.com/sftp/{sftpConnection}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Updated SFTP Connection',
'host' => 'sftp.example.com',
'port' => 22,
'username' => 'sftp_user',
'used_for' => 'export',
'export_filepath' => '/exports'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.creditor.younegotiate.com/sftp/{sftpConnection}"
payload := strings.NewReader("{\n \"name\": \"Updated SFTP Connection\",\n \"host\": \"sftp.example.com\",\n \"port\": 22,\n \"username\": \"sftp_user\",\n \"used_for\": \"export\",\n \"export_filepath\": \"/exports\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.creditor.younegotiate.com/sftp/{sftpConnection}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Updated SFTP Connection\",\n \"host\": \"sftp.example.com\",\n \"port\": 22,\n \"username\": \"sftp_user\",\n \"used_for\": \"export\",\n \"export_filepath\": \"/exports\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.creditor.younegotiate.com/sftp/{sftpConnection}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Updated SFTP Connection\",\n \"host\": \"sftp.example.com\",\n \"port\": 22,\n \"username\": \"sftp_user\",\n \"used_for\": \"export\",\n \"export_filepath\": \"/exports\"\n}"
response = http.request(request)
puts response.read_body{
"message": "SFTP connected.",
"data": {
"id": 123,
"company_id": 123,
"name": "<string>",
"host": "<string>",
"port": 123,
"enabled": true,
"username": "<string>",
"password_present": true,
"import_filepath": "<string>",
"export_filepath": "<string>",
"csv_headers_count": 123,
"can_delete": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"message": "<string>"
}{
"message": "An active membership is required."
}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}Update SFTP connection
Update an SFTP connection profile in the authenticated creditor company. Omit or blank password to keep the existing password. Remote validation is run when host, port, username, or password changes. Switching used_for clears the now-unused path.
PUT
/
sftp
/
{sftpConnection}
Update SFTP connection
curl --request PUT \
--url https://api.creditor.younegotiate.com/sftp/{sftpConnection} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Updated SFTP Connection",
"host": "sftp.example.com",
"port": 22,
"username": "sftp_user",
"used_for": "export",
"export_filepath": "/exports"
}
'import requests
url = "https://api.creditor.younegotiate.com/sftp/{sftpConnection}"
payload = {
"name": "Updated SFTP Connection",
"host": "sftp.example.com",
"port": 22,
"username": "sftp_user",
"used_for": "export",
"export_filepath": "/exports"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Updated SFTP Connection',
host: 'sftp.example.com',
port: 22,
username: 'sftp_user',
used_for: 'export',
export_filepath: '/exports'
})
};
fetch('https://api.creditor.younegotiate.com/sftp/{sftpConnection}', 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.creditor.younegotiate.com/sftp/{sftpConnection}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Updated SFTP Connection',
'host' => 'sftp.example.com',
'port' => 22,
'username' => 'sftp_user',
'used_for' => 'export',
'export_filepath' => '/exports'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.creditor.younegotiate.com/sftp/{sftpConnection}"
payload := strings.NewReader("{\n \"name\": \"Updated SFTP Connection\",\n \"host\": \"sftp.example.com\",\n \"port\": 22,\n \"username\": \"sftp_user\",\n \"used_for\": \"export\",\n \"export_filepath\": \"/exports\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.creditor.younegotiate.com/sftp/{sftpConnection}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Updated SFTP Connection\",\n \"host\": \"sftp.example.com\",\n \"port\": 22,\n \"username\": \"sftp_user\",\n \"used_for\": \"export\",\n \"export_filepath\": \"/exports\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.creditor.younegotiate.com/sftp/{sftpConnection}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Updated SFTP Connection\",\n \"host\": \"sftp.example.com\",\n \"port\": 22,\n \"username\": \"sftp_user\",\n \"used_for\": \"export\",\n \"export_filepath\": \"/exports\"\n}"
response = http.request(request)
puts response.read_body{
"message": "SFTP connected.",
"data": {
"id": 123,
"company_id": 123,
"name": "<string>",
"host": "<string>",
"port": 123,
"enabled": true,
"username": "<string>",
"password_present": true,
"import_filepath": "<string>",
"export_filepath": "<string>",
"csv_headers_count": 123,
"can_delete": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"message": "<string>"
}{
"message": "An active membership is required."
}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
SFTP connection ID.
Body
application/json
Maximum string length:
160Maximum string length:
255Maximum string length:
255Available options:
import, export, both Required range:
1 <= x <= 65535Omit or send blank to keep the existing password.
Maximum string length:
255Required when used_for is import or both.
Maximum string length:
255Required when used_for is export or both.
Maximum string length:
255Last modified on July 20, 2026
Was this page helpful?
⌘I

