POST
/
filestorage
/
folders
import { Panora } from "@panora/sdk";

const panora = new Panora({
  apiKey: "<YOUR_API_KEY_HERE>",
});

async function run() {
  const result = await panora.filestorage.folders.create({
    xConnectionToken: "<value>",
    remoteData: false,
    unifiedFilestorageFolderInput: {
      name: "school",
      size: "2048",
      folderUrl: "https://example.com/school",
      description: "All things school related",
      driveId: "801f9ede-c698-4e66-a7fc-48d19eebaa4f",
      parentFolderId: "801f9ede-c698-4e66-a7fc-48d19eebaa4f",
      sharedLink: "801f9ede-c698-4e66-a7fc-48d19eebaa4f",
      permission: "801f9ede-c698-4e66-a7fc-48d19eebaa4f",
      fieldMappings: {
        "fav_dish": "broccoli",
        "fav_color": "red",
      },
    },
  });
  
  // Handle the result
  console.log(result)
}

run();
{
  "name": "school",
  "size": "2048",
  "folder_url": "https://example.com/school",
  "description": "All things school related",
  "drive_id": "801f9ede-c698-4e66-a7fc-48d19eebaa4f",
  "parent_folder_id": "801f9ede-c698-4e66-a7fc-48d19eebaa4f",
  "shared_link": "801f9ede-c698-4e66-a7fc-48d19eebaa4f",
  "permission": "801f9ede-c698-4e66-a7fc-48d19eebaa4f",
  "field_mappings": {
    "fav_dish": "broccoli",
    "fav_color": "red"
  },
  "id": "801f9ede-c698-4e66-a7fc-48d19eebaa4f",
  "remote_id": "id_1",
  "remote_data": {
    "fav_dish": "broccoli",
    "fav_color": "red"
  },
  "created_at": "2024-10-01T12:00:00Z",
  "modified_at": "2024-10-01T12:00:00Z"
}

Authorizations

x-api-key
string
header
required

Headers

x-connection-token
string
required

The connection token

Query Parameters

remote_data
boolean

Set to true to include data from the original Accounting software.

Body

application/json
name
string | null
required

The name of the folder

Example:

"school"

size
string | null
required

The size of the folder

Example:

"2048"

folder_url
string | null
required

The url of the folder

Example:

"https://example.com/school"

description
string
required

The description of the folder

Example:

"All things school related"

drive_id
string | null
required

The UUID of the drive tied to the folder

Example:

"801f9ede-c698-4e66-a7fc-48d19eebaa4f"

parent_folder_id
string | null
required

The UUID of the parent folder

Example:

"801f9ede-c698-4e66-a7fc-48d19eebaa4f"

The UUID of the shared link tied to the folder

Example:

"801f9ede-c698-4e66-a7fc-48d19eebaa4f"

permission
string | null
required

The UUID of the permission tied to the folder

Example:

"801f9ede-c698-4e66-a7fc-48d19eebaa4f"

field_mappings
object | null

The custom field mappings of the object between the remote 3rd party & Panora

Example:
{
  "fav_dish": "broccoli",
  "fav_color": "red"
}

Response

201 - application/json
name
string | null
required

The name of the folder

Example:

"school"

size
string | null
required

The size of the folder

Example:

"2048"

folder_url
string | null
required

The url of the folder

Example:

"https://example.com/school"

description
string
required

The description of the folder

Example:

"All things school related"

drive_id
string | null
required

The UUID of the drive tied to the folder

Example:

"801f9ede-c698-4e66-a7fc-48d19eebaa4f"

parent_folder_id
string | null
required

The UUID of the parent folder

Example:

"801f9ede-c698-4e66-a7fc-48d19eebaa4f"

The UUID of the shared link tied to the folder

Example:

"801f9ede-c698-4e66-a7fc-48d19eebaa4f"

permission
string | null
required

The UUID of the permission tied to the folder

Example:

"801f9ede-c698-4e66-a7fc-48d19eebaa4f"

field_mappings
object | null

The custom field mappings of the object between the remote 3rd party & Panora

Example:
{
  "fav_dish": "broccoli",
  "fav_color": "red"
}
id
string | null

The UUID of the folder

Example:

"801f9ede-c698-4e66-a7fc-48d19eebaa4f"

remote_id
string | null

The remote ID of the folder in the context of the 3rd Party

Example:

"id_1"

remote_data
object | null

The remote data of the folder in the context of the 3rd Party

Example:
{
  "fav_dish": "broccoli",
  "fav_color": "red"
}
created_at
string | null

The created date of the folder

Example:

"2024-10-01T12:00:00Z"

modified_at
string | null

The modified date of the folder

Example:

"2024-10-01T12:00:00Z"