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

# Import link watches

> Import up to 100 known backlinks.

`import_link_watches`

Import up to 100 known backlinks. Each row returns its position and success or error. accepted includes existing placements; created counts only new watches. Invalid rows do not prevent valid rows from being imported.

<Note>Available in the deployed MCP and HTTP bundle. Confirm access and inputs with your connected catalog. Workspace scopes and enabled providers still apply.</Note>

| Access          | Behavior              |
| --------------- | --------------------- |
| `watches: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": "import_link_watches",
      "arguments": {
        "projectId": "project_example",
        "watches": [
          {
            "sourceUrl": "https://publisher.example.com/resources",
            "targetUrl": "https://example.com/guide"
          }
        ]
      }
    }
  }
  ```

  ```bash CLI theme={null}
  agentlinkops call import_link_watches --args '{"projectId":"project_example","watches":[{"sourceUrl":"https://publisher.example.com/resources","targetUrl":"https://example.com/guide"}]}'
  ```

  ```bash HTTP theme={null}
  curl "$AGENTLINKOPS_API_URL/v1/commands/import_link_watches" \
    -H "Authorization: Bearer $AGENTLINKOPS_API_KEY" \
    -H 'Content-Type: application/json' \
    --data '{"projectId":"project_example","watches":[{"sourceUrl":"https://publisher.example.com/resources","targetUrl":"https://example.com/guide"}]}'
  ```
</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.

<Accordion title="Full response example">
  ```json theme={null}
  {
    "status": "succeeded",
    "rows": [
      {
        "index": 0,
        "watch": {
          "workspace_id": "ws_example",
          "project_id": "project_example",
          "status": "active",
          "cadence_seconds": 86400,
          "state": "unknown",
          "observation_state": {},
          "created_at": "2026-09-13T12:00:00.000Z",
          "updated_at": "2026-09-13T12:00:00.000Z",
          "last_attempt_at": null,
          "last_success_at": null,
          "last_observation_id": null,
          "next_check_at": "2026-09-13T12:00:00.000Z",
          "overdue_reason": null,
          "id": "watch_example_1",
          "source_url": "https://publisher.example.com/resources",
          "target_url": "https://example.com/guide",
          "target_scope": "exact",
          "expected_anchor": null,
          "expected_rel": null,
          "local_reference": null,
          "last_successful_observation_id": null,
          "created": true
        }
      }
    ],
    "imported": 1,
    "accepted": 1,
    "created": 1,
    "existing": 0,
    "failed": 0
  }
  ```
</Accordion>

## 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 | Identifier of the project returned by its create or list operation. minLength: 1; maxLength: 200                                                                                                                                |
| `watches`                  | array         | Required | Rows use sourceUrl and targetUrl, plus optional targetScope, cadenceSeconds, expectedAnchor, expectedRel and localReference. Each invalid row returns an error at its position; valid rows continue. minItems: 1; maxItems: 100 |
| `watches[].sourceUrl`      | string        | Required | format: "uri"                                                                                                                                                                                                                   |
| `watches[].targetUrl`      | string        | Required | format: "uri"                                                                                                                                                                                                                   |
| `watches[].targetScope`    | string        | Optional | values: "exact", "domain", "subdomain", "path"                                                                                                                                                                                  |
| `watches[].cadenceSeconds` | integer       | Optional | minimum: 3600; maximum: 2592000                                                                                                                                                                                                 |
| `watches[].expectedAnchor` | string / null | Optional |                                                                                                                                                                                                                                 |
| `watches[].expectedRel`    | array / null  | Optional |                                                                                                                                                                                                                                 |
| `watches[].localReference` | string        | Optional | maxLength: 200                                                                                                                                                                                                                  |

### Validation and omitted values

Each watch row uses monitor\_link defaults: targetScope exact and cadenceSeconds 86400 when omitted; omitted expectations and localReference are empty.

Each row is processed separately. Invalid rows produce indexed errors while valid rows continue. accepted includes reused watches; created counts only new watches.

