---
title: "# Update Threat"
method: PUT
path: "/v1/threat-library/threats/{ThreatId}"
tags: ["Threats"]
---

# # Update Threat

`PUT /v1/threat-library/threats/{ThreatId}`

## Request

- Base URL: `https://api.picussecurity.com`
- URL: `https://api.picussecurity.com/v1/threat-library/threats/{ThreatId}`
- Auth: API key in header `Authorization`
- TypeScript: <https://skmtc.dev/picussecurity/apis/picus-rest-api/docs/v1/threat-library/threats/:ThreatId/put.ts> (a function with typed inputs; its response is checked against the schema)

Updates custom threats with given arguments

## Path parameters

- `ThreatId` integer, required

## Request body

- object
  - `affected_os` string[]: Affected OS [Windows]
  - `description` string: Description
  - `from_campaign` integer: from threat id
  - `name` string: Name
  - `objectives` CustomCampaignObjectiveParams[]: Objectives
    - `action_ids` integer[], required
    - `name` string, required
    - `result_condition` string, required
  - `result_condition` string: Result condition type: string
  - `severity` string: Threat severity level options: `High`, `Medium` and `Low`
  - `tags` string[]: Tags
  - `threat_actor_id` NullInt64
    - `Int64` integer
    - `Valid` boolean

## Response `200`

ThreatUpdateReturnResponse

- object
  - `threat` CapiThreatDTO
    - `affected_os` string[]
    - `created_at` string, date-time
    - `description` string
    - `display_id` integer
    - `id` integer
    - `name` string
    - `severity` string
    - `tags` string[]

## Other responses

- `422`: validationErrorSwagger is represents the erroneous cases
- `default`: genericErrorSwagger is represents the erroneous cases

---

[API](https://skmtc.dev/picussecurity/apis/picus-rest-api.md) - [All operations](https://skmtc.dev/picussecurity/apis/picus-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/picussecurity/apis/picus-rest-api/revisions/319e45a98304?raw)
