Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.memorylake.ai/llms.txt

Use this file to discover all available pages before exploring further.

PUT /openapi/memorylake/api/v1/drives/items/{item_id}/xattrs
Stores your own string key-value pairs (extended attributes, or xattrs) on a Library file or folder. Use this to tag items with metadata your application cares about — for example a tenant ID, a workflow status, or a content classification — without changing the file itself. The call merges with whatever xattrs the item already has: keys you send are added or overwritten; keys already on the item that you don’t send are left alone. To remove a key, call Delete Item Xattrs.
The system reserves a few internal xattr keys it manages on its own. Sending values for those keys has no effect — they’re silently filtered. The system root folders (My Space, WPS Space, Lark Space) refuse xattr writes entirely and return 403.
Permission required: drive:item_modify · service

Path Parameters

item_id
string
required
ID of the file or folder to set xattrs on.

Request Body

x_attrs
object
required
Map of string → string to upsert onto the item. Each entry is one extended attribute. An empty map is allowed but a no-op.
curl -X PUT 'https://app.memorylake.ai/openapi/memorylake/api/v1/drives/items/sc-5c6bf0f82d624a20a6fa4696997bdd46:7d8cf1e93f634b31b5/xattrs' \
  -H 'Authorization: Bearer sk_xxxxxx' \
  -H 'Content-Type: application/json' \
  -d '{
    "x_attrs": {
      "tenant_id": "acme-corp",
      "review_status": "approved"
    }
  }'

Response

success
boolean
Indicates if the request was successful
message
string
Human-readable status message
{
  "success": true,
  "message": "Operation completed successfully"
}
To read back the current xattrs on an item, call Get Item — its response includes the full x_attrs map.