Update Profile Schema
Update the name, description, or plan version of a profile schema
Updates a profile schema. After modifying plan_version, newly written memories follow the new version rule, while already written memories are not affected.
The request body must include at least one of name, description, plan_version, extract_scene, or attributes_operations.
Endpoint
https://{WorkspaceId}.cn-beijing.maas.aliyuncs.com/api/v2/apps/memory/profile_schemas/{profile_schema_id}Replace {WorkspaceId} with your actual workspace ID.
Path parameters
profile_schema_idstringRequiredProfile schema ID
Request body
namestringOptionalUpdated schema name, up to 32 characters
descriptionstringOptionalUpdated schema description
plan_versionstringOptionalBilling plan: pro or lite
extract_scenestringOptionalExtraction mode: efficient or intelligent
attributes_operationsarrayOptionalList of attribute operations
attributes_operations[].opstringRequiredOperation type: add, update, or delete
attributes_operations[].namestringConditionalAttribute name; required when op=add and optional when op=update
attributes_operations[].descriptionstringOptionalAttribute description; applies to add and update
attributes_operations[].default_valuestringOptionalDefault attribute value; can be changed when op=update
attributes_operations[].attribute_idstringConditionalAttribute ID; required when op=update or op=delete
memory_library_idstringOptionalMemory library ID
Request examples
curl -X PATCH "https://{WorkspaceId}.cn-beijing.maas.aliyuncs.com/api/v2/apps/memory/profile_schemas/{profile_schema_id}" \
--header "Authorization: Bearer $DASHSCOPE_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"name": "Updated basic user profile",
"description": "Stable user attributes and preference information",
"plan_version": "lite",
"extract_scene": "intelligent",
"attributes_operations": [
{"op": "add", "name": "Favorite music", "description": "Preferred music genres"},
{"op": "update", "attribute_id": "attr_002", "name": "Regular exercise", "default_value": "Running"},
{"op": "delete", "attribute_id": "attr_003"}
]
}'
Response example
{
"request_id": "813e8d62-062c-97d5-877b-e10f356ca7d4"
}