---
title: "Create Memory from Triage"
method: POST
path: "/api/ai/deployments/{deploymentId}/memories/triage"
tags: ["MemoriesService"]
---

# Create Memory from Triage

`POST /api/ai/deployments/{deploymentId}/memories/triage`

Create a new memory from a triage event.

## Path parameters

- `deploymentId` string, required

## Request body

- ProtosAiV1CreateMemoryFromTriageRequest
  - `deploymentId` string
  - `note` string
  - `filter` ProtosIssuesV1IssuesFilter
    - `ids` string[] — Filters issues to those whose ids match any of the specified values. Applies to all issue types.
    - `since` string, date-time — Filters issues relevant since the specified timestamp. Applies to all issue types.
    - `until` string, date-time — Filters issues created before the specified timestamp. Applies to all issue types.
    - `repositoryNames` string[] — Filters issues which belong to a repo with one of the specified names. Applies to all issue types.
    - `repositoryIds` string[] — Filters issues which belong to a repo with one of the specified ids. Applies to all issue types.
    - `repositoryTags` string[] — Filters issues which belong to a repo with one of the specified tags. Applies to all issue types.
    - `refs` string[] — Filters issues which were found in a ref with one of the specified names. Applies to all issue types.
    - `repositoryRefIds` string[] — Filters issues which were found on the repo and ref associated with the repo ref id. Applies to all issue types.
    - `aiVerdicts` string[] — Filters issues whose autotriage verdict matches one of the specified values. Applies to all issue types. | value | description | |-------|---------------| | VERDICT_TRUE_POSITIVE | | | VERDICT_FALSE_POSITIVE | | | VERDICT_NO_VERDICT | |
    - `aiSensitivities` string[] — Filters issues whose autotriage tag matches one of the specified values. Applies to all issue types.
    - `status` string[] — Filters issues whose status matches one of the specified values. Applies to all issue types. Deprecated in favor of `aggregate_issue_states`, which is the forward-looking state filter. | value | description | |-------|---------------| | ISSUE_STATUS_FIXED | | | ISSUE_STATUS_MUTED | | | ISSUE_STATUS_REMOVED | | | ISSUE_STATUS_UNRESOLVED | |
    - `tab` 'ISSUE_TAB_OPEN' | 'ISSUE_TAB_IGNORED' | 'ISSUE_TAB_CLOSED' | 'ISSUE_TAB_REVIEWING' | 'ISSUE_TAB_FIXING' | 'ISSUE_TAB_PROVISIONALLY_IGNORED', enum — Filters issues whose general status (open, ignored, fixed) matches one of the specified values. Applies to all issue types. | value | description | |-------|---------------| | ISSUE_TAB_OPEN | | | ISSUE_TAB_IGNORED | | | ISSUE_TAB_CLOSED | | | ISSUE_TAB_REVIEWING | | | ISSUE_TAB_FIXING | | | ISSUE_TAB_PROVISIONALLY_IGNORED | |
    - `teamNames` string[] — Filter issues which belong to a repo assigned to one of the specified teams. Applies to all issue types.
    - `actions` string[] — Filters SAST issues whose action mode matches one of the specified values. Only applies when the provided issue_type is SAST. Deprecated: action mode is tied to the legacy policy model and has no effect for deployments on unified policies. This filter will be removed in a future release. | value | description | |-------|---------------| | MODE_MONITOR | Monitor mode, silently report findings | | MODE_COMMENT | Comment mode, leaves PR comments but does not block | | MODE_BLOCK | Block mode, leaves PR comments and blocks PR | | MODE_DISABLED | Disabled mode, not active |
    - `policySlugs` string[] — Filters SAST issues whose policy slug matches one of the specified values. Deprecated in favor of `action`. Only applies when the provided issue_type is SAST.
    - `rules` string[] — Filters SAST issues whose rule paths match one of the specified values. Only applies when the provided issue_type is SAST.
    - `ruleIds` string[] — Filters issues whose rule id matches one of the specified values. Applies to all issue types.
    - `rulesets` string[] — Filters SAST issues whose ruleset name matches one of the specified values. Only applies when the provided issue_type is SAST.
    - `categories` string[] — Filters SAST issues whose category matches one of the specified values. Only applies when the provided issue_type is SAST.
    - `confidences` string[] — Filters SAST issues whose confidence rating matches one of the specified values. Only applies when the provided issue_type is SAST. | value | description | |-------|---------------| | CONFIDENCE_HIGH | | | CONFIDENCE_MEDIUM | | | CONFIDENCE_LOW | |
    - `severities` string[] — Filters SAST issues whose severity matches one of the specified values. Only applies when the provided issue_type is SAST. | value | description | |-------|---------------| | SEVERITY_HIGH | | | SEVERITY_MEDIUM | | | SEVERITY_LOW | | | SEVERITY_CRITICAL | |
    - `transitivities` string[] — Filters supply chain issues whose transitivity matches one of the specified values. Only applies when the provided issue_type is SCA. | value | description | |-------|---------------| | UNKNOWN_TRANSITIVITY | | | TRANSITIVE | | | DIRECT | |
    - `exposures` string[] — Filters supply chain issues whose exposure (a.k.a. "reachability") matches one of the specified values. Only applies when the provided issue_type is SCA. | value | description | |-------|---------------| | UNKNOWN_EXPOSURE | | | UNREACHABLE | | | REACHABLE | |
    - `dependencies` string[] — Filters supply chain issues found in a dependency whose name matches any of the specified values. Only applies when the provided issue_type is SCA.
    - `cves` string[] — Filters supply chain issues belonging to a CVE whose name matches the specified value. Only applies when the provided issue_type is SCA.
    - `source` string[] — Filters issues whose source matches one of the specified values. Applies to SAST now, and maybe Secrets in the future. | value | description | |-------|---------------| | SOURCE_PRO | From Pro rules | | SOURCE_COMMUNITY | From Semgrep Community rules | | SOURCE_CUSTOM | From Custom rules |
    - `reachabilities` string[] — Filters supply chain issues whose reachability matches one of the specified values. Only applies when the provided issue_type is SCA. | value | description | |-------|---------------| | REACHABILITY_CONDITIONALLY_REACHABLE | | | REACHABILITY_ALWAYS_REACHABLE | | | REACHABILITY_REACHABLE | | | REACHABILITY_UNREACHABLE | | | REACHABILITY_UNKNOWN | |
    - `issueParentIds` string[] — Filters issues to those whose issue parent ids match any of the specified values. Applies to all types.
    - `validationStates` string[] — Filters secrets issues whose validation state matches one of the specified values. Only applies when the provided issue_type is SECRETS. | value | description | |-------|---------------| | VALIDATION_STATE_CONFIRMED_VALID | | | VALIDATION_STATE_CONFIRMED_INVALID | | | VALIDATION_STATE_VALIDATION_ERROR | | | VALIDATION_STATE_NO_VALIDATOR | |
    - `secretTypes` string[] — Filters secrets issues whose secret type matches one of the specified values. Only applies when the provided issue_type is SECRETS.
    - `repoVisibilities` string[] — Filters secrets issues whose status matches one of the specified values. Only applies when the provided issue_type is SECRETS. | value | description | |-------|---------------| | REPOSITORY_VISIBILITY_PUBLIC | | | REPOSITORY_VISIBILITY_PRIVATE | | | REPOSITORY_VISIBILITY_UNKNOWN | |
    - `excludeHistorical` boolean — Filters out historical secrets issues if true. Only applies when the provided issue_type is SECRETS.
    - `onPrimaryBranch` boolean — Filter down to only issues that are - or are not - found on the default branch of their project.
    - `epssProbabilities` string[] — Filters supply chain issues whose corresponding EPSS scores fall in one of the specified buckets. Only applies when the provided issue_type is SCA. | value | description | |-------|---------------| | EPSS_PROBABILITY_LOW | | | EPSS_PROBABILITY_MEDIUM | | | EPSS_PROBABILITY_HIGH | | | EPSS_PROBABILITY_NONE | |
    - `triageReasons` string[] — Filters issues whose triage reason matches one of the specified values. Applies to all issue types. | value | description | |-------|---------------| | FINDING_TRIAGE_REASON_FALSE_POSITIVE | | | FINDING_TRIAGE_REASON_NO_TIME | | | FINDING_TRIAGE_REASON_ACCEPTABLE_RISK | | | FINDING_TRIAGE_REASON_NO_TRIAGE_REASON | | | FINDING_TRIAGE_REASON_UNKNOWN | | | FINDING_TRIAGE_REASON_DUPLICATE | |
    - `timeFilter` 'TIME_FILTER_RELEVANT_SINCE' | 'TIME_FILTER_TRIAGED_AT' | 'TIME_FILTER_FIXED_AT', enum — Filters issues by date based on different attributes related to status changes or triaging | value | description | |-------|---------------| | TIME_FILTER_RELEVANT_SINCE | | | TIME_FILTER_TRIAGED_AT | | | TIME_FILTER_FIXED_AT | |
    - `includeTicketed` boolean — Filters issues based on if they have a nango_external_ticket associated with them
    - `backlogType` 'ISSUE_BACKLOG_TYPE_PROD' | 'ISSUE_BACKLOG_TYPE_PREPROD', enum — Filters issues to either all (prod), or only those with review comments (pre-prod). Only applies when the provided issue_type is SAST. TODO: once experiment is successful, prod should mean only issues in actual production (very similar to on_primary_branch) TODO: verify if review_comment is correct for SCA/SECRETS and enable this filter for those issue types too | value | description | |-------|---------------| | ISSUE_BACKLOG_TYPE_PROD | | | ISSUE_BACKLOG_TYPE_PREPROD | |
    - `scaRuleKind` string[] — Filters supply chain issues by its kind (malicious dependency, reachable, upgrade-only, legacy). Only applies when the provided issue_type is SCA. | value | description | |-------|---------------| | SCA_RULE_KIND_REACHABLE | | | SCA_RULE_KIND_UPGRADE_ONLY | | | SCA_RULE_KIND_MALICIOUS_DEPENDENCY | | | SCA_RULE_KIND_LEGACY | |
    - `aiMemoryWillFlipVerdict` string — Filters issues where a given memory ID's preanalysi shows the AI verdict would change. Supports only one memory ID at a time.
    - `aiMemoryReferenced` string — Filters issues to those which have an AI memory referenced. Applies to SAST issues only.
    - `includeAiMemoryRendered` boolean — Filters for issues based on if they have any AI memory rendered. Applies to SAST issues only.
    - `aiMemoryRendered` string — Filters issues to those which have a specific AI memory rendered. Applies to SAST issues only.
    - `memoryIdInScope` string — Filters to issues that are in scope of the given memory. Applies to SAST issues only.
    - `relativeSince` 'RELATIVE_SINCE_ONE_DAY' | 'RELATIVE_SINCE_ONE_WEEK' | 'RELATIVE_SINCE_ONE_MONTH' | 'RELATIVE_SINCE_THREE_MONTHS' | 'RELATIVE_SINCE_SIX_MONTHS' | 'RELATIVE_SINCE_ONE_YEAR' | 'RELATIVE_SINCE_ALL_TIME' | 'RELATIVE_SINCE_ONE_MINUTE', enum — Filters issues relevant since the specified relative time. Applies to all issue types. | value | description | |-------|---------------| | RELATIVE_SINCE_ONE_DAY | | | RELATIVE_SINCE_ONE_WEEK | | | RELATIVE_SINCE_ONE_MONTH | | | RELATIVE_SINCE_THREE_MONTHS | | | RELATIVE_SINCE_SIX_MONTHS | | | RELATIVE_SINCE_ONE_YEAR | | | RELATIVE_SINCE_ALL_TIME | | | RELATIVE_SINCE_ONE_MINUTE | |
    - `repositoryDeploymentStatuses` string[] — Filters issues to whose projects are deployed in an environment. Applies to all issue types. | value | description | |-------|---------------| | DEPLOYMENT_STATUS_UNKNOWN | | | DEPLOYMENT_STATUS_DEPLOYED | | | DEPLOYMENT_STATUS_NOT_DEPLOYED | |
    - `upgradeGuidance` string[] — Filters supply chain issues whose upgrade guidance matches one of the specified values. Only applies when the provided issue_type is SCA. Deprecated in favor of `upgrade_guidance_filters`. | value | description | |-------|---------------| | BREAKING_CHANGE_TYPE_PARAMETER_CHANGE | The symbol has a breaking change due to a change in the parameters of the function. This includes changes in the number of parameters, their names, their types, etc. | | BREAKING_CHANGE_TYPE_FUNCTION_OR_CLASS_REMOVAL | The symbol has a breaking change due to the removal of a function or class. This means that the function or class is no longer available in the target version. | | BREAKING_CHANGE_TYPE_FUNCTION_RENAME | The symbol has a breaking change due to a change in the name of the function or class. | | BREAKING_CHANGE_TYPE_LOGIC_CHANGE | The symbol has a breaking change due to a change in the logic of the function or class. This means that the function or class still exists, but its behavior has changed in a way that may affect the code that uses it. | | BREAKING_CHANGE_TYPE_NOT_BREAKING | The symbol does not have a breaking change, meaning it can be used in the target version without any issues. |
    - `repositoryPublicExposures` string[] — Filters issues to those whose deployed services are publicly accessible. Applies to all issue types. | value | description | |-------|---------------| | PUBLIC_EXPOSURE_UNKNOWN | | | PUBLIC_EXPOSURE_PUBLIC | | | PUBLIC_EXPOSURE_NOT_PUBLIC | |
    - `clickToFixPrStates` string[] — Filters issues by their Click to Fix PR state. Only applies when the provided issue_type is SAST or SCA. | value | description | |-------|---------------| | CLICK_TO_FIX_PR_STATE_OPEN | | | CLICK_TO_FIX_PR_STATE_MERGED | | | CLICK_TO_FIX_PR_STATE_NO_PR | |
    - `advisoryIds` string[] — Filters supply chain issues by advisory IDs (CVE, GHSA, MAL, etc.). Only applies when the provided issue_type is SCA.
    - `aggregateIssueStates` string[] — Filters issues whose aggregate state matches one of the specified values. Applies to all issue types. Only supported in the Duplo code path. | value | description | |-------|---------------| | AGGREGATE_ISSUE_STATE_OPEN | | | AGGREGATE_ISSUE_STATE_FIXED | | | AGGREGATE_ISSUE_STATE_REMOVED | | | AGGREGATE_ISSUE_STATE_IGNORED_APP | | | AGGREGATE_ISSUE_STATE_IGNORED_CODE | | | AGGREGATE_ISSUE_STATE_UNKNOWN | | | AGGREGATE_ISSUE_STATE_REVIEWING | | | AGGREGATE_ISSUE_STATE_FIXING | | | AGGREGATE_ISSUE_STATE_PROVISIONALLY_IGNORED_APP | |
    - `upgradeGuidanceFilters` string[] — Filters supply chain issues by generic upgrade guidance selections (safe or breaking). Only applies when the provided issue_type is SCA. | value | description | |-------|---------------| | UPGRADE_GUIDANCE_SELECTION_SAFE | | | UPGRADE_GUIDANCE_SELECTION_BREAKING | |
    - `filterIssueTypes` string[] — Frontend-only: this field is included in IssuesFilter to leverage proto-generated TypeScript types for filter state management and URL serialization. When non-empty, restricts the duplo combined Code view to show only the specified issue types. The backend ignores this field. | value | description | |-------|---------------| | ISSUE_TYPE_SAST | Detected by Code rules | | ISSUE_TYPE_SCA | Detected by Supply Chain rules | | ISSUE_TYPE_SECRETS | Detected by Secrets rules | | ISSUE_TYPE_RESEARCH | Detected by research rules or scanners | | ISSUE_TYPE_AI_SAST | Detected by AI detection code scanning |
    - `filePaths` string[] — Fuzzy file path search. Filters issues whose file path matches one of the specified values using analyzed text search (splits on / . _ - etc. and supports typo tolerance). Only works when Duplo is enabled for the deployment — ignored otherwise. Accepts an array of strings but currently only the first value is used.
    - `includeArchived` boolean — When true, include findings on archived projects in results. By default (unset/false), findings on archived projects are hidden from all product tabs and their counts — but only for deployments that have archived projects (gated by the `appex.has_archived_projects` config). Applies to all issue types. Archival is a separate dimension from aggregate state, so this is an independent toggle rather than an `aggregate_issue_states` value.
  - `issueType` 'ISSUE_TYPE_SAST' | 'ISSUE_TYPE_SCA' | 'ISSUE_TYPE_SECRETS' | 'ISSUE_TYPE_RESEARCH' | 'ISSUE_TYPE_AI_SAST', enum — Issue type to filter by. | value | description | |-------|---------------| | ISSUE_TYPE_SAST | Detected by Code rules | | ISSUE_TYPE_SCA | Detected by Supply Chain rules | | ISSUE_TYPE_SECRETS | Detected by Secrets rules | | ISSUE_TYPE_RESEARCH | Detected by research rules or scanners | | ISSUE_TYPE_AI_SAST | Detected by AI detection code scanning |
  - `identifierFilter` ProtosAiV1NonExclusiveMemoryFilter — Filter that matches issues using OR logic across all specified fields. An issue is included if it matches any field.
    - `ids` string[]
    - `issueParentIds` string[]
    - `ruleIds` string[]

