PlatformXeDocs
Get API Key

Document Categories & Settings

API reference for the fixed-storage category registry and its enforcement setting.

Your caller service can register the document categories it uses, each with a label, display order, colour and an optional retention policy. With category enforcement on, a document whose category is not registered and active is refused (400 INVALID_CATEGORY). Enforcement is off by default, so registering categories changes nothing until you turn it on.

The registry and the settings belong to the key's caller service within its organisation (a platform key: the rows with no organisation). Another organisation that uses the same caller service name never sees or changes yours.

Scope: storage:read to list categories and read the settings, storage:delete to deactivate a category, storage:upload to create or update a category and to change the settings. storage:upload also grants storage:read and storage:delete, so a key issued before the split (2026-11-20) keeps every storage route; a key that should only read, or read and delete, names those scopes without storage:upload.

List categories

GET /api/v1/storage/fixed/categories

QueryDescription
includeInactivetrue also lists deactivated categories

Answers { "categories": [ ... ] }, ordered by sortOrder, then key.

Register a category

POST /api/v1/storage/fixed/categories (201)

FieldTypeRequiredDescription
keystringYesStored in UPPER_SNAKE (lease agreement becomes LEASE_AGREEMENT)
labelstringYesNon-empty display label
descriptionstringNo
sortOrderintegerNoDefault 0
colorstringNoDisplay colour
retentionTypestringNoNONE, STANDARD, EXTENDED, LEGAL or PERMANENT; unset: the platform default
retentionDaysintegerNoNon-negative
deletableBystringNoOWNER, ADMIN, SUPER_ADMIN or NONE
requiresOverridebooleanNoDeleting needs a deletion override
requiresWitnessbooleanNoThe override needs a witness
curl -X POST https://api.platformxe.com/api/v1/storage/fixed/categories \
  -H "x-api-key: $PLATFORMXE_API_KEY" -H "Content-Type: application/json" \
  -d '{"key":"lease","label":"Lease","retentionType":"LEGAL","retentionDays":2555,"requiresWitness":true}'

Answers { "category": { ... } }:

{
  "success": true,
  "data": {
    "category": {
      "id": "tz4a98xxat96iws9zmbrgj3a",
      "callerService": "lettings",
      "key": "LEASE",
      "label": "Lease",
      "description": null,
      "sortOrder": 0,
      "color": null,
      "isActive": true,
      "retentionType": "LEGAL",
      "retentionDays": 2555,
      "deletableBy": null,
      "requiresOverride": false,
      "requiresWitness": true,
      "createdAt": "2026-11-18T10:00:00.000Z",
      "updatedAt": "2026-11-18T10:00:00.000Z"
    }
  }
}

Update a category

PATCH /api/v1/storage/fixed/categories?key=LEASE

Send only the fields to change (the same fields as create, plus isActive). null clears description, color, retentionType, retentionDays or deletableBy (back to the platform default); the other fields do not take null. The key, caller service and organisation cannot be changed; other fields in the body are ignored.

Deactivate a category

DELETE /api/v1/storage/fixed/categories?key=LEASE

A soft disable (isActive: false): documents already filed under the category keep it. Re-activate it with PATCH and { "isActive": true }.

Settings

GET /api/v1/storage/fixed/settings answers { "settings": { "enforceCategories": false } }.

PATCH /api/v1/storage/fixed/settings with { "enforceCategories": true } turns enforcement on (false turns it off). One settings row per caller service and organisation.

Errors

CodeStatusWhen
BAD_REQUEST400key or label missing on create; the key query missing on update / deactivate; a field of the wrong type (the message names the field, for example retentionDays must be a non-negative integer); enforceCategories not a boolean
VALIDATION_ERROR400The key normalises to nothing (no letter or digit)
UNAUTHORIZED401API key missing, invalid or inactive
FORBIDDEN403The key lacks the method's scope (storage:read, storage:delete or storage:upload; storage:upload grants the other two), or its organisation is inactive
NOT_FOUND404No category with that key for your caller service and organisation
CONFLICT409A category with that key already exists (create)
RATE_LIMITED429Per-key rate limit
INTERNAL_ERROR500An unexpected failure (a fixed message)

SDKs

TypeScriptPython (1.12.0)Go (v1.12.0)
Listpending (1.16.0)documents.categories.list(include_inactive=)Documents.ListCategories(includeInactive)
Registerpendingdocuments.categories.create(key, label, ...)Documents.CreateCategory(CreateDocumentCategoryInput)
Updatependingdocuments.categories.update(key, ...)Documents.UpdateCategory(key, fields)
Deactivatependingdocuments.categories.deactivate(key)Documents.DeactivateCategory(key)
Settingspendingdocuments.settings.get() / update(enforce_categories)Documents.GetSettings() / UpdateSettings(bool)

Terraform resources for categories and settings are planned for provider 1.6.0. See SDK: Documents.