Create a folder

POST /api/v1/folder

To create a subfolder pass the parent folder UUID under parent key. This subfolder will inherit the documentable_type and documentable_uuid of its parent folder.

Headers

application/json

Body Required

  • name string Required

    Folder name.

  • parent string Required

    Parent folder UUID to create this folder under.

Responses

  • 200 application/json
    Hide response attributes Show response attributes object
    • uuid string

      The UUID of the resource.

    • The timestamp of when the resource was created.

    • The timestamp of when the resource was updated.

    • name string

      Folder name

    • slug string

      Slug of the folder name

    • path string

      Folder path

    • Denotes whether clients can access this folder and files

    • Denotes whether clients can upload files to this folder

    • Denotes whether the option to change client permissions is enabled which depends on the firm show pseudo folders in client portal setting

    • Denotes if this folder is a system folder

    • Denotes if this folder is a pseudo folder

    • Denotes if this folder is a root folder of a documentable item

    • Number of accounts this folder has been directly shared with

    • participants array[object]

      Participants whom this folder has been directly shared with.

    • Number of subfolders within the folder

    • folders array[object]

      Subfolders within the folder.

    • Number of files stored in the folder

    • files array[object]

      Files stored in the folder.

    • parent object

      Parent folder

    • parents array[object]

      All parents folders up the folder heirarchy structure.

    • children array[object]

      Subfolders within the folder.

    • depth integer

      How many levels deep there are to this folder heirarchy structure

    • owned boolean

      Is true if the authenticated account in the request has created this folder

POST /api/v1/folder
curl \
 -X POST https://api.plannrcrm.com/api/v1/folder \
 -H "Authorization: Bearer {OAUTH_ACCESS_TOKEN or PERSONAL_ACCESS_TOKEN}" \
 -H "Content-Type: application/json" \
 -H "Accept: application/json" \
 -d '{"name":"Important Documents","parent":"string"}'
Request examples
# Headers
Authorization: Bearer {OAUTH_ACCESS_TOKEN or PERSONAL_ACCESS_TOKEN}
Content-Type: application/json
Accept: application/json

