PlatformXeDocs
Get API Key

Document Folders

API reference for creating and managing document folders.

Folders provide hierarchical organization for documents in fixed storage. A folder can contain documents and other folders (nested up to 5 levels deep).

Create a folder

POST /api/v1/storage/fixed/folders

Scope: storage:upload

Request body

FieldTypeRequiredDescription
namestringYesFolder name
parentIdstringNoParent folder ID for nesting. Omit for a root-level folder
descriptionstringNoFolder description

Response

{
  "success": true,
  "data": {
    "id": "fld_abc123",
    "name": "HR Contracts",
    "parentId": null,
    "description": "Employment contracts and offer letters",
    "documentCount": 0,
    "createdAt": "2026-04-05T10:00:00.000Z",
    "updatedAt": "2026-04-05T10:00:00.000Z"
  }
}
FieldTypeDescription
idstringUnique folder ID
namestringFolder name
parentIdstring or nullParent folder ID (null for root folders)
descriptionstring or nullFolder description
documentCountnumberNumber of documents directly in this folder
createdAtstringISO 8601 creation timestamp
updatedAtstringISO 8601 last-update timestamp

Get a folder

GET /api/v1/storage/fixed/folders/:folderId

Returns the folder metadata including the count of documents it contains. Use the list documents endpoint with folderId to retrieve the actual documents.

Scope: storage:read

Examples

Create a folder hierarchy

curl

# Create root folder
curl -X POST https://api.platformxe.com/api/v1/storage/fixed/folders \
  -H "Content-Type: application/json" \
  -H "x-api-key: pxk_live_your_api_key_here" \
  -d '{
    "name": "HR Documents",
    "description": "All HR-related documents"
  }'

# Create subfolder
curl -X POST https://api.platformxe.com/api/v1/storage/fixed/folders \
  -H "Content-Type: application/json" \
  -H "x-api-key: pxk_live_your_api_key_here" \
  -d '{
    "name": "Contracts 2026",
    "parentId": "fld_abc123",
    "description": "Employment contracts for 2026"
  }'

TypeScript SDK

import { PlatformXe } from '@caldera/platformxe-sdk';

const px = new PlatformXe({ apiKey: 'pxk_live_your_api_key_here' });

// Create root folder
const root = await px.documents.createFolder({
  name: 'HR Documents',
  description: 'All HR-related documents',
});

// Create subfolder
const sub = await px.documents.createFolder({
  name: 'Contracts 2026',
  parentId: root.id,
  description: 'Employment contracts for 2026',
});

console.log(sub.parentId);
// "fld_abc123"

Python SDK

from platformxe import PlatformXe

px = PlatformXe(api_key="pxk_live_your_api_key_here")

root = px.documents.create_folder({
    "name": "HR Documents",
    "description": "All HR-related documents"
})

sub = px.documents.create_folder({
    "name": "Contracts 2026",
    "parentId": root["id"]
})

Retrieve folder details

const folder = await px.documents.getFolder('fld_abc123');
console.log(folder.name, folder.documentCount);
// "HR Documents" 15

Error responses

CodeDescription
BAD_REQUESTMissing folder name or nesting depth exceeds 5 levels
NOT_FOUNDParent folder does not exist
FORBIDDENAPI key lacks required scope
RATE_LIMITEDRate limit exceeded