From f8ea365ed8ea4a4678d61fc915736eccafb43f4c Mon Sep 17 00:00:00 2001 From: AMATH <116212274+amathxbt@users.noreply.github.com> Date: Sat, 21 Feb 2026 20:23:31 +0000 Subject: [PATCH] fix: broken docs references, inconsistent API URLs, and response format structures --- api-reference/endpoint/create-api-key.mdx | 4 +- api-reference/endpoint/delete-api-key.mdx | 4 +- api-reference/endpoint/get-bio.mdx | 6 +- api-reference/endpoint/get-profile.mdx | 6 +- api-reference/endpoint/list-api-keys.mdx | 4 +- api-reference/endpoint/search-memories.mdx | 88 +++++++++++----------- api-reference/endpoint/store-memories.mdx | 58 +++++++------- api-reference/endpoint/update-bio.mdx | 6 +- docs.json | 2 +- essentials/authentication.mdx | 2 +- 10 files changed, 94 insertions(+), 86 deletions(-) diff --git a/api-reference/endpoint/create-api-key.mdx b/api-reference/endpoint/create-api-key.mdx index a34ead8..847d7af 100644 --- a/api-reference/endpoint/create-api-key.mdx +++ b/api-reference/endpoint/create-api-key.mdx @@ -9,7 +9,7 @@ Creates a new API key for accessing MemSync APIs programmatically. ```bash cURL -curl -X POST 'https://api.memchat.io/api-keys' \ +curl -X POST 'https://api.memchat.io/v1/api-keys' \ -H 'Authorization: Bearer YOUR_JWT_TOKEN' \ -H 'Content-Type: application/json' \ -d '{ @@ -29,7 +29,7 @@ data = { } response = requests.post( - "https://api.memchat.io/api-keys", + "https://api.memchat.io/v1/api-keys", headers={"Authorization": "Bearer YOUR_JWT_TOKEN"}, json=data ) diff --git a/api-reference/endpoint/delete-api-key.mdx b/api-reference/endpoint/delete-api-key.mdx index 5737bac..b8e51f9 100644 --- a/api-reference/endpoint/delete-api-key.mdx +++ b/api-reference/endpoint/delete-api-key.mdx @@ -13,7 +13,7 @@ This action is irreversible. Once an API key is deleted, it cannot be recovered. ```bash cURL -curl -X DELETE 'https://api.memchat.io/api-keys/key_123abc' \ +curl -X DELETE 'https://api.memchat.io/v1/api-keys/key_123abc' \ -H 'Authorization: Bearer YOUR_JWT_TOKEN' ``` @@ -21,7 +21,7 @@ curl -X DELETE 'https://api.memchat.io/api-keys/key_123abc' \ import requests response = requests.delete( - "https://api.memchat.io/api-keys/key_123abc", + "https://api.memchat.io/v1/api-keys/key_123abc", headers={"Authorization": "Bearer YOUR_JWT_TOKEN"} ) result = response.json() diff --git a/api-reference/endpoint/get-bio.mdx b/api-reference/endpoint/get-bio.mdx index c8de1aa..c3747ed 100644 --- a/api-reference/endpoint/get-bio.mdx +++ b/api-reference/endpoint/get-bio.mdx @@ -9,14 +9,14 @@ Retrieves the user's auto-generated biographical summary, which is created from ```bash cURL -curl -X GET 'https://api.memchat.io/profile/bio' \ +curl -X GET 'https://api.memchat.io/v1/profile/bio' \ -H 'X-API-Key: YOUR_API_KEY' ``` ```python Python import requests -url = "https://api.memchat.io/profile/bio" +url = "https://api.memchat.io/v1/profile/bio" headers = { "X-API-Key": "YOUR_API_KEY" } @@ -26,7 +26,7 @@ bio = response.json() ``` ```javascript JavaScript -const response = await fetch('https://api.memchat.io/profile/bio', { +const response = await fetch('https://api.memchat.io/v1/profile/bio', { method: 'GET', headers: { 'X-API-Key': 'YOUR_API_KEY', diff --git a/api-reference/endpoint/get-profile.mdx b/api-reference/endpoint/get-profile.mdx index 7fd3d01..d2f0274 100644 --- a/api-reference/endpoint/get-profile.mdx +++ b/api-reference/endpoint/get-profile.mdx @@ -9,14 +9,14 @@ Retrieves the user's comprehensive profile, which includes an auto-generated bio ```bash cURL -curl -X GET 'https://api.memchat.io/profile' \ +curl -X GET 'https://api.memchat.io/v1/profile' \ -H 'X-API-Key: YOUR_API_KEY' ``` ```python Python import requests -url = "https://api.memchat.io/profile" +url = "https://api.memchat.io/v1/profile" headers = { "X-API-Key": "YOUR_API_KEY" } @@ -26,7 +26,7 @@ profile = response.json() ``` ```javascript JavaScript -const response = await fetch('https://api.memchat.io/profile', { +const response = await fetch('https://api.memchat.io/v1/profile', { method: 'GET', headers: { 'X-API-Key': 'YOUR_API_KEY', diff --git a/api-reference/endpoint/list-api-keys.mdx b/api-reference/endpoint/list-api-keys.mdx index 827c908..98e7f11 100644 --- a/api-reference/endpoint/list-api-keys.mdx +++ b/api-reference/endpoint/list-api-keys.mdx @@ -9,7 +9,7 @@ Retrieves a list of all API keys associated with the authenticated user account. ```bash cURL -curl -X GET 'https://api.memchat.io/api-keys' \ +curl -X GET 'https://api.memchat.io/v1/api-keys' \ -H 'Authorization: Bearer YOUR_JWT_TOKEN' ``` @@ -17,7 +17,7 @@ curl -X GET 'https://api.memchat.io/api-keys' \ import requests response = requests.get( - "https://api.memchat.io/api-keys", + "https://api.memchat.io/v1/api-keys", headers={"Authorization": "Bearer YOUR_JWT_TOKEN"} ) api_keys = response.json() diff --git a/api-reference/endpoint/search-memories.mdx b/api-reference/endpoint/search-memories.mdx index e62f475..b94e32d 100644 --- a/api-reference/endpoint/search-memories.mdx +++ b/api-reference/endpoint/search-memories.mdx @@ -177,48 +177,52 @@ result.memories.forEach(memory => { ```json Success Response { - "user_bio": "Senior Software Engineer at Google specializing in machine learning infrastructure with 8+ years of experience. Passionate about hiking, photography, and sustainable living.", - "memories": [ - { - "id": "mem_abc123", - "memory": "Works as a Senior Software Engineer at Google on ML infrastructure team", - "categories": ["career"], - "type": "semantic", - "vector_distance": 0.15, - "rerank_score": 0.95, - "source": "chat", - "created_at": "2024-03-20T10:00:00Z", - "updated_at": "2024-03-20T10:00:00Z", - "agent_id": "career-advisor-bot", - "thread_id": "conversation-2024-001" - }, - { - "id": "mem_def456", - "memory": "Recently promoted to Senior Software Engineer, leads team of 5 engineers", - "categories": ["career"], - "type": "episodic", - "vector_distance": 0.22, - "rerank_score": 0.88, - "source": "chat", - "created_at": "2024-03-20T09:30:00Z", - "updated_at": "2024-03-20T09:30:00Z", - "agent_id": "career-advisor-bot", - "thread_id": "conversation-2024-001" - }, - { - "id": "mem_ghi789", - "memory": "Has 8+ years of experience in software engineering", - "categories": ["career"], - "type": "semantic", - "vector_distance": 0.28, - "rerank_score": 0.82, - "source": "integration", - "created_at": "2024-03-19T15:20:00Z", - "updated_at": "2024-03-19T15:20:00Z", - "agent_id": "linkedin-integration", - "thread_id": "integration-linkedin-001" - } - ] + "data": { + "user_bio": "Senior Software Engineer at Google specializing in machine learning infrastructure with 8+ years of experience. Passionate about hiking, photography, and sustainable living.", + "memories": [ + { + "id": "mem_abc123", + "memory": "Works as a Senior Software Engineer at Google on ML infrastructure team", + "categories": ["career"], + "type": "semantic", + "vector_distance": 0.15, + "rerank_score": 0.95, + "source": "chat", + "created_at": "2024-03-20T10:00:00Z", + "updated_at": "2024-03-20T10:00:00Z", + "agent_id": "career-advisor-bot", + "thread_id": "conversation-2024-001" + }, + { + "id": "mem_def456", + "memory": "Recently promoted to Senior Software Engineer, leads team of 5 engineers", + "categories": ["career"], + "type": "episodic", + "vector_distance": 0.22, + "rerank_score": 0.88, + "source": "chat", + "created_at": "2024-03-20T09:30:00Z", + "updated_at": "2024-03-20T09:30:00Z", + "agent_id": "career-advisor-bot", + "thread_id": "conversation-2024-001" + }, + { + "id": "mem_ghi789", + "memory": "Has 8+ years of experience in software engineering", + "categories": ["career"], + "type": "semantic", + "vector_distance": 0.28, + "rerank_score": 0.82, + "source": "integration", + "created_at": "2024-03-19T15:20:00Z", + "updated_at": "2024-03-19T15:20:00Z", + "agent_id": "linkedin-integration", + "thread_id": "integration-linkedin-001" + } + ] + }, + "status": "success", + "timestamp": "2024-03-20T10:00:00Z" } ``` diff --git a/api-reference/endpoint/store-memories.mdx b/api-reference/endpoint/store-memories.mdx index 84b83c5..fc07a48 100644 --- a/api-reference/endpoint/store-memories.mdx +++ b/api-reference/endpoint/store-memories.mdx @@ -189,33 +189,37 @@ console.log(result); ```json Success Response { - "success": true, - "memories_created": 3, - "processing_time": "1.8s", - "categories_detected": ["career", "identity"], - "memories": [ - { - "id": "mem_789abc", - "memory": "Recently promoted to Senior Software Engineer at Google", - "categories": ["career"], - "type": "episodic", - "created_at": "2024-03-20T10:00:15Z" - }, - { - "id": "mem_456def", - "memory": "Works on ML infrastructure team at Google", - "categories": ["career"], - "type": "semantic", - "created_at": "2024-03-20T10:00:15Z" - }, - { - "id": "mem_123ghi", - "memory": "Leads a team of 5 engineers working on recommendation systems", - "categories": ["career"], - "type": "episodic", - "created_at": "2024-03-20T10:00:15Z" - } - ] + "data": { + "success": true, + "memories_created": 3, + "processing_time": "1.8s", + "categories_detected": ["career", "identity"], + "memories": [ + { + "id": "mem_789abc", + "memory": "Recently promoted to Senior Software Engineer at Google", + "categories": ["career"], + "type": "episodic", + "created_at": "2024-03-20T10:00:15Z" + }, + { + "id": "mem_456def", + "memory": "Works on ML infrastructure team at Google", + "categories": ["career"], + "type": "semantic", + "created_at": "2024-03-20T10:00:15Z" + }, + { + "id": "mem_123ghi", + "memory": "Leads a team of 5 engineers working on recommendation systems", + "categories": ["career"], + "type": "episodic", + "created_at": "2024-03-20T10:00:15Z" + } + ] + }, + "status": "success", + "timestamp": "2024-03-20T10:00:15Z" } ``` diff --git a/api-reference/endpoint/update-bio.mdx b/api-reference/endpoint/update-bio.mdx index 503cfb7..6563bf2 100644 --- a/api-reference/endpoint/update-bio.mdx +++ b/api-reference/endpoint/update-bio.mdx @@ -9,7 +9,7 @@ Allows users to customize their auto-generated bio or provide manual overrides f ```bash cURL -curl -X PATCH 'https://api.memchat.io/profile/bio' \ +curl -X PATCH 'https://api.memchat.io/v1/profile/bio' \ -H 'X-API-Key: YOUR_API_KEY' \ -H 'Content-Type: application/json' \ -d '{ @@ -22,7 +22,7 @@ curl -X PATCH 'https://api.memchat.io/profile/bio' \ ```python Python import requests -url = "https://api.memchat.io/profile/bio" +url = "https://api.memchat.io/v1/profile/bio" headers = { "X-API-Key": "YOUR_API_KEY", "Content-Type": "application/json" @@ -39,7 +39,7 @@ bio = response.json() ``` ```javascript JavaScript -const response = await fetch('https://api.memchat.io/profile/bio', { +const response = await fetch('https://api.memchat.io/v1/profile/bio', { method: 'PATCH', headers: { 'X-API-Key': 'YOUR_API_KEY', diff --git a/docs.json b/docs.json index d9a35c3..f21b092 100644 --- a/docs.json +++ b/docs.json @@ -50,7 +50,7 @@ "pages": [ "api-reference/endpoint/store-memories", "api-reference/endpoint/search-memories", - "api-reference/endpoint/get-memories", + "api-reference/endpoint/get", "api-reference/endpoint/update-memory", "api-reference/endpoint/delete-memory" ] diff --git a/essentials/authentication.mdx b/essentials/authentication.mdx index 3080955..e384660 100644 --- a/essentials/authentication.mdx +++ b/essentials/authentication.mdx @@ -282,7 +282,7 @@ def test_authentication(api_key): """Test if your API key is valid""" headers = {"X-API-Key": api_key} - response = requests.get("https://api.memchat.io/healthcheck", headers=headers) + response = requests.get("https://api.memchat.io/v1/healthcheck", headers=headers) if response.status_code == 200: print("✅ Authentication successful")