---
title: SFTP API
date: 2025-12-10T05:26:47Z
modified: 2026-06-15T05:59:15Z
permalink: "https://ezintegrations.ai/docs/sftp-api-for-file-transfer/"
type: docs
status: publish
excerpt: ""
wpid: 3288
doc_category:
  - SFTP API
author: Arun Thakur
---

## **Introducing Secure File Transfer Protocol – SFTP API**

With our state-of-the-art SFTP APIs, connecting to any server and effortlessly managing your files has never been more straightforward!

**Unmatched Security:** Rest easy, knowing your data is in safe hands. Our SFTP APIs ensure your files are transferred with the utmost security, protecting your sensitive information from prying eyes.

**Effortless Connectivity:** Seamlessly connect to servers and automate your file management tasks with ease. Our user-friendly APIs empower developers to read, write, and delete files efficiently, eliminating the hassle of manual operations.

**Efficient File Operations:** Experience file transfers like never before! you can **Read,Write and Delete** files. Our SFTP APIs deliver lightning-fast performance, optimizing your productivity and simplifying your workflow.

**Boost Your Productivity:** Embrace the power of automation! Our SFTP APIs enable you to automate repetitive file operations, freeing up valuable resources and allowing your team to focus on more strategic tasks.

**Body Parameters :** By configuring the provided parameters in the body, users gain seamless access to SFTP servers, enabling them to effortlessly perform essential file management operations, including **reading, writing, and deleting files.**

- **“hostname”:** This is the hostname or IP address of the SFTP server to which you want to connect.
- **“username”:** The username used for authentication when connecting to the SFTP server.
- **“auth\_type”:** The authentication type to be used when connecting. In this case, it is set to “password”, indicating that password-based authentication will be used.
- **“password”:** The password associated with the username for password-based authentication. Please note that using passwords for authentication may not be as secure as using public-private key pairs (pem\_key) for authentication.
- **“port”:** The port number on which the SFTP server is listening. The default port for SFTP is 22, which is commonly used for SSH connections.
- **“pem\_key”:** This field is used for public-private key-based authentication. It should contain the contents of the private key (PEM format) if you choose to use key-based authentication instead of password-based authentication.
- **“dataset”:** This is the file content you want to transfer to the SFTP server. It can be a string containing the file content or binary data.
- **“file\_to\_path”:** The path on the SFTP server where you want to place the file. This specifies the destination path for the file transfer.
- **“mode”:** The mode in which the file should be transferred. possible modes could include “r” for reading (downloading), “d” for deleting files, and “w” for writing.
- **“passphrase”:** If the private key (pem\_key) used for authentication is encrypted with a passphrase, you can provide it here.

---

POST Token







**Endpoint:**

{{base_url}}/token
This endpoint is used to retrieve an authentication token from the API. The token serves as an authorization mechanism to access and interact with the various API endpoints.

### Body (form-data)

- **username:** {{Username}}
- **password:** {{Password}}

---

## POST – Write Files (with username and password)

**Endpoint:**

{{base_url}}/SFTPWrite
### Authorization

OAuth 2.0

### Request Headers

- **Content-Type:** application/json
- **Authorization:** Bearer {{token}}

### Body (raw JSON)

Note: The default port number is 22. Users can set the port number based on the server they want to connect.

{
  "hostname":"{{host_name}}",
  "username":"{{user_name}}",
  "auth_type":"password",
  "password":"{{password}}",
  "port":22,
  "pem_key":"",
  "dataset":"{{file_content}}",
  "file_to_path":"{{file_path}}",
  "mode":"w",
  "passphrase":"{{pass_phrase}}"
}
---

## POST – Write Files (with username and PEM key)

**Endpoint:**

{{base_url}}/SFTPWrite
### Authorization

OAuth 2.0

### Request Headers

- **Content-Type:** application/json
- **Authorization:** Bearer {{token}}

### Body (raw JSON)

Note: The default port number is 22. Users can set the port number based on the server they want to connect.

{
  "hostname":"{{host_name}}",
  "username":"{{user_name}}",
  "auth_type":"pem_key",
  "password":"",
  "port":22,
  "pem_key":"{{pem_key}}",
  "dataset":"{{file_content}}",
  "file_to_path":"{{file_location}}",
  "mode":"w",
  "passphrase":"{{pass_phrase}}"
}
---

