Update Learning
Storage and identity
Use a registered database with learning methods. Specify db_id when several databases are available; table also requires db_id. RemoteDb and adapters without learning support return 501.
Human JWT callers are scoped when user isolation is enabled. Non-admin service-account PAT callers always self-scope. Scoped readers can access their own and shared records; other-owned records return 404. Shared records cannot be modified or deleted by a scoped caller (403). Admins and unscoped callers retain access under the deployment's authentication and permission configuration.
Replacement and null values
Provided content and metadata fields replace the whole existing value; they are not deep-merged. Omit a field to leave it unchanged. metadata: null clears metadata, but explicit content: null returns 422 despite the nullable generated schema.
Identity fields are immutable. Shared-record writes are rejected for scoped callers; admins and unscoped callers can write them.
/learnings/{learning_id}Update a learning record. Only content and metadata may be modified; identity fields (user_id, agent_id, team_id, etc.) are immutable. Provided fields fully replace the existing values. Records with no owner (user_id IS NULL — shared agent/team/session/entity learnings) are readable by any caller but may only be modified by an admin.
Authorization
HTTPBearer In: header
Path Parameters
The learning ID
Query Parameters
Database ID to use
The database table to use (requires db_id)
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Request body for updating a learning record. Identity fields are immutable.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl --request PATCH 'https://example.com/learnings/string' \ --header 'Content-Type: application/json' \ --data-raw '{}'{ "learning_id": "string", "learning_type": "string", "namespace": "string", "user_id": "string", "agent_id": "string", "team_id": "string", "session_id": "string", "entity_id": "string", "entity_type": "string", "content": {}, "metadata": {}, "created_at": 0, "updated_at": 0}{ "detail": "string", "error_id": "string", "error_type": "string"}{ "detail": "string", "error_id": "string", "error_type": "string"}{ "detail": "string", "error_id": "string", "error_type": "string"}{ "detail": "string"}{ "detail": "string", "error_id": "string", "error_type": "string"}