> ## 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.

# Suggest Decision

Use this API to compute a suggested decision for a new item, grounded in past judgments. `primary` is the best-grounded recommendation; `conflict` is populated when the evidence is split, so you can surface disagreement to your users.

# Endpoint

`POST https://api.velt.dev/v2/memory/suggest`

# 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](/security/auth-tokens).
</ParamField>

# Body

#### Params

<ParamField body="data" type="object" required>
  <Expandable title="properties">
    <ParamField body="query" type="string" required>
      Non-empty. Describe the item being decided.
    </ParamField>

    <ParamField body="organizationId" type="string">
      Narrow the precedent to one organization.
    </ParamField>

    <ParamField body="documentId" type="string">
      Narrow the precedent to one document. Requires `organizationId`.
    </ParamField>
  </Expandable>
</ParamField>

## **Example Requests**

#### Suggest a decision for new ad copy

```JSON theme={null}
{
  "data": {
    "query": "Ad copy: \"clinically proven to reduce wrinkles\""
  }
}
```

# Response

Both `primary` and `conflict` are a suggestion object or `null`. `recommendation` is `approve` or `reject`; `basedOn` is the number of judgments the suggestion drew on; `caveats` carries conflict and freshness warnings.

#### Success Response

```JSON theme={null}
{
  "result": {
    "primary": {
      "recommendation": "reject",
      "confidence": 0.78,
      "basedOn": 12,
      "scope": "organization",
      "scopeLabel": "Acme EU",
      "topReasons": ["Unsupported medical claim", "Missing citation"],
      "uniqueReviewers": 4,
      "caveats": ["2 conflicting approvals in the last 30 days"]
    },
    "conflict": null
  }
}
```

#### Failure Response

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

<ResponseExample>
  ```js theme={null}
  {
    "result": {
      "primary": {
        "recommendation": "reject",
        "confidence": 0.78,
        "basedOn": 12,
        "scope": "organization",
        "scopeLabel": "Acme EU",
        "topReasons": ["Unsupported medical claim", "Missing citation"],
        "uniqueReviewers": 4,
        "caveats": ["2 conflicting approvals in the last 30 days"]
      },
      "conflict": null
    }
  }
  ```
</ResponseExample>
