publ betaReference (MCP guide)
Open publ console

article_categories_apply

# article_categories_apply

Changes categories in the Article app (pApp B00001, or an instance code of the same family). Another app code is refused before any request. Called without confirmToken it previews and returns a confirmToken; repeating the same input with it executes once.

## Inputs

| Field | Required here | Contract |
| --- | --- | --- |
| `action` | Yes | one of: `create_category`, `update_category`, `delete_category`, `create_label`, `update_label`, `delete_label`, `order_labels` (by `kind`) |
| `action.name` | Yes | When `action.kind` is `create_category`: string; min length 1; max length 60 |
| `action.description` | No | When `action.kind` is `create_category`: string; min length 0; max length 100 |
| `action.categoryId` | Yes | When `action.kind` is `update_category`: integer; greater than 0 |
| `action.fields` | Yes | When `action.kind` is `update_category`: object |
| `action.fields.name` | No | When `action.kind` is `update_category`: string; min length 1; max length 30 |
| `action.fields.description` | No | When `action.kind` is `update_category`: string; min length 0; max length 100 |
| `action.fields.coverImageSrc` | No | When `action.kind` is `update_category`: string; max length 4096; format `uri` or `` |
| `action.articleImageUploads` | No | When `action.kind` is `update_category`: object |
| `action.articleImageUploads.coverTaskId` | Yes | When `action.kind` is `update_category`: string; pattern `^[A-Za-z0-9_-]{8,80}$` |
| `action.coverUploadTaskId` | No | When `action.kind` is `update_category`: string; pattern `^[A-Za-z0-9_-]{8,80}$`; Free board A00003 only: a new category cover from a completed board_cover upload task of this installation (content_file_upload, uploaded from this computer; a Google Drive or other link is downloaded to this computer first), saved alone with fields {} like the original cover screen. Remove the cover with fields.coverImageSrc "". |
| `action.categoryId` | Yes | When `action.kind` is `delete_category`: integer; greater than 0 |
| `action.confirmation` | Yes | When `action.kind` is `delete_category`: `DELETE_CATEGORY_AND_CONTENTS`, `DELETE_CATEGORY`; Free board: DELETE_CATEGORY_AND_CONTENTS. Article: DELETE_CATEGORY, only with a verified zero post count. |
| `action.categoryId` | Yes | When `action.kind` is `create_label`: integer; greater than 0 |
| `action.name` | Yes | When `action.kind` is `create_label`: string; min length 1; max length 30 |
| `action.categoryId` | Yes | When `action.kind` is `update_label`: integer; greater than 0 |
| `action.labelId` | Yes | When `action.kind` is `update_label`: integer; greater than 0 |
| `action.name` | Yes | When `action.kind` is `update_label`: string; min length 1; max length 30 |
| `action.categoryId` | Yes | When `action.kind` is `delete_label`: integer; greater than 0 |
| `action.labelId` | Yes | When `action.kind` is `delete_label`: integer; greater than 0 |
| `action.confirmation` | Yes | When `action.kind` is `delete_label`: `DELETE_LABEL` |
| `action.categoryId` | Yes | When `action.kind` is `order_labels`: integer; greater than 0 |
| `action.labelIds` | Yes | When `action.kind` is `order_labels`: array; items: integer; greater than 0; max items 100 |
| `instanceCode` | No | string; pattern `^B(?:000\|9[0-9]{2})01$`; Optional: which installed Article app to use (its code, such as B00001 or B90101). Omit it when only one is installed; when several are, pick one from the installed list. |
| `confirmToken` | No | string; pattern `^ct[a-f\d]{32}$`; The confirmToken from this tool's preview result. Omit it to preview; repeat the same input with it to execute. |