Overview
Secure File Transfer Protocol (SFTP) is a network protocol for securely accessing, transferring, and managing large files and sensitive data over any reliable data stream. Designed by the Internet Engineering Task Force as an extension of Secure Shell (SSH) version 2.0, SFTP provides secure file transfer capabilities.How Does MoEngage Work with SFTP?
MoEngage allows customers to automatically import users and events from their SFTP servers and export events from MoEngage through flat files. Integration with SFTP servers allows MoEngage to:- Share periodic exports of campaign interaction events in JSON format.
- Support for Username + Password and Username + SSH Key auth.
- Support for hosts Virtual Private Cloud (VPC) or private endpoints.
Integration
PrerequisitesMake sure you have the necessary connection access to your SFTP server.
Configure a New SFTP Connection
To import data from or export data to SFTP servers, you must configure a connection between MoEngage and your SFTP server. To create a new SFTP connection, perform the following steps:- On the left navigation menu on the MoEngage UI, click App marketplace.
- On the App marketplace page, in the search bar, type SFTP.
- Click the SFTP tile. The SFTP page appears.

- Go to the Integrate tab, and then click + Add connection.
- In the Connection details section, enter the following details:
- You can click Test connect to verify the credentials and test your details before saving the connection. When you’re ready, click Connect to save the connection and proceed.
If you generate a new key for rotation, you must test the connection successfully to complete the rotation, or MoEngage will continue using the old Key.
Manage Your SFTP Key (Key Rotation)
MoEngage also supports key rotation. If your IT policy requires you to rotate the keys, you can do it by performing the following steps:- Go to the App marketplace > SFTP > Integrate and edit the connection.
- Click the Generate new key icon
. The Generate a new key pop-up window appears, prompting you to review the instructions. Note: Read the instructions carefully. After you save the connection with the newly generated key, MoEngage will no longer use the previous key. You must ensure that the new key is added to your SFTP server so the rotation works properly. If the new key is not added after saving the connection, your imports and exports might break. 
- Click Generate new key. After MoEngage successfully generates the key, a confirmation message is displayed. MoEngage highly recommends that you copy this new key using the
icon and attach it as an additional key to your SFTP server. You can also download the key using the
icon. After attaching the new key, you must test the connection successfully to complete the rotation. Note: If you generate a new key for rotation, you must test the connection successfully to complete the rotation, or MoEngage will continue using the old key.
