Skip to content

Add the engine's rule threats to your draft

POST
/api/drafts/{id}/rule-threats
curl --request POST \
--url https://forge.example.com/api/drafts/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/rule-threats \
--header 'Authorization: Bearer <token>'

Suggest Threats by Rule: the engine’s own rules write the threats they find into the draft, each marked suggested with the rule it came from, and the engine fills in their ratings, as a change by hand does. A rule already applied is not applied again, so a second call adds only what is new. No AI is used, so this works where the classification switches the assistant off; where it is on, line is also stored in the draft’s conversation and noted is true. added lists the threats by id and title. Answers 409 while the draft is empty, while a turn of the assistant is running on it, or when the threats would add an error.

id
required
string format: uuid

OK

Media typeapplication/json
object
added
required
Array<object>
object
id
required
string
title
required
string
isValid
required
boolean
errorCount
required
integer | string format: int32
/^-?(?:0|[1-9]\d*)$/
warningCount
required
integer | string format: int32
/^-?(?:0|[1-9]\d*)$/
updatedAt
required
string format: date-time
line
required
string
noted
required
boolean

Example generated

{
"added": [
{
"id": "example",
"title": "example"
}
],
"isValid": true,
"errorCount": 1,
"warningCount": 1,
"updatedAt": "2026-04-15T12:00:00Z",
"line": "example",
"noted": true
}

A refusal or an error, as a problem document. A model or draft you may not see answers 404, as one that does not exist.

Media typeapplication/problem+json
object
type
string
title
string
status
integer
detail
string
instance
string

Example generated

{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example"
}