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

# Save competitor exclusions

> Save a complete replacement of up to 100 exact page/host exclusion rules with expectedRevision.

`save_competitor_exclusions`

Save a complete replacement of up to 100 exact page/host exclusion rules with expectedRevision. Empty rules clear the saved view. Keeps historical evidence and revisions; never changes provider queries or monitoring.

<Note>Hosted MCP registration verified. These schemas describe the development contract; confirm supported inputs with tools/list. Generic CLI/HTTP calls require a matching development server. Configure LINKTRAIL\_API\_URL; production does not expose these command routes.</Note>

| Access            | Behavior                                                   |
| ----------------- | ---------------------------------------------------------- |
| `discovery:write` | Writes or admits work; can change or remove existing state |

Reading saved data does not start a verification job. Mutations can change saved records or access; the effects below apply.

## 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": "save_competitor_exclusions",
      "arguments": {
        "setId": "set_example",
        "expectedRevision": 0,
        "rules": []
      }
    }
  }
  ```

  ```bash CLI theme={null}
  linktrail call save_competitor_exclusions --args '{"setId":"set_example","expectedRevision":0,"rules":[]}'
  ```

  ```bash HTTP theme={null}
  curl "$LINKTRAIL_API_URL/v1/commands/save_competitor_exclusions" \
    -H "Authorization: Bearer $LINKTRAIL_API_KEY" \
    -H 'Content-Type: application/json' \
    --data '{"setId":"set_example","expectedRevision":0,"rules":[]}'
  ```
</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}
{
  "set_id": "set_example",
  "revision": 1,
  "current_revision": 1,
  "set_revision_at_save": 1,
  "saved_by": "user_example",
  "saved_at": "2026-09-13T12:00:00.000Z",
  "rules": []
}
```

## 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                                                                                       |
| ------------------ | ------- | -------- | ------------------------------------------------------------------------------------------------------------- |
| `setId`            | string  | Required | Identifier of the set returned by its create or list operation. minLength: 1; maxLength: 200                  |
| `expectedRevision` | integer | Required | Revision last read by the caller; mismatches reject concurrent updates. minimum: 0; maximum: 9007199254740989 |
| `rules`            | array   | Required | Customer-owned exclusion rules for the selected competitor revision. maxItems: 100                            |
| `rules[].grouping` | string  | Required | See the typed schema and response example for this field. values: "page", "source\_host"                      |
| `rules[].value`    | string  | Required | See the typed schema and response example for this field. minLength: 1; maxLength: 4096                       |

### Validation and omitted values

Supply the entire replacement rules array and expectedRevision. An empty array clears the saved view while retaining earlier revisions.

## 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                                           |
| ---------------------- | ------------- | -------- | ----------------------------------------------------------------- |
| `set_id`               | string        | Required | set id recorded for this result.                                  |
| `revision`             | number        | Required | revision recorded for this result.                                |
| `current_revision`     | number        | Required | current revision recorded for this result.                        |
| `set_revision_at_save` | number / null | Required | set revision at save recorded for this result.                    |
| `saved_by`             | string / null | Required | saved by recorded for this result.                                |
| `saved_at`             | string / null | Required | saved at recorded for this result.                                |
| `rules`                | array         | Required | rules recorded for this result.                                   |
| `rules[].grouping`     | string        | Required | grouping recorded for this result. values: "page", "source\_host" |
| `rules[].value`        | string        | Required | value recorded for this result.                                   |

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

## Errors and retries

This command is not annotated idempotent. After a timeout, inspect existing state before repeating a write.

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                                       |
| -------------------------------------------- | ------- | --------------------------------------------- |
| `PUT /v1/competitor-sets/{setId}/exclusions` | 201     | Remaining arguments go in a JSON object body. |

## Continue

[get\_competitor\_exclusions](/reference/commands/get_competitor_exclusions) · [get\_competitor\_gap\_report](/reference/commands/get_competitor_gap_report)

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