---
title: "Regenerate threat model"
method: POST
path: "/api/threat-model/regenerate"
tags: ["Threat Model"]
---

# Regenerate threat model

`POST /api/threat-model/regenerate`

## Request

- Base URL: `https://app.cotool.ai`
- URL: `https://app.cotool.ai/api/threat-model/regenerate`
- Auth: HTTP bearer

Enqueue a threat model regeneration job using current environment data.

## Request body

- object
  - `changeDescription` string, nullable: Optional reason shown on the new AI-authored version

## Response `200`

Successful response

- object
  - `jobId` string, uuid, required
  - `startedLocally` boolean, required

## Other responses

- `400`: Bad request — input validation failed or the request was malformed
- `401`: Unauthorized — missing or invalid API key / session
- `403`: Forbidden — the authenticated user lacks the required permissions
- `500`: Internal server error

---

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