We use standard HTTP Authentication over HTTPS to authorize your requests. First you'll need to sign up and then generate a new API key in your account. Once you have an API key, you can generate a request to the server like so:
wget -qO /dev/stdout \
--user "{{your token}}" \
--password "{{your secret}}" \
https://app.simplefileupload.com/api/v1/teams
Action | Method | Path |
---|---|---|
Fetch all files | GET |
/api/v1/files |
Action | Method | Path |
---|---|---|
Delete a File by URL | DELETE |
/api/v1/file with params {url: file.url} |
Delete a File by ID | DELETE |
api/v1/files/:id |
Send in the file url. This immediately and permanently deletes the file.
wget -qO /dev/stdout \
--user "{{your token}}" \
--password "{{your secret}}" \
--method=DELETE \
https://app.simplefileupload.com/api/v1/file?url="https://subdomain.simplefileupload.com...."
Whether you're deleting a file or getting a list of file URLS, this is the structure you should expect:
"data": [
{
"id": "56",
"type": "files",
"attributes": {
"cdn-url": "https://subdomain.files-simplefileupload.com/static/blobs/proxy/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBRQT09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--3a838b25b0cd8c759142f36d9be2cbb95c8c5701/paul-gilmore-DgRbZSWej-o-unsplash.jpg",
"file-size": 1078900,
"filename": "paul-gilmore-DgRbZSWej-o-unsplash",
"created-at": "YYYY-MM-DD",
"tag": {
"id": null,
"name": "null"
}
}
}
]
Action | Method | Path |
---|---|---|
Fetch all Tags | GET |
/api/v1/tags |
Action | Method | Path |
---|---|---|
Get all details of a Tag | GET |
/api/v1/tags/1 |
This is the structure you should expect for the tag response:
{
"data": [
{
"id": "16",
"type": "tags",
"attributes": {
"name": "website-files"
},
"relationships": {
"files": {
"data": [
{
"id": "97",
"type": "files"
},
{
"id": "98",
"type": "files"
}
]
}
}
},
]
}
Action | Method | Path |
---|---|---|
Upload File | POST |
/api/v1/file |
curl https://app.simplefileupload.com/api/v1/file -F "file=@/path_to/image_11.jpg" -u TOKEN:SECRET
This is the structure you should expect for the file upload response:
"data": [
{
"id": "56",
"type": "files",
"attributes": {
"cdn-url": "https://subdomain.files-simplefileupload.com/static/blobs/proxy/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBRQT09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--3a838b25b0cd8c759142f36d9be2cbb95c8c5701/paul-gilmore-DgRbZSWej-o-unsplash.jpg",
"file-size": 9182,
"filename": "image_11",
"created-at": "2023-01-30",
"tag": {
"id": null,
"name": "null"
}
}
}
]
curl https://app.simplefileupload.com/api/v1/file -F "file=@/path_to/image_11.jpg" -F "tag=my_tag" -u TOKEN:SECRET
This is the structure you should expect for the file upload response:
"data": [
{
"id": "56",
"type": "files",
"attributes": {
"cdn-url": "https://subdomain.files-simplefileupload.com/static/blobs/proxy/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBRQT09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--3a838b25b0cd8c759142f36d9be2cbb95c8c5701/paul-gilmore-DgRbZSWej-o-unsplash.jpg",
"file-size": 9182,
"filename": "image_11",
"created-at": "2023-01-30",
"tag": {
"id": 2,
"name": "my_tag"
}
}
}
]