> ## Documentation Index
> Fetch the complete documentation index at: https://docs.agentlinkops.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Set automatic categorization

> Save an administrator’s website choice for automatic categorization after future source checks.

`set_automatic_categorization`

Save an administrator’s website choice for automatic categorization after future source checks. Enabling requires an available managed service and the current preference revision. This action starts no source check or model request and approves no suggestion.

<Note>This command name is absent from deployment evidence dated 2026-10-16. Hosted availability for this current definition is unverified; inspect your connected catalog before invoking it. Verify the command and its input schema in the selected environment.</Note>

| Access | Behavior |
| - | - |
| `watches:read`, `classification:write` | Writes or admits work |

This operation changes saved state. Review its inputs and retry behavior before calling.

## Example request

Connect through [MCP](/guides/connect-mcp), [CLI](/guides/connect-cli), or [HTTP](/guides/connect-http). Replace example identifiers with records from your workspace.

<CodeGroup>
  ```json MCP theme={null}
  {
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/call",
    "params": {
      "name": "set_automatic_categorization",
      "arguments": {
        "projectId": "prj_example",
        "enabled": true,
        "expectedRevision": 0
      }
    }
  }
  ```

  ```bash CLI theme={null}
  agentlinkops call set_automatic_categorization --args '{"projectId":"prj_example","enabled":true,"expectedRevision":0}'
  ```

  ```bash HTTP theme={null}
  curl --fail-with-body https://app.agentlinkops.com/v1/commands/set_automatic_categorization \
    -H "Authorization: Bearer $AGENTLINKOPS_TOKEN" \
    -H 'Content-Type: application/json' \
    --data '{"projectId":"prj_example","enabled":true,"expectedRevision":0}'
  ```
</CodeGroup>

## Returned result

Illustrative data validated against the documented response schema. IDs and dates are examples, not a live account capture. MCP returns this data in `structuredContent` and in a text content block; generic HTTP and CLI return the JSON result directly.

```json theme={null}
{
  "contract": "managed-classification-v1",
  "binding": {
    "workspaceId": "workspace_example",
    "projectId": "project_example"
  },
  "available": false,
  "reason": "CLASSIFICATION_SERVICE_UNAVAILABLE",
  "enabled": false,
  "preference": "off",
  "revision": 0,
  "enrolled": false,
  "allowance": {
    "contract": "classification-allowance-v1",
    "unit": "classification-assessment-v1",
    "scope": {
      "kind": "workspace",
      "workspaceId": "workspace_example",
      "sharedAcrossWebsites": true
    },
    "state": "unavailable",
    "limit": null,
    "reserved": null,
    "used": null,
    "remaining": null,
    "period": null,
    "resetAt": null
  }
}
```

## Input fields

Omit optional fields when you do not want to supply them. Null is accepted only where listed. Unknown input properties are rejected.

| Field | Type | Presence | Meaning and constraints |
| - | - | - | - |
| `projectId` | string | Required | Website project ID. minLength: `1`; maxLength: `200` |
| `enabled` | boolean | Required | Save on or off for automatic categorization after future checks. This action starts no assessment. |
| `expectedRevision` | integer | Required | Current automatic categorization preference revision from get\_automatic\_categorization. Use 0 before any saved preference. minimum: `0`; maximum: `9007199254740991` |

### Validation and omitted values

Save an administrator’s website choice for automatic categorization after future source checks. Enabling requires an available managed service and the current preference revision. This action starts no source check or model request and approves no suggestion.

## Output fields

Fields inside optional or nullable parents apply only when that parent exists. [Common schema conventions](/reference/schemas) explain evidence states, empty lists and extensions.

* **`contract`** (string, required): must equal `"managed-classification-v1"`
* **`binding`** (object, required): additional fields rejected
* **`available`** (boolean, required).
* **`reason`** (string / null, required): Recorded explanation; null when no explanation applies.
* **`enabled`** (boolean, required).
* **`preference`** (string, required): values: `"on"`, `"off"`
* **`revision`** (integer, required): Optimistic concurrency revision; supply it as expectedRevision on the next write. minimum: `0`; maximum: `9007199254740991`
* **`enrolled`** (boolean, required).
* **`allowance`** (object, required): additional fields rejected

