---
title: "Create an AI memory violation result"
method: POST
path: "/api/v2/static-analysis/ai/memory"
tags: ["Static Analysis"]
---

# Create an AI memory violation result

`POST /api/v2/static-analysis/ai/memory`

Add a new AI memory violation result for the authenticated organization.

## Request body

- AiMemoryViolationResultRequest — Request body for creating an AI memory violation result.
  - `data` AiMemoryViolationResultRequestData — Request data for creating an AI memory violation result.
    - `attributes` AiMemoryViolationResultRequestAttributes — Attributes for creating an AI memory violation result.
      - `line` integer, required — The line number where the violation was found.
      - `message` string, required — A message explaining the violation result.
      - `name` string, required — The file path where the violation was found.
      - `repository_id` string, required — The repository identifier.
      - `rule` string, required — The rule identifier in the format ruleset/rule.
      - `sha` string, required — The git commit SHA where the violation was found.
      - `type` 'TP' | 'FP', required — The type of AI memory violation result indicating whether it is a true positive or false positive.
    - `id` string — The violation result identifier.
    - `type` 'ai_memory_violation_result' — AI memory violation result resource type.

## Response `200`

Successfully created

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `404` — Not Found
- `429` — Too many requests
- `500` — Internal Server Error

---

[API](https://skmtc.net/datadog/apis/api-v2.md) · [All operations](https://skmtc.net/datadog/apis/api-v2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/datadog/api-v2/revisions/da68bf029e4c/schema)
