Skip to main content
POST
/
v2
/
memory
/
search
Search Judgments
curl --request POST \
  --url https://api.velt.dev/v2/memory/search \
  --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>",
    "embeddingType": "<string>",
    "scope": "<string>",
    "organizationId": "<string>",
    "documentId": "<string>",
    "limit": 123,
    "filters": {},
    "recencyDays": 123
  }
}
'
{
  "result": {
    "results": [
      {
        "recordId": "act_8f3...",
        "reasoning": "Claim 'clinically proven' lacks a citation.",
        "decision": "reject",
        "confidence": 0.92,
        "actionUser": { "name": "Sarah Lee" },
        "createdAt": 1731432000000,
        "similarity": 0.87,
        "scope": "organization",
        "agent": null
      }
    ],
    "totalInScope": 128,
    "searchLatencyMs": 142
  }
}
Use this API to run a semantic vector search over past judgments: the enriched records of your team’s review decisions. Optional filters and retrieval-mode overrides let you narrow by decision, reviewer, content type, recency, or a single comment thread. This is distinct from Search Knowledge Base, which searches the content of your ingested files.

Endpoint

POST https://api.velt.dev/v2/memory/search

Headers

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

Body

Params

data
object
required

Example Requests

Search rejected decisions

{
  "data": {
    "query": "marketing copy with unsupported medical claims",
    "limit": 5,
    "filters": { "decision": "reject" }
  }
}

Read one comment thread chronologically

{
  "data": {
    "query": "thread summary",
    "organizationId": "org_eu",
    "filters": { "annotationId": "annotation_123" }
  }
}

Last week’s activity (recency-true mode)

{
  "data": {
    "query": "recent activity",
    "recencyDays": 7
  }
}

Response

Each result includes the reasoning, decision, confidence, who decided (actionUser), and a similarity score (1.0 for the annotation and recency shortcut paths). totalInScope reports how many judgments were in scope; searchLatencyMs reports the search time. An agent block is present when the decision came from an AI agent.

Success Response

{
  "result": {
    "results": [
      {
        "recordId": "act_8f3...",
        "reasoning": "Claim 'clinically proven' lacks a citation.",
        "decision": "reject",
        "confidence": 0.92,
        "actionUser": { "name": "Sarah Lee" },
        "createdAt": 1731432000000,
        "similarity": 0.87,
        "scope": "organization",
        "agent": null
      }
    ],
    "totalInScope": 128,
    "searchLatencyMs": 142
  }
}

Failure Response

{
  "error": {
    "message": "ERROR_MESSAGE",
    "status": "INVALID_ARGUMENT"
  }
}
{
  "result": {
    "results": [
      {
        "recordId": "act_8f3...",
        "reasoning": "Claim 'clinically proven' lacks a citation.",
        "decision": "reject",
        "confidence": 0.92,
        "actionUser": { "name": "Sarah Lee" },
        "createdAt": 1731432000000,
        "similarity": 0.87,
        "scope": "organization",
        "agent": null
      }
    ],
    "totalInScope": 128,
    "searchLatencyMs": 142
  }
}