---
title: "update_target"
method: PATCH
path: "/v1/targets/{targetId}"
---

# update_target

`PATCH /v1/targets/{targetId}`

## Request

- Base URL: `https://app.agentlinkops.com`
- URL: `https://app.agentlinkops.com/v1/targets/{targetId}`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer

Remaining arguments go in a JSON object body.

## Path parameters

- `targetId` string, required: target ID from create/list.

## Headers

- `X-Workspace-ID` string

## Request body

- object
  - `status` 'active' | 'paused': Lifecycle status, separate from observed state.
  - `cadenceSeconds` integer: Check interval: 3600 to 2592000 seconds.

## Response `200`

Remaining arguments go in a JSON object body.

- object
  - `id` string, required: Resource identifier returned by the operation.
  - `workspace_id` string, required: Workspace that owns this record.
  - `project_id` string, required: Project that owns this record.
  - `status` 'active' | 'paused', required: Resource lifecycle status.
  - `cadence_seconds` number, required
  - `state` string, required: Saved lifecycle or evidence state, as enumerated for this record.
  - `observation_state` object, required: Saved observation state. Before the first check, this object can be empty.
    - `state` string: Saved lifecycle or evidence state, as enumerated for this record.
    - `uncertain` boolean
    - `checked_at` string: UTC timestamp of the saved check.
    - `lastChangedAt` string, nullable
    - `firstAbsentAt` string, nullable
    - `nextCheckAt` string, nullable
    - `reason` string, nullable: Recorded explanation; null when no explanation applies.
    - `latestAttempt` object, nullable
      - `state` string: Saved lifecycle or evidence state, as enumerated for this record.
      - `reason` string, nullable: Recorded explanation; null when no explanation applies.
      - `checkedAt` string
      - `httpStatus` number, nullable
      - `occurrenceCount` number
      - `occurrences` object[]
        - `href` string, nullable
        - `targetUrl` string, nullable
        - `anchor` string, nullable
        - `rel` string[]
        - `context` string, nullable
        - `locator` object, nullable
          - `line` number, nullable
          - `column` number, nullable
          - `offset` number, nullable
      - `checkerVersion` string
    - `lastSuccessfulObservation` object, nullable
      - `state` string: Saved lifecycle or evidence state, as enumerated for this record.
      - `reason` string, nullable: Recorded explanation; null when no explanation applies.
      - `checkedAt` string
      - `httpStatus` number, nullable
      - `occurrenceCount` number
      - `occurrences` object[]
        - `href` string, nullable
        - `targetUrl` string, nullable
        - `anchor` string, nullable
        - `rel` string[]
        - `context` string, nullable
        - `locator` object, nullable
          - `line` number, nullable
          - `column` number, nullable
          - `offset` number, nullable
      - `checkerVersion` string
    - `lastSuccessfulObservationSameAsLatestAttempt` boolean
    - `confirmedState` string, nullable
    - `lastSuccessfulAt` string, nullable
    - `lastHealthyAt` string, nullable
    - `firstUnavailableAt` string, nullable
    - `unavailableCount` number
    - `wasEverHealthy` boolean
    - `retryNotBefore` string, nullable
    - `ignored` boolean
  - `created_at` string, required: UTC timestamp when the record was created.
  - `updated_at` string, required: UTC timestamp of the last record update.
  - `last_attempt_at` string, nullable, required
  - `last_success_at` string, nullable, required
  - `last_observation_id` string, nullable, required
  - `next_check_at` string, nullable, required
  - `overdue_reason` string, nullable, required
  - `url` string, required
  - `created` boolean: True when this request created the record; false when an existing record was reused.
  - `last_successful_observation_id` string, nullable

## Other responses

- `429`: Request-rate or usage refusal. Inspect error.code and recovery details before retrying.
- `default`: Error envelope. Non-configuration 5xx messages are masked and details omitted; allowlisted configuration errors retain static operator recovery.

---

[API](https://skmtc.dev/agentlinkops/apis/agentlinkops-http-api.md) · [All operations](https://skmtc.dev/agentlinkops/apis/agentlinkops-http-api/llms.txt) · [OpenAPI document](https://skmtc.dev/agentlinkops/apis/agentlinkops-http-api/revisions/2a712a1dcfa7?raw)
