Upload a file
Upload a file to your secure file transfer area.
Request
import requests
data = {
"file": "https://www.stannp.com/assets/samples/letter-heading.webp",\n "folder": "0",\n
}
response = requests.post("https://api-eu1.stannp.com/v1/files/upload?api_key={API_KEY}", data=data)
print(response.text)
Response
{ "success": true, "data": { "id": "342" } }
Create a folder
Create a folder in your secure file transfer area.
Request
import requests
data = {
"name": "Test Folder",\n
}
response = requests.post("https://api-eu1.stannp.com/v1/files/createFolder?api_key={API_KEY}", data=data)
print(response.text)
Response
{ "success": true, "data": "342" }
List folders
Get a list of the folders in your secure file transfer area.
Request
import requests
response = requests.get("https://api-eu1.stannp.com/v1/files/folders?api_key={API_KEY}")
print(response.text)
Response
{ "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" } ] }