## POST – Read Files (with username and password)

**Endpoint:**

{{base_url}}/SFTPRead
### Authorization

OAuth 2.0

### Request Headers

- **Content-Type:** application/json
- **Authorization:** Bearer {{token}}

### Body (raw JSON)

Note: The default port number is 22. Users can set the port number based on the server they want to connect.

{
  "hostname":"{{host_name}}",
  "username":"{{user_name}}",
  "auth_type":"password",
  "password":"{{password}}",
  "port":22,
  "pem_key":"",
  "file_to_path":"{{file_path}}",
  "mode":"r",
  "passphrase":"{{pass_phrase}}"
}
---

## POST – Read Files (with username and PEM key)

**Endpoint:**

{{base_url}}/SFTPRead
### Authorization

OAuth 2.0

### Request Headers

- **Content-Type:** application/json
- **Authorization:** Bearer {{token}}

### Body (raw JSON)

Note: The default port number is 22. Users can set the port number based on the server they want to connect.

{
  "hostname":"{{host_name}}",
  "username":"{{user_name}}",
  "auth_type":"pem_key",
  "password":"",
  "port":22,
  "pem_key":"{{pem_key}}",
  "file_to_path":"{{file_path}}",
  "mode":"r",
  "passphrase":"{{pass_phrase}}"
}
---

## POST – Delete Files (with username and password)

**Endpoint:**

{{base_url}}/SFTPDelete
### Authorization

OAuth 2.0

### Request Headers

- **Content-Type:** application/json
- **Authorization:** Bearer {{token}}

### Body (raw JSON)

Note: The default port number is 22. Users can set the port number based on the server they want to connect.

{
  "hostname":"{{host_name}}",
  "username":"{{user_name}}",
  "auth_type":"password",
  "password":"{{password}}",
  "port":22,
  "pem_key":"",
  "file_to_path":"{{file_path}}",
  "passphrase":"{{pass_phrase}}"
}
---

## POST – Delete Files (with username and PEM key)

**Endpoint:**

{{base_url}}/SFTPDelete
### Authorization

OAuth 2.0

### Request Headers

- **Content-Type:** application/json
- **Authorization:** Bearer {{token}}

### Body (raw JSON)

Note: The default port number is 22. Users can set the port number based on the server they want to connect.

{
  "hostname":"{{host_name}}",
  "username":"{{user_name}}",
  "auth_type":"pem_key",
  "password":"",
  "port":22,
  "pem_key":"{{pem_key}}",
  "file_to_path":"{{file_path}}",
  "passphrase":"{{pass_phrase}}"
}
---

## POST – Read Folder (with username and password)

**Endpoint:**

{{base_url}}/SFTPRead/Folder
### Authorization

OAuth 2.0

### Request Headers

- **Content-Type:** application/json
- **Authorization:** Bearer {{token}}

### Body (raw JSON)

Note: The default port number is 22. Users can set the port number based on the server they want to connect.

{
  "hostname":"{{host_name}}",
  "username":"{{user_name}}",
  "auth_type":"password",
  "password":"{{password}}",
  "port":22,
  "pem_key":"",
  "file_to_path":"{{file_path}}",
  "passphrase":"{{passphrase}}"
}
---

## POST – Read Folder (with username and pem-key)

**Endpoint:**

{{base_url}}/SFTPRead/Folder
### Authorization

OAuth 2.0

### Request Headers

- **Content-Type:** application/json
- **Authorization:** Bearer {{token}}

### Body (raw JSON)

Note: The default port number is 22. Users can set the port number based on the server they want to connect.

{
  "hostname":"{{host_name}}",
  "username":"{{user_name}}",
  "auth_type":"pem_key",
  "password":"",
  "port":22,
  "pem_key":"{{pem_key}}",
  "file_to_path":"{{file_path}}",
  "passphrase":"{{pass_phrase}}"
}
### Note:

For Base URL, Username, Password, PEM key, or other queries related to the SFTP API, please reach out to our support team:

- Email: <support@bizdata360.com>

## Topics

**Docs Categories:** [SFTP API](https://ezintegrations.ai/wp-content/uploads/wp-mfa-exports/taxonomy/doc_category/sftp-api.md)