GET
/
user_memory
/
retrieve_user_memory
cURL
curl --request GET \
  --url https://api.usecortex.ai/user_memory/retrieve_user_memory \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: <content-type>' \
  --header 'accept: <accept>'
{
  "success": true,
  "user_memories": [
    {}
  ]
}

📋 Functionality

  • Takes a query and max_count from request parameters
  • Performs semantic search through existing user memories using the query
  • Returns the most relevant memories up to the specified max_count
  • Uses plan-independent querying to find matching memories
  • Returns empty list on errors

Sample Request

curl --location 'https://api.usecortex.ai/user_memory/retrieve_user_memory?tenant_id={TENANT_ID}&sub_tenant_id={SUB_TENANT_ID}&query={QUERY}&max_count={MAX_COUNT}' \
  --header 'Authorization: Bearer {API_KEY}' \
  --header 'accept: application/json' \
  --header 'Content-Type: application/json'

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

Authorization
string
required

Bearer token (Firebase token)

Content-Type
string
default:application/json
required

Request content type

accept
string
default:application/json
required

Response content type

Query Parameters

tenant_id
string
required

Tenant identifier

sub_tenant_id
string
required

Sub-tenant identifier

query
string
required

Search query to find relevant memories

max_count
integer

Maximum number of memories to return

Response

200
application/json

Relevant memories returned successfully

The response is of type object.