Relation expectations allow at most twenty tokens, each one to forty letters, digits, `_` or `-`; values are lowercased, deduplicated and sorted.

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

* **`status`** (string, required): Resource lifecycle status.
* **`admission`** (object / null, optional).
* **`rows`** (array, required).
* **`imported`** (number, required).
* **`accepted`** (number, required).
* **`created`** (number, required): True when this request created the record; false when an existing record was reused.
* **`existing`** (number, required).
* **`failed`** (number, required).

<Accordion title="All fields and nested objects">
  | Field                                                                                   | Type          | Presence | Meaning and constraints                                                                                     |
  | --------------------------------------------------------------------------------------- | ------------- | -------- | ----------------------------------------------------------------------------------------------------------- |
  | `status`                                                                                | string        | Required | Resource lifecycle status.                                                                                  |
  | `admission`                                                                             | object / null | Optional |                                                                                                             |
  | `admission.operation_id`                                                                | string        | Required | Identifier returned by the related operation. minLength: 1; maxLength: 200                                  |
  | `admission.project_id`                                                                  | string        | Required | Project that owns this record. minLength: 1; maxLength: 200                                                 |
  | `admission.context`                                                                     | string        | Required | values: "import", "candidate", "candidate\_batch", "serve"                                                  |
  | `admission.decisions`                                                                   | array         | Required |                                                                                                             |
  | `admission.decisions[].index`                                                           | integer       | Required | minimum: 0; maximum: 9007199254740991                                                                       |
  | `admission.decisions[].url`                                                             | string        | Required |                                                                                                             |
  | `admission.decisions[].normalized_url`                                                  | string / null | Required |                                                                                                             |
  | `admission.decisions[].host`                                                            | string / null | Required |                                                                                                             |
  | `admission.decisions[].decision`                                                        | string        | Required | values: "admitted", "rejected"                                                                              |
  | `admission.decisions[].reason`                                                          | string        | Required | Recorded explanation; null when no explanation applies.                                                     |
  | `admission.decisions[].rule_kind`                                                       | string / null | Required |                                                                                                             |
  | `admission.decisions[].rule_id`                                                         | string / null | Required | Identifier returned by the related operation.                                                               |
  | `admission.decisions[].rule_value`                                                      | string / null | Required |                                                                                                             |
  | `admission.decisions[].cap`                                                             | object / null | Required |                                                                                                             |
  | `admission.decisions[].cap.limit`                                                       | integer       | Required | maximum: 9007199254740991; exclusiveMinimum: 0                                                              |
  | `admission.decisions[].cap.used`                                                        | integer       | Required | minimum: 0; maximum: 9007199254740991                                                                       |
  | `admission.decisions[].subject_key`                                                     | string        | Required | minLength: 1; maxLength: 200                                                                                |
  | `admission.summary`                                                                     | object        | Required | Grouped change counts included in this delivery, limited to accessible websites. additional fields rejected |
  | `admission.summary.total`                                                               | integer       | Required | minimum: -9007199254740991; maximum: 9007199254740991                                                       |
  | `admission.summary.admitted`                                                            | integer       | Required | minimum: -9007199254740991; maximum: 9007199254740991                                                       |
  | `admission.summary.rejected`                                                            | integer       | Required | minimum: -9007199254740991; maximum: 9007199254740991                                                       |
  | `admission.summary.by_rule`                                                             | object        | Required |                                                                                                             |
  | `admission.policy_revision`                                                             | integer       | Required | minimum: 0; maximum: 9007199254740991                                                                       |
  | `admission.disavow_revision`                                                            | integer       | Required | minimum: 0; maximum: 9007199254740991                                                                       |
  | `admission.replayed`                                                                    | boolean       | Required | True when the response reuses an earlier request with the same idempotency value.                           |
  | `rows`                                                                                  | array         | Required |                                                                                                             |
  | `rows[].index`                                                                          | number        | Required |                                                                                                             |
  | `rows[].watch`                                                                          | object        | Optional |                                                                                                             |
  | `rows[].watch.id`                                                                       | string        | Required | Resource identifier returned by the operation.                                                              |
  | `rows[].watch.workspace_id`                                                             | string        | Required | Workspace that owns this record.                                                                            |
  | `rows[].watch.project_id`                                                               | string        | Required | Project that owns this record.                                                                              |
  | `rows[].watch.status`                                                                   | string        | Required | Resource lifecycle status. values: "active", "paused"                                                       |
  | `rows[].watch.cadence_seconds`                                                          | number        | Required |                                                                                                             |
  | `rows[].watch.state`                                                                    | string        | Required | Saved lifecycle or evidence state, as enumerated for this record.                                           |
  | `rows[].watch.observation_state`                                                        | object        | Required | Saved observation state. Before the first check, this object can be empty.                                  |
  | `rows[].watch.observation_state.state`                                                  | string        | Optional | Saved lifecycle or evidence state, as enumerated for this record.                                           |
  | `rows[].watch.observation_state.uncertain`                                              | boolean       | Optional |                                                                                                             |
  | `rows[].watch.observation_state.checked_at`                                             | string        | Optional | UTC timestamp of the saved check.                                                                           |
  | `rows[].watch.observation_state.lastChangedAt`                                          | string / null | Optional |                                                                                                             |
  | `rows[].watch.observation_state.firstAbsentAt`                                          | string / null | Optional |                                                                                                             |
  | `rows[].watch.observation_state.consecutiveAbsent`                                      | number        | Optional |                                                                                                             |
  | `rows[].watch.observation_state.nextCheckAt`                                            | string / null | Optional |                                                                                                             |
  | `rows[].watch.observation_state.reason`                                                 | string / null | Optional | Recorded explanation; null when no explanation applies.                                                     |
  | `rows[].watch.observation_state.latestAttempt`                                          | object / null | Optional |                                                                                                             |
  | `rows[].watch.observation_state.latestAttempt.state`                                    | string        | Optional | Saved lifecycle or evidence state, as enumerated for this record.                                           |
  | `rows[].watch.observation_state.latestAttempt.reason`                                   | string / null | Optional | Recorded explanation; null when no explanation applies.                                                     |
  | `rows[].watch.observation_state.latestAttempt.checkedAt`                                | string        | Optional |                                                                                                             |
  | `rows[].watch.observation_state.latestAttempt.httpStatus`                               | number / null | Optional |                                                                                                             |
  | `rows[].watch.observation_state.latestAttempt.occurrenceCount`                          | number        | Optional |                                                                                                             |
  | `rows[].watch.observation_state.latestAttempt.occurrences`                              | array         | Optional |                                                                                                             |
  | `rows[].watch.observation_state.latestAttempt.occurrences[].href`                       | string / null | Optional |                                                                                                             |
  | `rows[].watch.observation_state.latestAttempt.occurrences[].targetUrl`                  | string / null | Optional |                                                                                                             |
  | `rows[].watch.observation_state.latestAttempt.occurrences[].anchor`                     | string / null | Optional |                                                                                                             |
  | `rows[].watch.observation_state.latestAttempt.occurrences[].rel`                        | array         | Optional |                                                                                                             |
  | `rows[].watch.observation_state.latestAttempt.occurrences[].context`                    | string / null | Optional |                                                                                                             |
  | `rows[].watch.observation_state.latestAttempt.occurrences[].locator`                    | object / null | Optional |                                                                                                             |
  | `rows[].watch.observation_state.latestAttempt.occurrences[].locator.line`               | number / null | Optional |                                                                                                             |
  | `rows[].watch.observation_state.latestAttempt.occurrences[].locator.column`             | number / null | Optional |                                                                                                             |
  | `rows[].watch.observation_state.latestAttempt.occurrences[].locator.offset`             | number / null | Optional |                                                                                                             |
  | `rows[].watch.observation_state.latestAttempt.checkerVersion`                           | string        | Optional |                                                                                                             |
  | `rows[].watch.observation_state.lastSuccessfulObservation`                              | object / null | Optional |                                                                                                             |
  | `rows[].watch.observation_state.lastSuccessfulObservation.state`                        | string        | Optional | Saved lifecycle or evidence state, as enumerated for this record.                                           |
  | `rows[].watch.observation_state.lastSuccessfulObservation.reason`                       | string / null | Optional | Recorded explanation; null when no explanation applies.                                                     |
  | `rows[].watch.observation_state.lastSuccessfulObservation.checkedAt`                    | string        | Optional |                                                                                                             |
  | `rows[].watch.observation_state.lastSuccessfulObservation.httpStatus`                   | number / null | Optional |                                                                                                             |
  | `rows[].watch.observation_state.lastSuccessfulObservation.occurrenceCount`              | number        | Optional |                                                                                                             |
  | `rows[].watch.observation_state.lastSuccessfulObservation.occurrences`                  | array         | Optional |                                                                                                             |
  | `rows[].watch.observation_state.lastSuccessfulObservation.occurrences[].href`           | string / null | Optional |                                                                                                             |
  | `rows[].watch.observation_state.lastSuccessfulObservation.occurrences[].targetUrl`      | string / null | Optional |                                                                                                             |
  | `rows[].watch.observation_state.lastSuccessfulObservation.occurrences[].anchor`         | string / null | Optional |                                                                                                             |
  | `rows[].watch.observation_state.lastSuccessfulObservation.occurrences[].rel`            | array         | Optional |                                                                                                             |
  | `rows[].watch.observation_state.lastSuccessfulObservation.occurrences[].context`        | string / null | Optional |                                                                                                             |
  | `rows[].watch.observation_state.lastSuccessfulObservation.occurrences[].locator`        | object / null | Optional |                                                                                                             |
  | `rows[].watch.observation_state.lastSuccessfulObservation.occurrences[].locator.line`   | number / null | Optional |                                                                                                             |
  | `rows[].watch.observation_state.lastSuccessfulObservation.occurrences[].locator.column` | number / null | Optional |                                                                                                             |
  | `rows[].watch.observation_state.lastSuccessfulObservation.occurrences[].locator.offset` | number / null | Optional |                                                                                                             |
  | `rows[].watch.observation_state.lastSuccessfulObservation.checkerVersion`               | string        | Optional |                                                                                                             |
  | `rows[].watch.observation_state.lastSuccessfulObservationSameAsLatestAttempt`           | boolean       | Optional |                                                                                                             |
  | `rows[].watch.observation_state.confirmedState`                                         | string / null | Optional |                                                                                                             |
  | `rows[].watch.observation_state.lastSuccessfulAt`                                       | string / null | Optional |                                                                                                             |
  | `rows[].watch.observation_state.lastHealthyAt`                                          | string / null | Optional |                                                                                                             |
  | `rows[].watch.observation_state.firstUnavailableAt`                                     | string / null | Optional |                                                                                                             |
  | `rows[].watch.observation_state.unavailableCount`                                       | number        | Optional |                                                                                                             |
  | `rows[].watch.observation_state.wasEverHealthy`                                         | boolean       | Optional |                                                                                                             |
  | `rows[].watch.observation_state.retryNotBefore`                                         | string / null | Optional |                                                                                                             |
  | `rows[].watch.observation_state.ignored`                                                | boolean       | Optional |                                                                                                             |
  | `rows[].watch.created_at`                                                               | string        | Required | UTC timestamp when the record was created.                                                                  |
  | `rows[].watch.updated_at`                                                               | string        | Required | UTC timestamp of the last record update.                                                                    |
  | `rows[].watch.last_attempt_at`                                                          | string / null | Required |                                                                                                             |
  | `rows[].watch.last_success_at`                                                          | string / null | Required |                                                                                                             |
  | `rows[].watch.last_observation_id`                                                      | string / null | Required | Identifier returned by the related operation.                                                               |
  | `rows[].watch.next_check_at`                                                            | string / null | Required |                                                                                                             |
  | `rows[].watch.overdue_reason`                                                           | string / null | Required |                                                                                                             |
  | `rows[].watch.source_url`                                                               | string        | Required | Publisher page URL recorded in this evidence.                                                               |
  | `rows[].watch.target_url`                                                               | string        | Required | Destination URL recorded in this evidence.                                                                  |
  | `rows[].watch.target_scope`                                                             | string        | Required |                                                                                                             |
  | `rows[].watch.expected_anchor`                                                          | string / null | Required |                                                                                                             |
  | `rows[].watch.expected_rel`                                                             | array / null  | Required |                                                                                                             |
  | `rows[].watch.local_reference`                                                          | string / null | Required | Customer reference for joining this record to a local ledger entry.                                         |
  | `rows[].watch.last_successful_observation_id`                                           | string / null | Required | Identifier returned by the related operation.                                                               |
  | `rows[].watch.history_compacted_before`                                                 | string / null | Optional |                                                                                                             |
  | `rows[].watch.created`                                                                  | boolean       | Optional | True when this request created the record; false when an existing record was reused.                        |
  | `rows[].watch.detail`                                                                   | string        | Optional |                                                                                                             |
  | `rows[].error`                                                                          | object        | Optional |                                                                                                             |
  | `rows[].error.code`                                                                     | string        | Required |                                                                                                             |
  | `rows[].error.message`                                                                  | string        | Required |                                                                                                             |
  | `rows[].error.admission`                                                                | object        | Optional | additional fields rejected                                                                                  |
  | `rows[].error.admission.index`                                                          | integer       | Required | minimum: 0; maximum: 9007199254740991                                                                       |
  | `rows[].error.admission.url`                                                            | string        | Required |                                                                                                             |
  | `rows[].error.admission.normalized_url`                                                 | string / null | Required |                                                                                                             |
  | `rows[].error.admission.host`                                                           | string / null | Required |                                                                                                             |
  | `rows[].error.admission.decision`                                                       | string        | Required | values: "admitted", "rejected"                                                                              |
  | `rows[].error.admission.reason`                                                         | string        | Required | Recorded explanation; null when no explanation applies.                                                     |
  | `rows[].error.admission.rule_kind`                                                      | string / null | Required |                                                                                                             |
  | `rows[].error.admission.rule_id`                                                        | string / null | Required | Identifier returned by the related operation.                                                               |
  | `rows[].error.admission.rule_value`                                                     | string / null | Required |                                                                                                             |
  | `rows[].error.admission.cap`                                                            | object / null | Required |                                                                                                             |
  | `rows[].error.admission.cap.limit`                                                      | integer       | Required | maximum: 9007199254740991; exclusiveMinimum: 0                                                              |
  | `rows[].error.admission.cap.used`                                                       | integer       | Required | minimum: 0; maximum: 9007199254740991                                                                       |
  | `rows[].error.admission.subject_key`                                                    | string        | Required |                                                                                                             |
  | `imported`                                                                              | number        | Required |                                                                                                             |
  | `accepted`                                                                              | number        | Required |                                                                                                             |
  | `created`                                                                               | number        | Required | True when this request created the record; false when an existing record was reused.                        |
  | `existing`                                                                              | number        | Required |                                                                                                             |
  | `failed`                                                                                | number        | Required |                                                                                                             |
</Accordion>

[Download input schema](/schemas/import_link_watches.input.json) · [Download output schema](/schemas/import_link_watches.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                                       |
| ------------------------- | ------- | --------------------------------------------- |
| `POST /v1/watches/import` | 201     | Remaining arguments go in a JSON object body. |

## Continue

[list\_link\_watches](/reference/commands/list_link_watches)

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