> ## 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.

# Tag placement occurrences

> Attach or remove supplied organizational tags or a subtype on exact retained occurrences.

`tag_placement_occurrences`

Attach or remove supplied organizational tags or a subtype on exact retained occurrences. Subtypes require an accepted matching parent. Makes no model request.

<Note>This command name is absent from deployment evidence dated 2026-09-20. 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": "tag_placement_occurrences",
      "arguments": {
        "projectId": "project_example",
        "expectedRevision": 2,
        "reason": "Track this placement.",
        "definitionId": "customer:project_example:organizational:campaign",
        "action": "attach",
        "occurrences": [
          {
            "watchId": "watch_example",
            "occurrenceId": "sha256:1111111111111111111111111111111111111111111111111111111111111111",
            "captureId": "capture_example",
            "evidenceHash": "sha256:2222222222222222222222222222222222222222222222222222222222222222"
          }
        ]
      }
    }
  }
  ```

  ```bash CLI theme={null}
  agentlinkops call tag_placement_occurrences --args '{"projectId":"project_example","expectedRevision":2,"reason":"Track this placement.","definitionId":"customer:project_example:organizational:campaign","action":"attach","occurrences":[{"watchId":"watch_example","occurrenceId":"sha256:1111111111111111111111111111111111111111111111111111111111111111","captureId":"capture_example","evidenceHash":"sha256:2222222222222222222222222222222222222222222222222222222222222222"}]}'
  ```

  ```bash HTTP theme={null}
  curl --fail-with-body https://app.agentlinkops.com/v1/commands/tag_placement_occurrences \
    -H "Authorization: Bearer $AGENTLINKOPS_TOKEN" \
    -H 'Content-Type: application/json' \
    --data '{"projectId":"project_example","expectedRevision":2,"reason":"Track this placement.","definitionId":"customer:project_example:organizational:campaign","action":"attach","occurrences":[{"watchId":"watch_example","occurrenceId":"sha256:1111111111111111111111111111111111111111111111111111111111111111","captureId":"capture_example","evidenceHash":"sha256:2222222222222222222222222222222222222222222222222222222222222222"}]}'
  ```
</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}
{
  "revision": 1,
  "inferenceEffect": "none"
}
```

## 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 | project ID from create/list. minLength: 1; maxLength: 200 |
| `expectedRevision` | integer | Required | Previously read revision; mismatches reject concurrent updates. minimum: 0; maximum: 9007199254740991 |
| `reason` | string | Required | reason; see schema. minLength: 1; maxLength: 500 |
| `definitionId` | string | Required | definition ID from create/list. minLength: 1; maxLength: 200 |
| `action` | string | Required | action; see schema. values: "attach", "detach" |
| `occurrences` | array | Required | occurrences; see schema. minItems: 1; maxItems: 100 |
| `occurrences[].watchId` | string | Required | Identifier returned by the related operation. minLength: 1; maxLength: 200 |
| `occurrences[].occurrenceId` | string | Required | Identifier returned by the related operation. pattern: "^sha256:\[a-f0-9]\{64}\$" |
| `occurrences[].captureId` | string | Required | Identifier returned by the related operation. minLength: 1; maxLength: 200 |
| `occurrences[].evidenceHash` | string | Required | pattern: "^sha256:\[a-f0-9]\{64}\$" |

### Validation and omitted values

Attach or remove supplied tags on exact saved occurrences. Organizational tags record customer metadata.

A subtype binds to its accepted matching parent decision and saved semantic revision. A changed parent or an evidence concern makes that attachment inapplicable.

The whole batch requires the current collection revision. A stale or foreign occurrence refuses the batch without saving attachments.

## 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.

| Field | Type | Presence | Meaning and constraints |
| - | - | - | - |
| `revision` | integer | Required | Optimistic concurrency revision; supply it as expectedRevision on the next write. minimum: 0; maximum: 9007199254740991 |
| `inferenceEffect` | string | Required | must equal "none" |

[Download input schema](/schemas/tag_placement_occurrences.input.json) · [Download output schema](/schemas/tag_placement_occurrences.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_PRECONDITION_CHANGED`, `CLASSIFICATION_METADATA_SCHEMA_UNAVAILABLE`, `CLASSIFICATION_ACCESS_DENIED`.

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

These existing resource routes share the operation’s domain behavior. Their parameter placement, status and response envelope can differ from generic invocation. See [HTTP route details](/reference/http/routes).

| Method and route | Success | Details |
| - | - | - |
| `POST /v1/projects/{projectId}/classification-metadata/occurrences` | 200 | The URL selects projectId. Remaining arguments go in JSON. A supplied projectId that differs from the URL returns 409 CLASSIFICATION\_SCOPE\_MISMATCH. |

## Continue

[get\_placement\_metadata](/reference/commands/get_placement_metadata)

Follow the [related workflow](/guides/monitor-changes), 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.