---
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`

## Request

- Base URL: `https://api.datadoghq.com`
- URL: `https://api.datadoghq.com/api/v2/static-analysis/ai/memory`
- Auth: API key in header `DD-API-KEY` and API key in header `DD-APPLICATION-KEY`

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.dev/datadog/apis/datadog-api-v2-collection.md) - [All operations](https://skmtc.dev/datadog/apis/datadog-api-v2-collection/llms.txt) - [OpenAPI document](https://skmtc.dev/datadog/apis/datadog-api-v2-collection/revisions/da68bf029e4c?raw)
