APIs
Click the button below to redirect to Postman
Get Folder Detail
GET https://your-site.com/wp-json/filebird/public/v1/folder/?folder_id=
Get detail of folder by folder_id
Query Parameters
folder_id
integer
The folder id
Headers
Authorization
string
Bearer Token
{
  "success": true,
  "data": {
    "folder": {
      "id": "1690",
      "name": "Cats",
      "parent": "0"
    }
  }
}{
  "code": "rest_forbidden",
  "message": "Sorry, you are not allowed to do that.",
  "data": {
    "status": 401
}Get Folders
GET https://your-site.com/wp-json/filebird/public/v1/folders
This endpoint allows you to get folders
Headers
Authorization
string
Bearer Token
{
    "success": true,
    "data": {
        "folders": [
            {
                "id": 1087,
                "text": "Bird",
                "children": [],
                "li_attr": {
                    "data-count": 1,
                    "data-parent": 0
                },
                "count": 19
            },
            {
                "id": 1088,
                "text": "Cat",
                "children": [],
                "li_attr": {
                    "data-count": 1,
                    "data-parent": 0
                },
                "count": 14
            },
            {
                "id": 1089,
                "text": "Dog",
                "children": [],
                "li_attr": {
                    "data-count": 1,
                    "data-parent": 0
                },
                "count": 23
            }
        ]
    }
}{
  "code": "rest_forbidden",
  "message": "Sorry, you are not allowed to do that.",
  "data": {
    "status": 401
  }
}Create New Folder
POST https://your-site.com/wp-json/filebird/public/v1/folders
This endpoint allows you to create new folder.
Headers
Authorization
string
Bearer Token
Request Body
name
string
Your folder name.
parent_id
integer
The parent id of your folder. 0 for parent.
{
    "success": true,
    "data": {
        "id": 40
    }
}{
    "code": "rest_forbidden",
    "message": "Sorry, you are not allowed to do that.",
    "data": {
        "status": 401
}Get Attachment Ids by Folder Id
GET https://your-site.com/wp-json/filebird/public/v1/attachment-id/?folder_id=
This endpoint allows you to get Attachment IDs by folder_id
Query Parameters
folder_id
integer
Your Folder Id
Headers
Authorization
string
Bearer Token
{
    "success": true,
    "data": {
        "attachment_ids": [
            "8",
            "30"
        ]
    }
}{
    "code": "rest_forbidden",
    "message": "Sorry, you are not allowed to do that.",
    "data": {
        "status": 401
}Add attachment(s) to folder
POST https://your-site.com/wp-json/filebird/public/v1/folder/set-attachment
Headers
Authorization
string
Bearer Token
Request Body
folder
number
The folder id
ids
number
The attachment ID, it could be a number or an array
{
    "success": true
}{
    "code": "rest_forbidden",
    "message": "Sorry, you are not allowed to do that.",
    "data": {
        "status": 401
    }
}Get Attachment Count by Folder Id
GET https://your-site.com/wp-json/filebird/public/v1/attachment-count/?folder_id=
folder_id=-1 for All Folder
folder_id=0 for Uncategorized Folder
{
  "success": true,
  "data": {
    "count": 1
  }
}Last updated
Was this helpful?