# Payload
{
  "name": "Important Documents",
  "parent": "string"
}
Response examples (200)
{
  "name": "Important Documents",
  "path": "Codepotato/Important Documents",
  "slug": "important-documents",
  "uuid": "d93a021c-66df-4039-b14b-2f91a457c347",
  "depth": 5,
  "files": [
    {
      "firm": "App\\Http\\Resources\\FirmResource",
      "name": "Welcome to Plannr",
      "size": "21691783",
      "tags": "App\\Http\\Resources\\TagResource",
      "type": "type",
      "uuid": "17ddbdef-8694-46dd-b826-db81ca579e7a",
      "parent": "Object",
      "status": "uploaded",
      "account": "App\\Http\\Resources\\AccountResource",
      "filename": "Welcome to Plannr.pdf",
      "progress": "100",
      "extension": "pdf",
      "created_at": "2024-10-16T11:10:15+01:00",
      "updated_at": "2024-10-16T11:10:15+01:00",
      "folder_name": "folder 2",
      "uploaded_at": "2024-10-16T11:10:15+01:00",
      "download_url": "https://plannr.valet/file/0e2eeace-bc92-469d-aa75-46e1f3916e83/download",
      "last_modified": "2024-10-16T11:10:15+01:00",
      "original_created_at": "2024-10-16T11:10:15+01:00"
    }
  ],
  "owned": false,
  "parent": {
    "name": "Important Documents",
    "path": "Codepotato/Important Documents",
    "slug": "important-documents",
    "uuid": "22fe6814-c23e-41fc-96ae-01b9f3db4ac9",
    "depth": 5,
    "files": "App\\Http\\Resources\\FileResource",
    "owned": false,
    "parent": "App\\Http\\Resources\\FolderResource",
    "folders": "App\\Http\\Resources\\FolderResource",
    "parents": "App\\Http\\Resources\\FolderResource",
    "children": "App\\Http\\Resources\\FolderResource",
    "created_at": "2024-10-16T11:10:15+01:00",
    "updated_at": "2024-10-16T11:10:15+01:00",
    "files_count": 8,
    "clients_read": true,
    "participants": "App\\Http\\Resources\\FolderParticipantResource",
    "clients_write": true,
    "folders_count": 5,
    "is_root_folder": true,
    "is_pseudo_folder": true,
    "is_system_folder": true,
    "participants_count": 3,
    "show_client_permissions": true
  },
  "folders": [
    {
      "name": "Important Documents",
      "path": "Codepotato/Important Documents",
      "slug": "important-documents",
      "uuid": "8bc1ad95-13a7-4412-a38b-dd015353cdb9",
      "depth": 5,
      "files": "App\\Http\\Resources\\FileResource",
      "owned": false,
      "parent": "App\\Http\\Resources\\FolderResource",
      "folders": "App\\Http\\Resources\\FolderResource",
      "parents": "App\\Http\\Resources\\FolderResource",
      "children": "App\\Http\\Resources\\FolderResource",
      "created_at": "2024-10-16T11:10:15+01:00",
      "updated_at": "2024-10-16T11:10:15+01:00",
      "files_count": 8,
      "clients_read": true,
      "participants": "App\\Http\\Resources\\FolderParticipantResource",
      "clients_write": true,
      "folders_count": 5,
      "is_root_folder": true,
      "is_pseudo_folder": true,
      "is_system_folder": true,
      "participants_count": 3,
      "show_client_permissions": true
    }
  ],
  "parents": [
    {
      "name": "Important Documents",
      "path": "Codepotato/Important Documents",
      "slug": "important-documents",
      "uuid": "fa486043-73b6-486f-8e6a-680741d0ee5e",
      "depth": 5,
      "files": "App\\Http\\Resources\\FileResource",
      "owned": false,
      "parent": "App\\Http\\Resources\\FolderResource",
      "folders": "App\\Http\\Resources\\FolderResource",
      "parents": "App\\Http\\Resources\\FolderResource",
      "children": "App\\Http\\Resources\\FolderResource",
      "created_at": "2024-10-16T11:10:15+01:00",
      "updated_at": "2024-10-16T11:10:15+01:00",
      "files_count": 8,
      "clients_read": true,
      "participants": "App\\Http\\Resources\\FolderParticipantResource",
      "clients_write": true,
      "folders_count": 5,
      "is_root_folder": true,
      "is_pseudo_folder": true,
      "is_system_folder": true,
      "participants_count": 3,
      "show_client_permissions": true
    }
  ],
  "children": [
    {
      "name": "Important Documents",
      "path": "Codepotato/Important Documents",
      "slug": "important-documents",
      "uuid": "11f99a65-5b01-4bd9-bb87-29414fcf3f1e",
      "depth": 5,
      "files": "App\\Http\\Resources\\FileResource",
      "owned": false,
      "parent": "App\\Http\\Resources\\FolderResource",
      "folders": "App\\Http\\Resources\\FolderResource",
      "parents": "App\\Http\\Resources\\FolderResource",
      "children": "App\\Http\\Resources\\FolderResource",
      "created_at": "2024-10-16T11:10:15+01:00",
      "updated_at": "2024-10-16T11:10:15+01:00",
      "files_count": 8,
      "clients_read": true,
      "participants": "App\\Http\\Resources\\FolderParticipantResource",
      "clients_write": true,
      "folders_count": 5,
      "is_root_folder": true,
      "is_pseudo_folder": true,
      "is_system_folder": true,
      "participants_count": 3,
      "show_client_permissions": true
    }
  ],
  "created_at": "2024-10-16T11:10:15+01:00",
  "updated_at": "2024-10-16T11:10:15+01:00",
  "files_count": 8,
  "clients_read": true,
  "participants": [
    {
      "name": "Gareth Thompson",
      "uuid": "5bd583fb-2395-4273-a3c0-35ae6995098a",
      "write": true,
      "created_at": "2024-10-16T11:10:15+01:00",
      "updated_at": "2024-10-16T11:10:15+01:00"
    }
  ],
  "clients_write": true,
  "folders_count": 5,
  "is_root_folder": true,
  "is_pseudo_folder": true,
  "is_system_folder": true,
  "participants_count": 3,
  "show_client_permissions": true
}