Stannp | Direct Mail Marketing Platform
package icon
Choose the right postage when sending on the API Are you sending personal information, or marketing content? Before you send your mail, know the key difference between First-Class and USPS Marketing Mail. Read our blog to find out more.

Files

Upload and manage files for use in templates and mailings.

Upload a file

Upload a file to your secure file transfer area.

POST

Parameters

ParameterDetailsDescription
file
str required
This value can be either a binary file or a URL to a file.
folder
int optional
A folder ID for placing the file in a folder.

Request Example

curl "https://api-us1.stannp.com/v1/files/upload" \
  -u {API_KEY}: \
  -d "file=https://www.stannp.com/assets/samples/letter-heading.webp" \
  -d "folder=0"

Response Example

{
  "success": true,
  "data": {
    "id": "342"
  }
}

Create a folder

Create a folder in your secure file transfer area.

POST

Parameters

ParameterDetailsDescription
name
str required
The name of the folder you wish to create.

Request Example

curl "https://api-us1.stannp.com/v1/files/createFolder" \
  -u {API_KEY}: \
  -d "name=Test Folder"

Response Example

{
  "success": true,
  "data": "342"
}

List folders

Get a list of the folders in your secure file transfer area.

GET

Request Example

curl "https://api-us1.stannp.com/v1/files/folders" \
  -u {API_KEY}:

Response Example

{
  "success": true,
  "data": [
    {
      "id": "2",
      "name": "test folder",
      "created": "2017-06-27 14:24:07"
    },
    {
      "id": "15",
      "name": "test folder 2",
      "created": "2017-06-27 14:26:23"
    }
  ]
}