diff --git a/docs/platform/features/custom-categories.mdx b/docs/platform/features/custom-categories.mdx index f66bd26df..0e2dc6c6a 100644 --- a/docs/platform/features/custom-categories.mdx +++ b/docs/platform/features/custom-categories.mdx @@ -75,7 +75,7 @@ print(response) ``` -This "Updated custom categories" message is specific to a PATCH-style partial update, which is what `client.project.update()` sends. Calling the raw API with a full PUT instead returns a generic `{"message": "Project updated successfully."}`, regardless of which fields changed. +Treat the `message` string as informational. The project endpoint accepts `PATCH` only, and its documented response is the generic `{"message": "Project updated successfully"}`. Confirm an update by reading the field back, as in the next step, rather than by matching on the message. ### 2. Confirm the active catalog diff --git a/docs/platform/features/memory-decay.mdx b/docs/platform/features/memory-decay.mdx index c2bfe8ccc..7dd03eb37 100644 --- a/docs/platform/features/memory-decay.mdx +++ b/docs/platform/features/memory-decay.mdx @@ -64,7 +64,7 @@ client.project.update(decay=True) ``` ```javascript JavaScript -await client.project.update({ decay: true }); +await client.updateProject({ decay: true }); ``` ```bash cURL @@ -75,32 +75,32 @@ curl -X PATCH https://api.mem0.ai/api/v1/orgs/organizations/$ORG_ID/projects/$PR ``` ```json Response -{ "message": "Updated decay" } +{ "message": "Project updated successfully" } ``` ### 2. Confirm the state -`decay` is returned on every project read; there is currently no way to narrow the response to just this field, so read the full project object and pick out `decay`. +`decay` is returned on every project read. To fetch only this field, use `?fields=decay`. ```python Python -response = client.project.get() +response = client.project.get(fields=["decay"]) print(response["decay"]) ``` ```javascript JavaScript -const response = await client.project.get(); +const response = await client.getProject({ fields: ["decay"] }); console.log(response.decay); ``` ```bash cURL -curl "https://api.mem0.ai/api/v1/orgs/organizations/$ORG_ID/projects/$PROJECT_ID/" \ +curl "https://api.mem0.ai/api/v1/orgs/organizations/$ORG_ID/projects/$PROJECT_ID/?fields=decay" \ -H "Authorization: Token $MEM0_API_KEY" ``` ```json Response -{ "decay": true, "...": "full project object" } +{ "decay": true } ``` @@ -114,7 +114,7 @@ client.project.update(decay=False) ``` ```javascript JavaScript -await client.project.update({ decay: false }); +await client.updateProject({ decay: false }); ``` ```bash cURL