Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions api-reference/endpoint/create-api-key.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Creates a new API key for accessing MemSync APIs programmatically.
<RequestExample>

```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 '{
Expand All @@ -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
)
Expand Down
4 changes: 2 additions & 2 deletions api-reference/endpoint/delete-api-key.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ This action is irreversible. Once an API key is deleted, it cannot be recovered.
<RequestExample>

```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'
```

```python Python
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()
Expand Down
6 changes: 3 additions & 3 deletions api-reference/endpoint/get-bio.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ Retrieves the user's auto-generated biographical summary, which is created from
<RequestExample>

```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"
}
Expand All @@ -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',
Expand Down
6 changes: 3 additions & 3 deletions api-reference/endpoint/get-profile.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ Retrieves the user's comprehensive profile, which includes an auto-generated bio
<RequestExample>

```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"
}
Expand All @@ -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',
Expand Down
4 changes: 2 additions & 2 deletions api-reference/endpoint/list-api-keys.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ Retrieves a list of all API keys associated with the authenticated user account.
<RequestExample>

```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'
```

```python Python
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()
Expand Down
88 changes: 46 additions & 42 deletions api-reference/endpoint/search-memories.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
```

Expand Down
58 changes: 31 additions & 27 deletions api-reference/endpoint/store-memories.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
```

Expand Down
6 changes: 3 additions & 3 deletions api-reference/endpoint/update-bio.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Allows users to customize their auto-generated bio or provide manual overrides f
<RequestExample>

```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 '{
Expand All @@ -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"
Expand All @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
]
Expand Down
2 changes: 1 addition & 1 deletion essentials/authentication.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down