Skip to main content
POST
/
v2
/
memory
/
suggest
Suggest Decision
curl --request POST \
  --url https://api.velt.dev/v2/memory/suggest \
  --header 'Content-Type: application/json' \
  --header 'x-velt-api-key: <x-velt-api-key>' \
  --header 'x-velt-auth-token: <x-velt-auth-token>' \
  --data '
{
  "data": {
    "query": "<string>",
    "organizationId": "<string>",
    "documentId": "<string>"
  }
}
'
{
  "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
  }
}
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

x-velt-api-key
string
required
Your API key.
x-velt-auth-token
string
required

Body

Params

data
object
required

Example Requests

Suggest a decision for new ad copy

{
  "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

{
  "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

{
  "error": {
    "message": "ERROR_MESSAGE",
    "status": "INVALID_ARGUMENT"
  }
}
{
  "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
  }
}