Skip to main content
POST
/
api
/
profiles
/
{id}
/
memories
{
  "memory": {
    "id": "mem-125",
    "content": "Customer has enterprise support contract",
    "type": "fact",
    "importance": 0.9,
    "decayFactor": 1.0,
    "createdAt": "2024-01-15T00:00:00Z",
    "lastAccessedAt": null
  }
}

Overview

Manually creates a new memory for a user profile. Use this to add context that wasn’t captured during conversations.

Path Parameters

id
string
required
Profile ID

Request Body

content
string
required
The memory content
type
string
required
Memory type: fact, preference, event, or context
importance
number
Importance score (0.0-1.0). Default: 0.5

Response

{
  "memory": {
    "id": "mem-125",
    "content": "Customer has enterprise support contract",
    "type": "fact",
    "importance": 0.9,
    "decayFactor": 1.0,
    "createdAt": "2024-01-15T00:00:00Z",
    "lastAccessedAt": null
  }
}

Example

curl -X POST https://api.yourserver.com/api/profiles/user-123/memories \
  -H "Authorization: Bearer gp_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "content": "Customer has enterprise support contract",
    "type": "fact",
    "importance": 0.9
  }'