> ## Documentation Index
> Fetch the complete documentation index at: https://velt.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Patterns

Use this API to list the decision patterns Memory has detected for the workspace, e.g. "copy with medical claims is rejected unless it cites a source." Patterns are derived from accumulated judgments.

# Endpoint

`POST https://api.velt.dev/v2/memory/patterns/get`

# Headers

<ParamField header="x-velt-api-key" type="string" required>
  Your API key.
</ParamField>

<ParamField header="x-velt-auth-token" type="string" required>
  Your [Auth Token](/docs/security/auth-tokens).
</ParamField>

# Body

#### Params

<ParamField body="data" type="object" required>
  No fields required. Send an empty object.
</ParamField>

## **Example Requests**

#### List detected patterns

```JSON theme={null}
{
  "data": {}
}
```

# Response

The response returns at most 100 patterns, most recently updated first. There is no paging parameter.

Each pattern includes its `scope` (`apiKey` or `org`), an optional `organizationId`, a plain-language `description`, a `confidence` score, the `sourceCount` of judgments behind it, and the `contentType` and `category` it applies to. `organizationId` is Velt's internal organization id, not the organization id you sent. `discoveredAt` and `updatedAt` are epoch milliseconds. Both move forward whenever the judgments behind the pattern change, so `discoveredAt` is not pinned to first detection. A pattern may carry additional internal fields you can ignore.

Three optional fields are present when Memory can compute them: `enforcementRate` (how consistently the pattern is applied), `uniqueReviewers` (how many distinct reviewers it was derived from), and `topSourceRecordIds` (sample judgment ids you can look up with [Query Judgments](/docs/api-reference/rest-apis/v2/memory/judgments/query)).

#### Success Response

```JSON theme={null}
{
  "result": [
    {
      "scope": "org",
      "organizationId": "1204438871",
      "description": "Copy with medical claims is rejected unless it cites a source.",
      "confidence": 0.83,
      "sourceCount": 19,
      "contentType": "marketing-copy",
      "category": "compliance",
      "discoveredAt": 1731432000000,
      "updatedAt": 1731432000000,
      "enforcementRate": 0.91,
      "uniqueReviewers": 5,
      "topSourceRecordIds": ["act_8f3...", "act_2c7..."]
    }
  ]
}
```

#### Failure Response

```JSON theme={null}
{
  "error": {
    "message": "ERROR_MESSAGE",
    "status": "INVALID_ARGUMENT"
  }
}
```

<ResponseExample>
  ```js theme={null}
  {
    "result": [
      {
        "scope": "org",
        "organizationId": "1204438871",
        "description": "Copy with medical claims is rejected unless it cites a source.",
        "confidence": 0.83,
        "sourceCount": 19,
        "contentType": "marketing-copy",
        "category": "compliance",
        "discoveredAt": 1731432000000,
        "updatedAt": 1731432000000,
        "enforcementRate": 0.91,
        "uniqueReviewers": 5,
        "topSourceRecordIds": ["act_8f3...", "act_2c7..."]
      }
    ]
  }
  ```
</ResponseExample>
