---
title: "Set a component's version or branch, or stop monitoring it."
method: PATCH
path: "/surveillance/components/{id}"
tags: ["surveillance"]
---

# Set a component's version or branch, or stop monitoring it.

`PATCH /surveillance/components/{id}`

## Request

- Base URL: `https://api.ismalicious.com`
- URL: `https://api.ismalicious.com/surveillance/components/{id}`
- Auth: one of:
  - API key in header `X-API-KEY`
  - HTTP bearer
  - HTTP basic

## Path parameters

- `id` string, required

## Request body

- UpdateComponentRequest
  - `dependencyScope` 'Direct' | 'Transitive' | 'Dev' | 'NotApplicable': `WatchComponent.dependencyScope`.
  - `monitored` boolean, nullable
  - `version` string, nullable
  - `versionBranch` string, nullable

## Response `200`

OK

- SourceDetailResponse
  - `components` WatchComponentDto[], required
    - `cpe` string, nullable
    - `cpeProduct` string, nullable
    - `cpeVendor` string, nullable
    - `dependencyScope` 'Direct' | 'Transitive' | 'Dev' | 'NotApplicable', required: `WatchComponent.dependencyScope`.
    - `ecosystem` string, nullable
    - `firstSeenAt` string, date-time, required
    - `id` string, required
    - `identityKey` string, required
    - `lastSeenAt` string, date-time, required
    - `monitored` boolean, required
    - `name` string, required
    - `openFindingCount` integer, required
    - `packageName` string, nullable
    - `purl` string, nullable
    - `removedAt` string, date-time, nullable
    - `sourceId` string, required
    - `version` string, nullable
    - `versionBranch` string, nullable
    - `versionEvidence` string, nullable
    - `versionSource` 'Header' | 'MetaTag' | 'ScriptPath' | 'PortBanner' | 'Lockfile' | 'Sbom' | 'Manual' | 'LegacyCpe' | 'None', required: `WatchComponent.versionSource` — where the version was read.
    - `versionVerified` boolean, required
  - `source` WatchSourceDto, required
    - `componentCount` integer, required
    - `createdAt` string, date-time, required
    - `description` string, nullable
    - `domain` string, nullable
    - `id` string, required
    - `isDefault` boolean, required
    - `kind` 'Domain' | 'Lockfile' | 'Manual', required: `WatchSource.kind` — the unit of sale.
    - `lastReadAt` string, date-time, nullable
    - `lastReadError` string, nullable
    - `lastReadStatus` 'Ok' | 'Partial' | 'Unreachable' | 'Refused' | 'ParseError': `WatchSource.lastReadStatus`.
    - `legacyPerimeterId` string, nullable
    - `lockfileFormat` 'PackageLock' | 'ComposerLock' | 'Requirements' | 'GemfileLock' | 'CargoLock' | 'CycloneDx': `WatchSource.lockfileFormat`.
    - `monitoredCount` integer, required
    - `name` string, required
    - `nextReadAt` string, date-time, nullable
    - `openFindingCount` integer, required
    - `status` 'Active' | 'Paused', required: `WatchSource.status`.

## Other responses

- `400`: Invalid request
- `401`: Unauthorized
- `404`: Not found in this organisation
- `409`: The source already holds that component at that version

## Changes

- **2026-10-23** `7c8ce9039cf7`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/ismalicious/apis/ismalicious-threat-intelligence-api/changes/surveillance/components/:id/patch.md)

---

[API](https://skmtc.dev/ismalicious/apis/ismalicious-threat-intelligence-api.md) - [All operations](https://skmtc.dev/ismalicious/apis/ismalicious-threat-intelligence-api/llms.txt) - [OpenAPI document](https://skmtc.dev/ismalicious/apis/ismalicious-threat-intelligence-api/revisions/b6f45e6169a7?raw)
