---
title: "# Create Threat"
method: POST
path: "/v1/threat-library/threats"
tags: ["Threats"]
---

# # Create Threat

`POST /v1/threat-library/threats`

Creates custom threats with given arguments

## Request body

- object
  - `affected_os` string[] — Affected OS [Windows]
  - `description` string — Description
  - `from_campaign` integer — from threat id
  - `name` string, required — Name
  - `objectives` CustomCampaignObjectiveParams[], required — Objectives
    - `action_ids` integer[], required
    - `name` string, required
    - `result_condition` string, required
  - `result_condition` string, required — 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`

ThreatCreateReturnResponse

- 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.net/picussecurity/apis/picus-rest-api.md) · [All operations](https://skmtc.net/picussecurity/apis/picus-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/picussecurity/picus-rest-api/versions/cb0d02ee28f8/schema)
