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
| Query | Description |
|---|---|
includeInactive | true also lists deactivated categories |
Answers { "categories": [ ... ] }, ordered by sortOrder, then key.
Register a category
POST /api/v1/storage/fixed/categories (201)
| Field | Type | Required | Description |
|---|---|---|---|
key | string | Yes | Stored in UPPER_SNAKE (lease agreement becomes LEASE_AGREEMENT) |
label | string | Yes | Non-empty display label |
description | string | No | |
sortOrder | integer | No | Default 0 |
color | string | No | Display colour |
retentionType | string | No | NONE, STANDARD, EXTENDED, LEGAL or PERMANENT; unset: the platform default |
retentionDays | integer | No | Non-negative |
deletableBy | string | No | OWNER, ADMIN, SUPER_ADMIN or NONE |
requiresOverride | boolean | No | Deleting needs a deletion override |
requiresWitness | boolean | No | The 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
| Code | Status | When |
|---|---|---|
BAD_REQUEST | 400 | key 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_ERROR | 400 | The key normalises to nothing (no letter or digit) |
UNAUTHORIZED | 401 | API key missing, invalid or inactive |
FORBIDDEN | 403 | The 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_FOUND | 404 | No category with that key for your caller service and organisation |
CONFLICT | 409 | A category with that key already exists (create) |
RATE_LIMITED | 429 | Per-key rate limit |
INTERNAL_ERROR | 500 | An unexpected failure (a fixed message) |
SDKs
| TypeScript | Python (1.12.0) | Go (v1.12.0) | |
|---|---|---|---|
| List | pending (1.16.0) | documents.categories.list(include_inactive=) | Documents.ListCategories(includeInactive) |
| Register | pending | documents.categories.create(key, label, ...) | Documents.CreateCategory(CreateDocumentCategoryInput) |
| Update | pending | documents.categories.update(key, ...) | Documents.UpdateCategory(key, fields) |
| Deactivate | pending | documents.categories.deactivate(key) | Documents.DeactivateCategory(key) |
| Settings | pending | documents.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.