Threat Model

Create or update a custom threat-model section

Create or update a custom (user-titled) threat-model section. Custom sections render after the fixed sections in the agent prompt's <threat_model> block and are useful for codebase-specific notes that don't fit the standard taxonomy (e.g. 'Vendor Integrations', 'Compliance Notes'). Pass id to update an existing section; omit id to create a new one. Sections render in creation order — there is no user-controlled reordering. Requires ORG_EDIT_SAST_CONFIG.

post/api/v2/threatModel/upsertCustomSection

Request

  • Base URL
    https://zeropath.com
  • Auth
    API key in header X-ZeroPath-API-Token-Id and API key in header X-ZeroPath-API-Token-Secret

Request body

organizationIdstring

Organization that owns the threat model.

threatModelIdstring required

cuid of the ThreatModel the section belongs to. Returned as threatModel.id from threatModel.getByApplication.

idstring

cuid of the existing ThreatModelCustomSection to update. Omit to create a new section.

titlestring required

Section heading. Required and must be non-empty.

meaningstring required

1-3 sentence description of what this section captures. Required and must be non-empty. Rendered into the agent prompt's <threat_model> block as a <meaning> tag alongside the section's <content>, so consumer LLMs can interpret what role the section plays in the threat model.

contentstring required

Markdown body for the section. May be empty.

Response

Custom section created or updated

idstring required
titlestring required
meaningstring required
contentstring required
updatedAtstring date-time required

Changes

No recorded changes to this operation across all 1 revision of this API.