PATCH
/
memories
/
{memory_id}
curl -X PATCH 'https://api.memsync.ai/memories/mem_123abc' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "content": "Updated: Had an amazing conversation with Sarah about machine learning applications in healthcare. She mentioned some innovative approaches to medical imaging.",
    "metadata": {
      "location": "Stanford Medical Center",
      "participants": ["Sarah Johnson", "Dr. Martinez"],
      "updated_at": "2024-01-15T16:30:00Z"
    },
    "category": "learning"
  }'
{
  "memory_id": "mem_123abc",
  "content": "Updated: Had an amazing conversation with Sarah about machine learning applications in healthcare. She mentioned some innovative approaches to medical imaging.",
  "category": "learning",
  "memory_type": "episodic",
  "importance": 0.85,
  "metadata": {
    "location": "Stanford Medical Center",
    "participants": ["Sarah Johnson", "Dr. Martinez"],
    "source": "conversation",
    "updated_at": "2024-01-15T16:30:00Z"
  },
  "embeddings": [0.123, -0.456, 0.789, ...],
  "created_at": "2024-01-15T14:30:00Z",
  "updated_at": "2024-01-15T16:30:00Z"
}
Updates a specific memory entry by ID. You can modify the memory content, metadata, category, or memory type.
curl -X PATCH 'https://api.memsync.ai/memories/mem_123abc' \
  -H 'X-API-Key: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "content": "Updated: Had an amazing conversation with Sarah about machine learning applications in healthcare. She mentioned some innovative approaches to medical imaging.",
    "metadata": {
      "location": "Stanford Medical Center",
      "participants": ["Sarah Johnson", "Dr. Martinez"],
      "updated_at": "2024-01-15T16:30:00Z"
    },
    "category": "learning"
  }'

Path Parameters

memory_id
string
required
The unique identifier of the memory to update

Request Body

content
string
Updated text content of the memory
metadata
object
Additional metadata to update for the memory
category
string
Updated memory category. One of: identity, career, interests, relationships, health, finance, learning, travel, productivity, private
memory_type
string
Updated memory type: semantic or episodic
importance
number
Updated importance score between 0.0 and 1.0

Response

memory_id
string
Unique identifier of the updated memory
content
string
Updated text content of the memory
category
string
Updated memory category
memory_type
string
Updated memory type (semantic or episodic)
importance
number
Updated importance score
metadata
object
Updated memory metadata
embeddings
array
Vector embeddings for the updated content (if content was modified)
created_at
string
ISO 8601 timestamp when the memory was originally created
updated_at
string
ISO 8601 timestamp when the memory was last updated
{
  "memory_id": "mem_123abc",
  "content": "Updated: Had an amazing conversation with Sarah about machine learning applications in healthcare. She mentioned some innovative approaches to medical imaging.",
  "category": "learning",
  "memory_type": "episodic",
  "importance": 0.85,
  "metadata": {
    "location": "Stanford Medical Center",
    "participants": ["Sarah Johnson", "Dr. Martinez"],
    "source": "conversation",
    "updated_at": "2024-01-15T16:30:00Z"
  },
  "embeddings": [0.123, -0.456, 0.789, ...],
  "created_at": "2024-01-15T14:30:00Z",
  "updated_at": "2024-01-15T16:30:00Z"
}

Error Responses

404
object
Memory not found
{
  "error": "Memory not found",
  "code": "MEMORY_NOT_FOUND",
  "memory_id": "mem_123abc"
}
400
object
Invalid request data
{
  "error": "Invalid category specified",
  "code": "INVALID_CATEGORY",
  "valid_categories": ["identity", "career", "interests", "relationships", "health", "finance", "learning", "travel", "productivity", "private"]
}
401
object
Unauthorized access
{
  "error": "Invalid or expired API key",
  "code": "UNAUTHORIZED"
}
403
object
Access denied - memory belongs to another user
{
  "error": "Access denied",
  "code": "FORBIDDEN"
}

Notes

  • Only the fields provided in the request body will be updated
  • If content is updated, new embeddings will be automatically generated
  • Category changes may trigger re-classification and profile updates
  • Memory type changes will affect how the memory is retrieved in searches
  • All updates are versioned internally for audit purposes