Files API - Stannp Direct Mail API Documentation

Upload File

Upload a file to your account for use in campaigns.

[POST]
https://api-us1.stannp.com/v1/files/upload

Parameters

ParameterTypeDescription
filestringThis value can be either a binary file or a URL to a file.
folderintA folder ID for placing the file in a folder.

Request Example

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

    

Response Example

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

Create Folder

Create a new folder to organize your files.

[POST]
https://api-us1.stannp.com/v1/files/createFolder

Parameters

ParameterTypeDescription
namestringThe name of the folder you wish to create.

Request Example

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

    

Response Example

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

List Folders

Retrieve a list of all folders in your account.

[GET]
https://api-us1.stannp.com/v1/files/folders

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"
    }
  ]
}