> For the complete documentation index, see [llms.txt](https://docs.dropzone.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.dropzone.ai/api/custom-strategies.md).

# Custom Strategies

## GET /app/api/v1/custom-strategies

> List all custom strategies. Use is\_protected filter to distinguish between user-created and OOTB strategies.

```json
{"openapi":"3.0.3","info":{"title":"Dropzone AI","version":"0.1.0"},"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"Authorization"}},"schemas":{"DetailedCustomStrategyVersion":{"type":"object","description":"A strategy version with usage telemetry on the version and on every sub-component.\n\nThis is the expensive shape: each outcome, instruction, and priority costs at least one\ncount query. Only use it where the telemetry is rendered.","properties":{"id":{"type":"integer","readOnly":true},"internal_origin_uuid":{"type":"string","format":"uuid","readOnly":true},"created_at":{"type":"string","format":"date-time","readOnly":true},"updated_at":{"type":"string","format":"date-time","readOnly":true},"title":{"type":"string","readOnly":true},"rationale":{"type":"string","readOnly":true,"nullable":true},"toggle_guidance":{"type":"string","readOnly":true,"nullable":true},"is_enabled":{"type":"boolean","readOnly":true},"is_archived":{"type":"boolean","readOnly":true},"is_protected":{"type":"boolean","readOnly":true},"version_id":{"type":"integer","readOnly":true},"attack_surfaces":{"type":"array","items":{"type":"string"}},"mitre_tactics":{"type":"array","items":{"type":"string"}},"alert_sources":{"type":"array","items":{"type":"string"}},"scenario":{"type":"string","nullable":true},"outcomes":{"type":"array","items":{"$ref":"#/components/schemas/DetailedCustomOutcome"},"readOnly":true},"instructions":{"type":"array","items":{"$ref":"#/components/schemas/DetailedCustomInstruction"},"readOnly":true},"priorities":{"type":"array","items":{"$ref":"#/components/schemas/DetailedCustomPriority"},"readOnly":true},"actions":{"type":"array","items":{"$ref":"#/components/schemas/CustomAction"},"readOnly":true},"is_latest":{"type":"boolean","readOnly":true},"total_usage":{"type":"integer","nullable":true,"readOnly":true}},"required":["actions","created_at","id","instructions","internal_origin_uuid","is_archived","is_enabled","is_latest","is_protected","outcomes","priorities","rationale","title","toggle_guidance","total_usage","updated_at","version_id"]},"DetailedCustomOutcome":{"type":"object","description":"Adds usage telemetry to the base outcome.","properties":{"id":{"type":"integer"},"conclusions_affected":{"type":"integer","readOnly":true},"created_at":{"type":"string","format":"date-time","readOnly":true},"condition":{},"outcome":{"$ref":"#/components/schemas/DetailedCustomOutcomeOutcomeEnum"},"close_investigation_on_match":{"type":"boolean"},"internal_origin_uuid":{"type":"string","format":"uuid","readOnly":true,"nullable":true},"strategy_versions":{"type":"array","items":{"type":"integer"},"readOnly":true}},"required":["conclusions_affected","condition","created_at","internal_origin_uuid","outcome","strategy_versions"]},"DetailedCustomOutcomeOutcomeEnum":{"enum":["COMPLETED_BREACHED_CONFIRMED","COMPLETED_BREACHED_SUSPICIOUS","COMPLETED_FALSE_ALERT","IGNORED"],"type":"string","description":"* `COMPLETED_BREACHED_CONFIRMED` - COMPLETED_BREACHED_CONFIRMED\n* `COMPLETED_BREACHED_SUSPICIOUS` - COMPLETED_BREACHED_SUSPICIOUS\n* `COMPLETED_FALSE_ALERT` - COMPLETED_FALSE_ALERT\n* `IGNORED` - IGNORED"},"DetailedCustomInstruction":{"type":"object","description":"Adds usage telemetry to the base instruction.","properties":{"id":{"type":"integer"},"usage_count":{"type":"integer","readOnly":true},"last_used_at":{"type":"string","format":"date-time","nullable":true,"readOnly":true},"created_at":{"type":"string","format":"date-time","readOnly":true},"content":{"type":"string"},"internal_origin_uuid":{"type":"string","format":"uuid","readOnly":true,"nullable":true},"strategy_versions":{"type":"array","items":{"type":"integer"},"readOnly":true}},"required":["content","created_at","internal_origin_uuid","last_used_at","strategy_versions","usage_count"]},"DetailedCustomPriority":{"type":"object","description":"Adds usage telemetry to the base priority.","properties":{"id":{"type":"integer"},"priorities_affected":{"type":"integer","readOnly":true},"created_at":{"type":"string","format":"date-time","readOnly":true},"priority":{"$ref":"#/components/schemas/PriorityEnum"},"outcomes":{"type":"array","items":{"$ref":"#/components/schemas/InvestigationOutcomeEnum"},"minItems":1},"insight_tag_rule":{"nullable":true},"ranking":{"type":"integer","maximum":2147483647,"minimum":1},"internal_origin_uuid":{"type":"string","format":"uuid","readOnly":true,"nullable":true},"strategy_versions":{"type":"array","items":{"type":"integer"},"readOnly":true}},"required":["created_at","internal_origin_uuid","priorities_affected","priority","strategy_versions"]},"PriorityEnum":{"enum":["informational","notable","urgent"],"type":"string","description":"* `informational` - Informational\n* `notable` - Notable\n* `urgent` - Urgent"},"InvestigationOutcomeEnum":{"enum":["COMPLETED_BREACHED_CONFIRMED","COMPLETED_BREACHED_SUSPICIOUS","COMPLETED_FALSE_ALERT","INCOMPLETE","IGNORED"],"type":"string","description":"* `COMPLETED_BREACHED_CONFIRMED` - COMPLETED_BREACHED_CONFIRMED\n* `COMPLETED_BREACHED_SUSPICIOUS` - COMPLETED_BREACHED_SUSPICIOUS\n* `COMPLETED_FALSE_ALERT` - COMPLETED_FALSE_ALERT\n* `INCOMPLETE` - INCOMPLETE\n* `IGNORED` - IGNORED"},"CustomAction":{"type":"object","description":"Lets the strategy updater ask each sub-component serializer whether the data changes an instance.","properties":{"id":{"type":"string","format":"uuid"},"input":{},"template_slot":{"type":"string","format":"uuid","nullable":true},"response_script":{"type":"integer","nullable":true},"created_at":{"type":"string","format":"date-time","readOnly":true},"target_type":{"$ref":"#/components/schemas/TargetTypeEnum"},"operation":{"type":"string"},"trigger_phase":{"$ref":"#/components/schemas/TriggerPhaseEnum"},"lineage":{"type":"string","format":"uuid","readOnly":true},"internal_origin_uuid":{"type":"string","format":"uuid","readOnly":true,"nullable":true},"approval_policy":{"type":"string","format":"uuid","readOnly":true,"nullable":true}},"required":["approval_policy","created_at","internal_origin_uuid","lineage","target_type","trigger_phase"]},"TargetTypeEnum":{"enum":["template","script"],"type":"string","description":"* `template` - Template\n* `script` - Script"},"TriggerPhaseEnum":{"enum":["match","complete","both"],"type":"string","description":"* `match` - Match\n* `complete` - Complete\n* `both` - Both"}}},"paths":{"/app/api/v1/custom-strategies":{"get":{"operationId":"custom_strategies_list_external","description":"List all custom strategies. Use is_protected filter to distinguish between user-created and OOTB strategies.","parameters":[{"in":"query","name":"alert_sources","schema":{"type":"array","items":{"type":"string"}},"description":"Filter by alert sources"},{"in":"query","name":"attack_surfaces","schema":{"type":"array","items":{"type":"string"}},"description":"Filter by attack surfaces"},{"in":"query","name":"is_archived","schema":{"type":"boolean"},"description":"Filter by archived status"},{"in":"query","name":"is_enabled","schema":{"type":"boolean"},"description":"Filter by enabled status"},{"in":"query","name":"is_protected","schema":{"type":"boolean"},"description":"Filter by protected status (true=OOTB, false=user-created)"},{"in":"query","name":"mitre_tactics","schema":{"type":"array","items":{"type":"string"}},"description":"Filter by MITRE tactics"},{"in":"query","name":"search_query","schema":{"type":"string"},"description":"Search in strategy title and scenario"}],"tags":["custom-strategies"],"responses":{"200":{"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DetailedCustomStrategyVersion"}}}},"description":"List of custom strategies"},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"error_msg":{"type":"string"}}}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"},"error_msg":{"type":"string"},"required_permission":{"type":"object","description":"RBAC permission the caller lacks. Present when the permission check denies the request.","properties":{"resource":{"type":"string"},"action":{"type":"string"}}}}}}},"description":"Access denied"},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"error_msg":{"type":"string"}}}}},"description":"System error"},"503":{"content":{"application/json":{"schema":{"type":"object","properties":{"error_msg":{"type":"string"}}}}},"description":"System not ready for requests"}}}}}}
```

## POST /app/api/v1/custom-strategies

> Create a new custom strategy

```json
{"openapi":"3.0.3","info":{"title":"Dropzone AI","version":"0.1.0"},"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"Authorization"}},"schemas":{"DetailedCustomStrategyVersion":{"type":"object","description":"A strategy version with usage telemetry on the version and on every sub-component.\n\nThis is the expensive shape: each outcome, instruction, and priority costs at least one\ncount query. Only use it where the telemetry is rendered.","properties":{"id":{"type":"integer","readOnly":true},"internal_origin_uuid":{"type":"string","format":"uuid","readOnly":true},"created_at":{"type":"string","format":"date-time","readOnly":true},"updated_at":{"type":"string","format":"date-time","readOnly":true},"title":{"type":"string","readOnly":true},"rationale":{"type":"string","readOnly":true,"nullable":true},"toggle_guidance":{"type":"string","readOnly":true,"nullable":true},"is_enabled":{"type":"boolean","readOnly":true},"is_archived":{"type":"boolean","readOnly":true},"is_protected":{"type":"boolean","readOnly":true},"version_id":{"type":"integer","readOnly":true},"attack_surfaces":{"type":"array","items":{"type":"string"}},"mitre_tactics":{"type":"array","items":{"type":"string"}},"alert_sources":{"type":"array","items":{"type":"string"}},"scenario":{"type":"string","nullable":true},"outcomes":{"type":"array","items":{"$ref":"#/components/schemas/DetailedCustomOutcome"},"readOnly":true},"instructions":{"type":"array","items":{"$ref":"#/components/schemas/DetailedCustomInstruction"},"readOnly":true},"priorities":{"type":"array","items":{"$ref":"#/components/schemas/DetailedCustomPriority"},"readOnly":true},"actions":{"type":"array","items":{"$ref":"#/components/schemas/CustomAction"},"readOnly":true},"is_latest":{"type":"boolean","readOnly":true},"total_usage":{"type":"integer","nullable":true,"readOnly":true}},"required":["actions","created_at","id","instructions","internal_origin_uuid","is_archived","is_enabled","is_latest","is_protected","outcomes","priorities","rationale","title","toggle_guidance","total_usage","updated_at","version_id"]},"DetailedCustomOutcome":{"type":"object","description":"Adds usage telemetry to the base outcome.","properties":{"id":{"type":"integer"},"conclusions_affected":{"type":"integer","readOnly":true},"created_at":{"type":"string","format":"date-time","readOnly":true},"condition":{},"outcome":{"$ref":"#/components/schemas/DetailedCustomOutcomeOutcomeEnum"},"close_investigation_on_match":{"type":"boolean"},"internal_origin_uuid":{"type":"string","format":"uuid","readOnly":true,"nullable":true},"strategy_versions":{"type":"array","items":{"type":"integer"},"readOnly":true}},"required":["conclusions_affected","condition","created_at","internal_origin_uuid","outcome","strategy_versions"]},"DetailedCustomOutcomeOutcomeEnum":{"enum":["COMPLETED_BREACHED_CONFIRMED","COMPLETED_BREACHED_SUSPICIOUS","COMPLETED_FALSE_ALERT","IGNORED"],"type":"string","description":"* `COMPLETED_BREACHED_CONFIRMED` - COMPLETED_BREACHED_CONFIRMED\n* `COMPLETED_BREACHED_SUSPICIOUS` - COMPLETED_BREACHED_SUSPICIOUS\n* `COMPLETED_FALSE_ALERT` - COMPLETED_FALSE_ALERT\n* `IGNORED` - IGNORED"},"DetailedCustomInstruction":{"type":"object","description":"Adds usage telemetry to the base instruction.","properties":{"id":{"type":"integer"},"usage_count":{"type":"integer","readOnly":true},"last_used_at":{"type":"string","format":"date-time","nullable":true,"readOnly":true},"created_at":{"type":"string","format":"date-time","readOnly":true},"content":{"type":"string"},"internal_origin_uuid":{"type":"string","format":"uuid","readOnly":true,"nullable":true},"strategy_versions":{"type":"array","items":{"type":"integer"},"readOnly":true}},"required":["content","created_at","internal_origin_uuid","last_used_at","strategy_versions","usage_count"]},"DetailedCustomPriority":{"type":"object","description":"Adds usage telemetry to the base priority.","properties":{"id":{"type":"integer"},"priorities_affected":{"type":"integer","readOnly":true},"created_at":{"type":"string","format":"date-time","readOnly":true},"priority":{"$ref":"#/components/schemas/PriorityEnum"},"outcomes":{"type":"array","items":{"$ref":"#/components/schemas/InvestigationOutcomeEnum"},"minItems":1},"insight_tag_rule":{"nullable":true},"ranking":{"type":"integer","maximum":2147483647,"minimum":1},"internal_origin_uuid":{"type":"string","format":"uuid","readOnly":true,"nullable":true},"strategy_versions":{"type":"array","items":{"type":"integer"},"readOnly":true}},"required":["created_at","internal_origin_uuid","priorities_affected","priority","strategy_versions"]},"PriorityEnum":{"enum":["informational","notable","urgent"],"type":"string","description":"* `informational` - Informational\n* `notable` - Notable\n* `urgent` - Urgent"},"InvestigationOutcomeEnum":{"enum":["COMPLETED_BREACHED_CONFIRMED","COMPLETED_BREACHED_SUSPICIOUS","COMPLETED_FALSE_ALERT","INCOMPLETE","IGNORED"],"type":"string","description":"* `COMPLETED_BREACHED_CONFIRMED` - COMPLETED_BREACHED_CONFIRMED\n* `COMPLETED_BREACHED_SUSPICIOUS` - COMPLETED_BREACHED_SUSPICIOUS\n* `COMPLETED_FALSE_ALERT` - COMPLETED_FALSE_ALERT\n* `INCOMPLETE` - INCOMPLETE\n* `IGNORED` - IGNORED"},"CustomAction":{"type":"object","description":"Lets the strategy updater ask each sub-component serializer whether the data changes an instance.","properties":{"id":{"type":"string","format":"uuid"},"input":{},"template_slot":{"type":"string","format":"uuid","nullable":true},"response_script":{"type":"integer","nullable":true},"created_at":{"type":"string","format":"date-time","readOnly":true},"target_type":{"$ref":"#/components/schemas/TargetTypeEnum"},"operation":{"type":"string"},"trigger_phase":{"$ref":"#/components/schemas/TriggerPhaseEnum"},"lineage":{"type":"string","format":"uuid","readOnly":true},"internal_origin_uuid":{"type":"string","format":"uuid","readOnly":true,"nullable":true},"approval_policy":{"type":"string","format":"uuid","readOnly":true,"nullable":true}},"required":["approval_policy","created_at","internal_origin_uuid","lineage","target_type","trigger_phase"]},"TargetTypeEnum":{"enum":["template","script"],"type":"string","description":"* `template` - Template\n* `script` - Script"},"TriggerPhaseEnum":{"enum":["match","complete","both"],"type":"string","description":"* `match` - Match\n* `complete` - Complete\n* `both` - Both"}}},"paths":{"/app/api/v1/custom-strategies":{"post":{"operationId":"custom_strategies_create_external","description":"Create a new custom strategy","tags":["custom-strategies"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string"},"is_enabled":{"type":"boolean","default":false},"attack_surfaces":{"type":"array","items":{"type":"string"}},"mitre_tactics":{"type":"array","items":{"type":"string"}},"alert_sources":{"type":"array","items":{"type":"string"}},"scenario":{"type":"string"},"outcomes":{"type":"array","items":{"type":"object"}},"instructions":{"type":"array","items":{"type":"object"}},"priorities":{"type":"array","items":{"type":"object"}}},"required":["title"]}}}},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetailedCustomStrategyVersion"}}},"description":"Custom strategy created successfully"},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"error_msg":{"type":"string"}}}}},"description":"Bad request - invalid input"},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"error_msg":{"type":"string"}}}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"},"error_msg":{"type":"string"},"required_permission":{"type":"object","description":"RBAC permission the caller lacks. Present when the permission check denies the request.","properties":{"resource":{"type":"string"},"action":{"type":"string"}}}}}}},"description":"Access denied"},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"error_msg":{"type":"string"}}}}},"description":"System error"},"503":{"content":{"application/json":{"schema":{"type":"object","properties":{"error_msg":{"type":"string"}}}}},"description":"System not ready for requests"}}}}}}
```

## GET /app/api/v1/custom-strategies/{strategy\_id}

> Get a specific custom strategy by ID. Includes both user-created and OOTB (protected) strategies.

```json
{"openapi":"3.0.3","info":{"title":"Dropzone AI","version":"0.1.0"},"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"Authorization"}},"schemas":{"DetailedCustomStrategyVersion":{"type":"object","description":"A strategy version with usage telemetry on the version and on every sub-component.\n\nThis is the expensive shape: each outcome, instruction, and priority costs at least one\ncount query. Only use it where the telemetry is rendered.","properties":{"id":{"type":"integer","readOnly":true},"internal_origin_uuid":{"type":"string","format":"uuid","readOnly":true},"created_at":{"type":"string","format":"date-time","readOnly":true},"updated_at":{"type":"string","format":"date-time","readOnly":true},"title":{"type":"string","readOnly":true},"rationale":{"type":"string","readOnly":true,"nullable":true},"toggle_guidance":{"type":"string","readOnly":true,"nullable":true},"is_enabled":{"type":"boolean","readOnly":true},"is_archived":{"type":"boolean","readOnly":true},"is_protected":{"type":"boolean","readOnly":true},"version_id":{"type":"integer","readOnly":true},"attack_surfaces":{"type":"array","items":{"type":"string"}},"mitre_tactics":{"type":"array","items":{"type":"string"}},"alert_sources":{"type":"array","items":{"type":"string"}},"scenario":{"type":"string","nullable":true},"outcomes":{"type":"array","items":{"$ref":"#/components/schemas/DetailedCustomOutcome"},"readOnly":true},"instructions":{"type":"array","items":{"$ref":"#/components/schemas/DetailedCustomInstruction"},"readOnly":true},"priorities":{"type":"array","items":{"$ref":"#/components/schemas/DetailedCustomPriority"},"readOnly":true},"actions":{"type":"array","items":{"$ref":"#/components/schemas/CustomAction"},"readOnly":true},"is_latest":{"type":"boolean","readOnly":true},"total_usage":{"type":"integer","nullable":true,"readOnly":true}},"required":["actions","created_at","id","instructions","internal_origin_uuid","is_archived","is_enabled","is_latest","is_protected","outcomes","priorities","rationale","title","toggle_guidance","total_usage","updated_at","version_id"]},"DetailedCustomOutcome":{"type":"object","description":"Adds usage telemetry to the base outcome.","properties":{"id":{"type":"integer"},"conclusions_affected":{"type":"integer","readOnly":true},"created_at":{"type":"string","format":"date-time","readOnly":true},"condition":{},"outcome":{"$ref":"#/components/schemas/DetailedCustomOutcomeOutcomeEnum"},"close_investigation_on_match":{"type":"boolean"},"internal_origin_uuid":{"type":"string","format":"uuid","readOnly":true,"nullable":true},"strategy_versions":{"type":"array","items":{"type":"integer"},"readOnly":true}},"required":["conclusions_affected","condition","created_at","internal_origin_uuid","outcome","strategy_versions"]},"DetailedCustomOutcomeOutcomeEnum":{"enum":["COMPLETED_BREACHED_CONFIRMED","COMPLETED_BREACHED_SUSPICIOUS","COMPLETED_FALSE_ALERT","IGNORED"],"type":"string","description":"* `COMPLETED_BREACHED_CONFIRMED` - COMPLETED_BREACHED_CONFIRMED\n* `COMPLETED_BREACHED_SUSPICIOUS` - COMPLETED_BREACHED_SUSPICIOUS\n* `COMPLETED_FALSE_ALERT` - COMPLETED_FALSE_ALERT\n* `IGNORED` - IGNORED"},"DetailedCustomInstruction":{"type":"object","description":"Adds usage telemetry to the base instruction.","properties":{"id":{"type":"integer"},"usage_count":{"type":"integer","readOnly":true},"last_used_at":{"type":"string","format":"date-time","nullable":true,"readOnly":true},"created_at":{"type":"string","format":"date-time","readOnly":true},"content":{"type":"string"},"internal_origin_uuid":{"type":"string","format":"uuid","readOnly":true,"nullable":true},"strategy_versions":{"type":"array","items":{"type":"integer"},"readOnly":true}},"required":["content","created_at","internal_origin_uuid","last_used_at","strategy_versions","usage_count"]},"DetailedCustomPriority":{"type":"object","description":"Adds usage telemetry to the base priority.","properties":{"id":{"type":"integer"},"priorities_affected":{"type":"integer","readOnly":true},"created_at":{"type":"string","format":"date-time","readOnly":true},"priority":{"$ref":"#/components/schemas/PriorityEnum"},"outcomes":{"type":"array","items":{"$ref":"#/components/schemas/InvestigationOutcomeEnum"},"minItems":1},"insight_tag_rule":{"nullable":true},"ranking":{"type":"integer","maximum":2147483647,"minimum":1},"internal_origin_uuid":{"type":"string","format":"uuid","readOnly":true,"nullable":true},"strategy_versions":{"type":"array","items":{"type":"integer"},"readOnly":true}},"required":["created_at","internal_origin_uuid","priorities_affected","priority","strategy_versions"]},"PriorityEnum":{"enum":["informational","notable","urgent"],"type":"string","description":"* `informational` - Informational\n* `notable` - Notable\n* `urgent` - Urgent"},"InvestigationOutcomeEnum":{"enum":["COMPLETED_BREACHED_CONFIRMED","COMPLETED_BREACHED_SUSPICIOUS","COMPLETED_FALSE_ALERT","INCOMPLETE","IGNORED"],"type":"string","description":"* `COMPLETED_BREACHED_CONFIRMED` - COMPLETED_BREACHED_CONFIRMED\n* `COMPLETED_BREACHED_SUSPICIOUS` - COMPLETED_BREACHED_SUSPICIOUS\n* `COMPLETED_FALSE_ALERT` - COMPLETED_FALSE_ALERT\n* `INCOMPLETE` - INCOMPLETE\n* `IGNORED` - IGNORED"},"CustomAction":{"type":"object","description":"Lets the strategy updater ask each sub-component serializer whether the data changes an instance.","properties":{"id":{"type":"string","format":"uuid"},"input":{},"template_slot":{"type":"string","format":"uuid","nullable":true},"response_script":{"type":"integer","nullable":true},"created_at":{"type":"string","format":"date-time","readOnly":true},"target_type":{"$ref":"#/components/schemas/TargetTypeEnum"},"operation":{"type":"string"},"trigger_phase":{"$ref":"#/components/schemas/TriggerPhaseEnum"},"lineage":{"type":"string","format":"uuid","readOnly":true},"internal_origin_uuid":{"type":"string","format":"uuid","readOnly":true,"nullable":true},"approval_policy":{"type":"string","format":"uuid","readOnly":true,"nullable":true}},"required":["approval_policy","created_at","internal_origin_uuid","lineage","target_type","trigger_phase"]},"TargetTypeEnum":{"enum":["template","script"],"type":"string","description":"* `template` - Template\n* `script` - Script"},"TriggerPhaseEnum":{"enum":["match","complete","both"],"type":"string","description":"* `match` - Match\n* `complete` - Complete\n* `both` - Both"}}},"paths":{"/app/api/v1/custom-strategies/{strategy_id}":{"get":{"operationId":"custom_strategy_retrieve_external","description":"Get a specific custom strategy by ID. Includes both user-created and OOTB (protected) strategies.","parameters":[{"in":"path","name":"strategy_id","schema":{"type":"integer"},"required":true}],"tags":["custom-strategies"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetailedCustomStrategyVersion"}}},"description":"Custom strategy details"},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"error_msg":{"type":"string"}}}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"},"error_msg":{"type":"string"},"required_permission":{"type":"object","description":"RBAC permission the caller lacks. Present when the permission check denies the request.","properties":{"resource":{"type":"string"},"action":{"type":"string"}}}}}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"error_msg":{"type":"string"}}}}},"description":"Resource not found"},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"error_msg":{"type":"string"}}}}},"description":"System error"},"503":{"content":{"application/json":{"schema":{"type":"object","properties":{"error_msg":{"type":"string"}}}}},"description":"System not ready for requests"}}}}}}
```

## PUT /app/api/v1/custom-strategies/{strategy\_id}

> Update a custom strategy (full replacement - creates new version)

```json
{"openapi":"3.0.3","info":{"title":"Dropzone AI","version":"0.1.0"},"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"Authorization"}},"schemas":{"DetailedCustomStrategyVersion":{"type":"object","description":"A strategy version with usage telemetry on the version and on every sub-component.\n\nThis is the expensive shape: each outcome, instruction, and priority costs at least one\ncount query. Only use it where the telemetry is rendered.","properties":{"id":{"type":"integer","readOnly":true},"internal_origin_uuid":{"type":"string","format":"uuid","readOnly":true},"created_at":{"type":"string","format":"date-time","readOnly":true},"updated_at":{"type":"string","format":"date-time","readOnly":true},"title":{"type":"string","readOnly":true},"rationale":{"type":"string","readOnly":true,"nullable":true},"toggle_guidance":{"type":"string","readOnly":true,"nullable":true},"is_enabled":{"type":"boolean","readOnly":true},"is_archived":{"type":"boolean","readOnly":true},"is_protected":{"type":"boolean","readOnly":true},"version_id":{"type":"integer","readOnly":true},"attack_surfaces":{"type":"array","items":{"type":"string"}},"mitre_tactics":{"type":"array","items":{"type":"string"}},"alert_sources":{"type":"array","items":{"type":"string"}},"scenario":{"type":"string","nullable":true},"outcomes":{"type":"array","items":{"$ref":"#/components/schemas/DetailedCustomOutcome"},"readOnly":true},"instructions":{"type":"array","items":{"$ref":"#/components/schemas/DetailedCustomInstruction"},"readOnly":true},"priorities":{"type":"array","items":{"$ref":"#/components/schemas/DetailedCustomPriority"},"readOnly":true},"actions":{"type":"array","items":{"$ref":"#/components/schemas/CustomAction"},"readOnly":true},"is_latest":{"type":"boolean","readOnly":true},"total_usage":{"type":"integer","nullable":true,"readOnly":true}},"required":["actions","created_at","id","instructions","internal_origin_uuid","is_archived","is_enabled","is_latest","is_protected","outcomes","priorities","rationale","title","toggle_guidance","total_usage","updated_at","version_id"]},"DetailedCustomOutcome":{"type":"object","description":"Adds usage telemetry to the base outcome.","properties":{"id":{"type":"integer"},"conclusions_affected":{"type":"integer","readOnly":true},"created_at":{"type":"string","format":"date-time","readOnly":true},"condition":{},"outcome":{"$ref":"#/components/schemas/DetailedCustomOutcomeOutcomeEnum"},"close_investigation_on_match":{"type":"boolean"},"internal_origin_uuid":{"type":"string","format":"uuid","readOnly":true,"nullable":true},"strategy_versions":{"type":"array","items":{"type":"integer"},"readOnly":true}},"required":["conclusions_affected","condition","created_at","internal_origin_uuid","outcome","strategy_versions"]},"DetailedCustomOutcomeOutcomeEnum":{"enum":["COMPLETED_BREACHED_CONFIRMED","COMPLETED_BREACHED_SUSPICIOUS","COMPLETED_FALSE_ALERT","IGNORED"],"type":"string","description":"* `COMPLETED_BREACHED_CONFIRMED` - COMPLETED_BREACHED_CONFIRMED\n* `COMPLETED_BREACHED_SUSPICIOUS` - COMPLETED_BREACHED_SUSPICIOUS\n* `COMPLETED_FALSE_ALERT` - COMPLETED_FALSE_ALERT\n* `IGNORED` - IGNORED"},"DetailedCustomInstruction":{"type":"object","description":"Adds usage telemetry to the base instruction.","properties":{"id":{"type":"integer"},"usage_count":{"type":"integer","readOnly":true},"last_used_at":{"type":"string","format":"date-time","nullable":true,"readOnly":true},"created_at":{"type":"string","format":"date-time","readOnly":true},"content":{"type":"string"},"internal_origin_uuid":{"type":"string","format":"uuid","readOnly":true,"nullable":true},"strategy_versions":{"type":"array","items":{"type":"integer"},"readOnly":true}},"required":["content","created_at","internal_origin_uuid","last_used_at","strategy_versions","usage_count"]},"DetailedCustomPriority":{"type":"object","description":"Adds usage telemetry to the base priority.","properties":{"id":{"type":"integer"},"priorities_affected":{"type":"integer","readOnly":true},"created_at":{"type":"string","format":"date-time","readOnly":true},"priority":{"$ref":"#/components/schemas/PriorityEnum"},"outcomes":{"type":"array","items":{"$ref":"#/components/schemas/InvestigationOutcomeEnum"},"minItems":1},"insight_tag_rule":{"nullable":true},"ranking":{"type":"integer","maximum":2147483647,"minimum":1},"internal_origin_uuid":{"type":"string","format":"uuid","readOnly":true,"nullable":true},"strategy_versions":{"type":"array","items":{"type":"integer"},"readOnly":true}},"required":["created_at","internal_origin_uuid","priorities_affected","priority","strategy_versions"]},"PriorityEnum":{"enum":["informational","notable","urgent"],"type":"string","description":"* `informational` - Informational\n* `notable` - Notable\n* `urgent` - Urgent"},"InvestigationOutcomeEnum":{"enum":["COMPLETED_BREACHED_CONFIRMED","COMPLETED_BREACHED_SUSPICIOUS","COMPLETED_FALSE_ALERT","INCOMPLETE","IGNORED"],"type":"string","description":"* `COMPLETED_BREACHED_CONFIRMED` - COMPLETED_BREACHED_CONFIRMED\n* `COMPLETED_BREACHED_SUSPICIOUS` - COMPLETED_BREACHED_SUSPICIOUS\n* `COMPLETED_FALSE_ALERT` - COMPLETED_FALSE_ALERT\n* `INCOMPLETE` - INCOMPLETE\n* `IGNORED` - IGNORED"},"CustomAction":{"type":"object","description":"Lets the strategy updater ask each sub-component serializer whether the data changes an instance.","properties":{"id":{"type":"string","format":"uuid"},"input":{},"template_slot":{"type":"string","format":"uuid","nullable":true},"response_script":{"type":"integer","nullable":true},"created_at":{"type":"string","format":"date-time","readOnly":true},"target_type":{"$ref":"#/components/schemas/TargetTypeEnum"},"operation":{"type":"string"},"trigger_phase":{"$ref":"#/components/schemas/TriggerPhaseEnum"},"lineage":{"type":"string","format":"uuid","readOnly":true},"internal_origin_uuid":{"type":"string","format":"uuid","readOnly":true,"nullable":true},"approval_policy":{"type":"string","format":"uuid","readOnly":true,"nullable":true}},"required":["approval_policy","created_at","internal_origin_uuid","lineage","target_type","trigger_phase"]},"TargetTypeEnum":{"enum":["template","script"],"type":"string","description":"* `template` - Template\n* `script` - Script"},"TriggerPhaseEnum":{"enum":["match","complete","both"],"type":"string","description":"* `match` - Match\n* `complete` - Complete\n* `both` - Both"}}},"paths":{"/app/api/v1/custom-strategies/{strategy_id}":{"put":{"operationId":"custom_strategy_update_external","description":"Update a custom strategy (full replacement - creates new version)","parameters":[{"in":"path","name":"strategy_id","schema":{"type":"string"},"required":true}],"tags":["custom-strategies"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string"},"is_enabled":{"type":"boolean"},"attack_surfaces":{"type":"array","items":{"type":"string"}},"mitre_tactics":{"type":"array","items":{"type":"string"}},"alert_sources":{"type":"array","items":{"type":"string"}},"scenario":{"type":"string"},"outcomes":{"type":"array","items":{"type":"object"}},"instructions":{"type":"array","items":{"type":"object"}},"priorities":{"type":"array","items":{"type":"object"}}},"required":["title"]}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetailedCustomStrategyVersion"}}},"description":"Strategy updated successfully"},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"error_msg":{"type":"string"}}}}},"description":"Bad request - invalid input"},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"error_msg":{"type":"string"}}}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"},"error_msg":{"type":"string"},"required_permission":{"type":"object","description":"RBAC permission the caller lacks. Present when the permission check denies the request.","properties":{"resource":{"type":"string"},"action":{"type":"string"}}}}}}},"description":"Access denied"},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"error_msg":{"type":"string"}}}}},"description":"System error"},"503":{"content":{"application/json":{"schema":{"type":"object","properties":{"error_msg":{"type":"string"}}}}},"description":"System not ready for requests"}}}}}}
```

## DELETE /app/api/v1/custom-strategies/{strategy\_id}

> Delete or archive a custom strategy (archives if referenced by investigations)

```json
{"openapi":"3.0.3","info":{"title":"Dropzone AI","version":"0.1.0"},"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"Authorization"}}},"paths":{"/app/api/v1/custom-strategies/{strategy_id}":{"delete":{"operationId":"custom_strategy_destroy_external","description":"Delete or archive a custom strategy (archives if referenced by investigations)","parameters":[{"in":"path","name":"strategy_id","schema":{"type":"string"},"required":true}],"tags":["custom-strategies"],"responses":{"204":{"description":"Strategy deleted or archived successfully"},"400":{"content":{"application/json":{"schema":{"type":"object","properties":{"error_msg":{"type":"string"}}}}},"description":"Cannot delete already archived strategy"},"401":{"content":{"application/json":{"schema":{"type":"object","properties":{"error_msg":{"type":"string"}}}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"},"error_msg":{"type":"string"},"required_permission":{"type":"object","description":"RBAC permission the caller lacks. Present when the permission check denies the request.","properties":{"resource":{"type":"string"},"action":{"type":"string"}}}}}}},"description":"Access denied"},"404":{"content":{"application/json":{"schema":{"type":"object","properties":{"error_msg":{"type":"string"}}}}},"description":"Resource not found"},"500":{"content":{"application/json":{"schema":{"type":"object","properties":{"error_msg":{"type":"string"}}}}},"description":"System error"},"503":{"content":{"application/json":{"schema":{"type":"object","properties":{"error_msg":{"type":"string"}}}}},"description":"System not ready for requests"}}}}}}
```