<Accordion title="All fields and nested objects">
  | Field | Type | Presence | Meaning and constraints |
  | - | - | - | - |
  | `contract` | string | Required | must equal `"managed-classification-v1"` |
  | `binding` | object | Required | additional fields rejected |
  | `binding.workspaceId` | string | Required | Identifier returned by the related operation. minLength: `1`; maxLength: `200` |
  | `binding.projectId` | string | Required | Identifier returned by the related operation. minLength: `1`; maxLength: `200` |
  | `available` | boolean | Required | |
  | `reason` | string / null | Required | Recorded explanation; null when no explanation applies. |
  | `enabled` | boolean | Required | |
  | `preference` | string | Required | values: `"on"`, `"off"` |
  | `revision` | integer | Required | Optimistic concurrency revision; supply it as expectedRevision on the next write. minimum: `0`; maximum: `9007199254740991` |
  | `enrolled` | boolean | Required | |
  | `allowance` | object | Required | additional fields rejected |
  | `allowance.contract` | string | Required | must equal `"classification-allowance-v1"` |
  | `allowance.unit` | string | Required | must equal `"classification-assessment-v1"` |
  | `allowance.scope` | object | Required | additional fields rejected |
  | `allowance.scope.kind` | string | Required | must equal `"workspace"` |
  | `allowance.scope.workspaceId` | string | Required | Identifier returned by the related operation. minLength: `1`; maxLength: `200` |
  | `allowance.scope.sharedAcrossWebsites` | boolean | Required | must equal `true` |
  | `allowance.state` | string | Required | Saved lifecycle or evidence state, as enumerated for this record. values: `"unavailable"`, `"not_entitled"`, `"exhausted"`, `"available"` |
  | `allowance.limit` | integer / null | Required | |
  | `allowance.reserved` | integer / null | Required | |
  | `allowance.used` | integer / null | Required | |
  | `allowance.remaining` | integer / null | Required | Check units still available after consumed and reserved units; null if the limit is unknown. |
  | `allowance.period` | object / null | Required | |
  | `allowance.period.key` | string | Required | Saved lookup identifier within this record. minLength: `1`; maxLength: `200` |
  | `allowance.period.startsAt` | string | Required | format: `"date-time"`; pattern: `"^(?:(?:\\d\\d[2468][048]\|\\d\\d[13579][26]\|\\d\\d0[48]\|[02468][048]00\|[13579][26]00)-02-29\|\\d{4}-(?:(?:0[13578]\|1[02])-(?:0[1-9]\|[12]\\d\|3[01])\|(?:0[469]\|11)-(?:0[1-9]\|[12]\\d\|30)\|(?:02)-(?:0[1-9]\|1\\d\|2[0-8])))T(?:(?:[01]\\d\|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"` |
  | `allowance.period.endsAt` | string | Required | format: `"date-time"`; pattern: `"^(?:(?:\\d\\d[2468][048]\|\\d\\d[13579][26]\|\\d\\d0[48]\|[02468][048]00\|[13579][26]00)-02-29\|\\d{4}-(?:(?:0[13578]\|1[02])-(?:0[1-9]\|[12]\\d\|3[01])\|(?:0[469]\|11)-(?:0[1-9]\|[12]\\d\|30)\|(?:02)-(?:0[1-9]\|1\\d\|2[0-8])))T(?:(?:[01]\\d\|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"` |
  | `allowance.resetAt` | string / null | Required | |
</Accordion>

[Download input schema](/schemas/set_automatic_categorization.input.json) · [Download output schema](/schemas/set_automatic_categorization.output.json)

## Errors and retries

This write is not annotated idempotent. After a timeout, inspect existing state before repeating it. Operation-specific errors include `CLASSIFICATION_SERVICE_UNAVAILABLE`, `CLASSIFICATION_SERVICE_ADMIN_REQUIRED`, `CLASSIFICATION_SERVICE_REVISION_CHANGED`, `CLASSIFICATION_SERVICE_PRECONDITION_CHANGED`.

See [error recovery](/reference/errors) for status, scope, cooldown, cursor and retry handling. Unknown observations are result data and do not establish loss.

## HTTP resource routes

This operation has no separate resource alias. Use its generic command route in a matching environment.

## Continue

[get\_automatic\_categorization](/reference/commands/get_automatic_categorization)

Follow the [related workflow](/guides/link-classification), inspect [capability status](/capability-status), or return to the [command index](/reference/index).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.