Use SFTP to Upload Audience Lists

You can upload audience lists directly to Airship using SFTP.

Many customer relationship management (CRM) platforms export data as CSV files. You can take advantage of Airship’s SFTP interface to quickly and easily upload and ingest lists from your CRM and send messages to specific groups of people.

SFTP takes advantage of the Airship Lists API. The list format for this API represents the same list format for lists that you want to upload to Airship over SFTP.

You can use Airship’s SFTP interface at sftp.airship.com:5222 (sftp.airship.eu:5222 for customers in our EU environment). To create audience lists in Airship using SFTP, you need:

  • An FTP/SFTP client: Many CRM platforms support SFTP directly, or you can use a client like FileZilla.
  • SSH keys: Airship’s implementation of SFTP uses public key authentication.
  • A properly formatted list.

Formatting your CSV

Uploaded lists must be in CSV format. CSV files can contain up to 10 million Named UsersA customer-provided identifier used for mapping multiple devices and channels to a particular user. or channel IDs, and be up to 1.5 GB. Each row in the CSV must be an identifier_type,UUID pair.

The identifier_type is one of: named_user, ios_channel, android_channel, amazon_channel, sms_channel, email_channel, open_channel, or web_channel.

The identifier is the associated named_user_id or channel_id.

named_user,customer-42
named_user,room-27
ios_channel,5i4c91s5-9tg2-k5zc-m592150z5634
web_channel,d132f5b7-abcf-4920-aeb3-9132ddac3d5a
android_channel,52b2b587-0152-4134-a8a0-38ae6933c88a

Generate a Secure key for Airship

You may be able to export your list directly to Airship if the platform you want to export lists from supports SFTP. If not, you’ll need to use a third-party client.

Airship’s SFTP implementation uses SSH key pairs for authentication. You will create a pair of keys: a private key for your client and a public key for Airship.

  1. Generate a public key.

    Windows-based clients
    1. Download and run PuTTYgen.exe.
    2. Select RSA in the Parameters section near the bottom of the page and click Generate.
    3. Move the mouse around in the blank area, as instructed, until PuTTYgen generates the key pair. When PuTTYgen generates the key, it replaces the blank area with a series of text boxes, including one that shows the public key.
    4. Click Save public key and select the directory where you want to save your public key.
    5. Click Save private key and save the private key in the same folder as your public key.
    6. Copy your Public key. You’ll provide this key to Airship in later steps. Make sure to copy the entire key, starting with ssh-rsa.
    MacOS and Linux-based clients
    1. Open your terminal.
    2. At the command line, enter ssh-keygen -t rsa. You can set other options, but the key type must be set to RSA (-t rsa).
    3. Enter the directory and filename for your new keys.

    This process generates two files based on the filename you provide, <filename> and <filename>.pub. (By default, these files are id_rsa and id_rsa.pub respectively.) You will need to copy the contents of your .pub file to provide Airship with your public key.

  2. In the Airship dashboard, go to Settings » APIs & Integrations » SFTP.

  3. Click Add Key.

  4. Enter a Name for the token. This helps you identify the token in Airship.

  5. Paste the contents of your <filename>.pub key file (or the <filename>.ppk file for Windows users) in the Public Key field.

  6. Click Save Key.

Set up Your Client and Transfer CSVs

Many CRM platforms natively support SFTP. You can set up any client to use Airship’s SFTP interface with the following settings:

  • Host: sftp.airship.com (sftp.airship.eu for EU customers)
  • Port: 5222
  • Authentication: Your private key (the key file that does not end in .pub for MacOS/Linux users, or .ppk for Windows users) and the User Name that Airship generated for you when you uploaded your public key.

After your connection is set up, you can transfer CSV lists to Airship. Your lists will appear in the Airship dashboard under Audience » Lists » Uploaded. When you send a message, select the Target Specific Users audience option and select your list.