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

NameTypeDescription

folder_id

integer

The folder id

Headers

NameTypeDescription

Authorization

string

Bearer Token

{
  "success": true,
  "data": {
    "folder": {
      "id": "1690",
      "name": "Cats",
      "parent": "0"
    }
  }
}

Get Folders

GET https://your-site.com/wp-json/filebird/public/v1/folders

This endpoint allows you to get folders

Headers

NameTypeDescription

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

Create New Folder

POST https://your-site.com/wp-json/filebird/public/v1/folders

This endpoint allows you to create new folder.

Headers

NameTypeDescription

Authorization

string

Bearer Token

Request Body

NameTypeDescription

name

string

Your folder name.

parent_id

integer

The parent id of your folder. 0 for parent.

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

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

NameTypeDescription

folder_id

integer

Your Folder Id

Headers

NameTypeDescription

Authorization

string

Bearer Token

{
    "success": true,
    "data": {
        "attachment_ids": [
            "8",
            "30"
        ]
    }
}

Add attachment(s) to folder

POST https://your-site.com/wp-json/filebird/public/v1/folder/set-attachment

Headers

NameTypeDescription

Authorization

string

Bearer Token

Request Body

NameTypeDescription

folder

number

The folder id

ids

number

The attachment ID, it could be a number or an array

{
    "success": true
}

set folder = 0 to move images from those folders to Uncategorized

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