## Response `200`

OK

- ProtosAiV1CreateMemoryFromTriageResponse
  - `memory` ProtosAiV1Memory
    - `id` string — The memories database id
    - `content` string — The user-provided plain text memory message
    - `ruleId` string — The rule id that the memory is associated with
    - `ruleName` string — The name of the rule that the memory is associated with
    - `repositoryId` string — The repository id that the memory is associated with
    - `repositoryName` string — The name of the repository that the memory is associated with
    - `createdAt` string, date-time — The timestamp when the memory was created
    - `createdBy` string — The user who created the memory
    - `context` string[] — Where the memory should apply, e.g. "TRIAGE" or "GUIDANCE" Defined in AiMemoryContext
    - `stage` 'AI_MEMORY_STAGE_LIVE' | 'AI_MEMORY_STAGE_SUGGESTED' | 'AI_MEMORY_STAGE_DELETED', enum — The state of the memory | value | description | |-------|---------------| | AI_MEMORY_STAGE_LIVE | | | AI_MEMORY_STAGE_SUGGESTED | | | AI_MEMORY_STAGE_DELETED | |
    - `pathPrefixes` string[] — The path prefixes that the memory should apply to
    - `suggestionSources` ProtosAiV1AiMemorySuggestionSources
      - `sources` ProtosAiV1AiMemorySource[]
        - `note` string — The reference note that the memory is associated with
        - `createdBy` string — The user who created the memory
        - `createdAt` string, date-time — The timestamp when the note was created
        - `sampleIssueId` string — A randomly chosen issue IDs that the note is associated with
        - `prCommentUrl` string — URL to the PR/MR comment where this triage occurred (constructed dynamically on fetch)
        - `reviewCommentId` string — The ID of the review comment that originated this memory (used to construct pr_comment_url)
    - `preanalysisCounts` ProtosAiV1MemoryPreanalysisCounts
      - `newlyTruePositive` string
      - `newlyFalsePositive` string
      - `remainsTruePositive` string
      - `remainsFalsePositive` string
    - `vulnerabilityClass` string — The vulnerability class the memory applies to
    - `projectTagId` integer — The project tag ID that the memory applies to (mutually exclusive with repository_id)

---

[API](https://skmtc.net/semgrep/apis/semgrep-web-app.md) · [All operations](https://skmtc.net/semgrep/apis/semgrep-web-app/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/semgrep/semgrep-web-app/versions/6483eeecd582/schema)
