Manage your Folders

Posted Jan 10 2022 13:50:58 in API
To access files via our API you'll need an api_key, which is available on our Business plan, and can be found here

Using the API, you can get, create & delete folders.

Get a folder by ID

  
$ curl -X GET "https://ufile.io/v1/folders/FOLDER_ID" \
-H "X-API-KEY: YOUR_API_KEY"
  

Response Example

  
{
  "id": "47866",
  "user_id": "1",
  "name": "my folder",
  "slug": "vf5c4",
  "public": "1",
  "folder_id": null, // parent folder
  "is_deleted": "0",
  "session_id": "abc",
  "allow_uploads": "0"
}
  

List Folders


$ curl -X GET "https://ufile.io/v1/folders/" \
-H "X-API-KEY: YOUR_API_KEY"
Optional GET params: "folder_id" - E.G - https://ufile.io/v1/folders/?folder_id=123 to return all sub folders from folder 123

Response Example

  
[
  {
    "id": "46303",
    "user_id": "1",
    "name": "My public folder",
    "slug": "b8pci",
    "public": "1",
    "folder_id": null,
    "is_deleted": "0",
    "session_id": null,
    "allow_uploads": "1"
  },
  {...}
]
  

Create Folder

  
$ curl -X POST "https://ufile.io/v1/folders/" \
-H "X-API-KEY: YOUR_API_KEY"
  
Optional POST params: "folder_id", "name", "public"

Response Example

  
[
  {
    "id": "46303",
    "user_id": "1",
    "name": "My public folder",
    "slug": "b8pci",
    "public": "1",
    "folder_id": null,
    "is_deleted": "0",
    "session_id": null,
    "allow_uploads": "1"
  },
  {...}
]
  

Delete Folder

  
$ curl -X DELETE "https://ufile.io/v1/folders/FOLDER_ID" \
-H "X-API-KEY: YOUR_API_KEY"
  

More recent stories

Jan 10 2022 13:50:58
How do I cancel my subscription?
Read More
Jan 10 2022 13:50:58
How secure is Uploadfiles?
Read More

Ready to go Pro?

Signup today and unlock all our features