FileBird
FileBird
FileBird
  • Getting Started
    • System Requirements
    • How to Install
    • License
      • Activate license
      • Move license
      • Local/Staging sites
    • Migrate to FileBird
    • How to Update
      • Manually Update
      • Auto Update
  • Free & Pro
    • Premium License
  • Features
    • Interface
      • Sidebar
      • View file location
      • Folder tree themes
      • Folder color
      • Breadcrumb
      • File count
    • Left Section of the Library
      • Divider Icon
      • File and Folder Sorting
      • Bulk Select Folders
      • Folders Searching
      • Drag and Drop Function
      • Right Click Function
      • How to Upload Folders and Files
      • How to Download Folders and Files
      • Set default startup folder
    • Right Section of the Library
      • Showing Specific File Type
      • Bulk Select Option
      • Search Field
    • Custom Post Types
    • Insert Files into Posts
    • Insert Files into Pages
    • Gutenberg Image Gallery
    • User-Based Folders
    • Sort Files by Size
    • Sort Files by Created Date
  • Settings
    • Import/Export
      • Media Folders
      • Post Types Folders
      • Backup
    • Reset to Default
    • Update Database
    • Uninstall and Delete
  • Addons
    • FileBird Document Library
      • Settings
        • Single type
        • Hierarchical type
      • Shortcode
        • Embed in Elementor
      • Show File Count in Nested Folders
      • Thumbnails
      • Translation
      • Free vs Pro
      • Changelog
    • FileBird Document Library for Members
    • FileBird Cloud
      • Dropbox integration
      • Google Drive integration
      • Google Photos
      • Changelog
  • Integrations
    • WPML
    • Polylang
    • JetEngine
    • Compatibility
      • Flatsome UX Builder
    • Developer zone
      • APIs
      • Functions
      • Filters
  • OTHER LINKS
    • FAQs
    • Known Issues
      • Created folders no longer visible
    • Troubleshooting
    • Support
    • Changelog
Powered by GitBook
On this page
  • Get Folder Detail
  • Get Folders
  • Create New Folder
  • Get Attachment Ids by Folder Id
  • Add attachment(s) to folder
  • Get Attachment Count by Folder Id

Was this helpful?

  1. Integrations
  2. Developer zone

APIs

PreviousDeveloper zoneNextFunctions

Last updated 1 year ago

Was this helpful?

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

Name
Type
Description

folder_id

integer

The folder id

Headers

Name
Type
Description

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

Name
Type
Description

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

Name
Type
Description

Authorization

string

Bearer Token

Request Body

Name
Type
Description

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

Name
Type
Description

folder_id

integer

Your Folder Id

Headers

Name
Type
Description

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

Name
Type
Description

Authorization

string

Bearer Token

Request Body

Name
Type
Description

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

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