Change your draft by hand
const url = 'https://forge.example.com/api/drafts/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/elements';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"confirmAll":false,"confirm":[{"kind":"example","name":"example"}],"remove":[{"kind":"example","name":"example"}],"retype":[{"name":"example","type":"example"}],"add":[{"kind":"example","zone":"example","values":{}}],"change":[{"kind":"example","name":"example","values":{}}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://forge.example.com/api/drafts/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/elements \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "confirmAll": false, "confirm": [ { "kind": "example", "name": "example" } ], "remove": [ { "kind": "example", "name": "example" } ], "retype": [ { "name": "example", "type": "example" } ], "add": [ { "kind": "example", "zone": "example", "values": {} } ], "change": [ { "kind": "example", "name": "example", "values": {} } ] }'add adds elements: each with its kind, its values by the field names the vocabulary gives, and for an appliance the zone it sits on; a zone, appliance, node or flow may be given its name, or one is made from its label, and a threat or a control gets the next free id; added in the answer names them. change sets fields of an element by kind and name, or of the model’s own details with the kind model; a value of null or an empty text takes an optional field out. An element’s name is not changed: change its label. confirmAll, or confirm with elements by kind (zone, appliance, node, flow, threat, control) and name (a threat’s or a control’s id), takes the mark of a suggestion off them. remove takes elements out, with what depends on them: a node’s flows, and the threat targets that pointed at what was removed; a zone must be empty first. retype says what type a node is. No AI is used. The engine fills in what it computes (a threat’s rating and score, its list of controls, labels in Title Case), and the change is kept only if the engine still accepts the model: answers 409 with the engine’s first error when it would not.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”object
object
object
object
object
object
object
object
Responses
Section titled “Responses”OK
object
Example generated
{ "confirmed": 1, "removed": 1, "retyped": 1, "stillSuggested": 1, "isValid": true, "errorCount": 1, "warningCount": 1, "updatedAt": "2026-04-15T12:00:00Z", "added": [ "example" ], "changed": 1}default
Section titled “default”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.
object
Example generated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}