Skip to main content
POST
/
serve
/
api
/
v1
/
memories
/
add
Add Memory
curl --request POST \
  --url https://api.memories.ai/serve/api/v1/memories/add \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "unique_id": "test1117",
  "memories": [
    {
      "role": "Tester",
      "content": "Starting testing today"
    }
  ],
  "tags": [
    "test-tag"
  ],
  "latitude": "3.2028",
  "longitude": "73.2207",
  "memories_at": "2025-11-17T17:00:00Z"
}
'
{
  "code": "0000",
  "msg": "success",
  "data": {},
  "success": true,
  "failed": false
}

Prerequisites

  • You have created a memories.ai API key.
  • You have a valid unique_id for organizing memories.
unique_id

Host URL

https://api.memories.ai

Endpoint

POST /serve/api/v1/memories/add
/serve/api/v1/memories/add

Request Example

import requests
from typing import Dict, Any

headers: Dict[str, str] = {
    "Authorization": "<API_KEY>"
}
json_body: Dict[str, Any] = { 
    "unique_id": "test1117", 
    "memories": [ 
        { 
            "role": "Tester", 
            "content": "Starting testing today" 
        } 
    ], 
    "tags": [ "test-tag" ], 
    "latitude": "3.2028", 
    "longitude": "73.2207", 
    "memories_at": "2025-11-17T17:00:00Z"
}
response: requests.Response = requests.post( 
    "https://api.memories.ai/serve/api/v1/memories/add", 
    headers=headers, 
    json=json_body
)
print(response.json())

Request Body

{ 
    "unique_id": "string", 
    "memories": [ 
        { 
            "role": "string", 
            "content": "string" 
        } 
    ], 
    "tags": ["string"], 
    "latitude": "string", 
    "longitude": "string", 
    "memories_at": "string"
}

Request Parameters

unique_id
string
required
Unique identifier for organizing memories.
memories
array
required
List of memory objects containing role and content.
tags
array
List of tags associated with the memory.
latitude
string
Latitude of the memory location.
longitude
string
Longitude of the memory location.
memories_at
string
Timestamp of the memory (ISO 8601).

Response Example

Status code 200
{ 
    "code": "0000", 
    "msg": "success", 
    "data": [ 
        { 
            "id": "645633872093552640", 
            "content": "Starting testing today", 
            "tags": ["test-tag"], 
            "longitude": 73.2207, 
            "latitude": 3.2028, 
            "owner": "Tester", 
            "created_at": "2025-11-17T14:38:30Z", 
            "updated_at": "2025-11-17T14:38:30Z", 
            "memories_at": "2025-11-17T17:00:00Z" 
        } 
    ], 
    "success": true, 
    "failed": false
}

Response Structure

Status code 200
"0000"

Authorizations

Authorization
string
header
required

Body

application/json
unique_id
string
required
Example:

"test1117"

memories
object[]
required
tags
string[]
Example:
["test-tag"]
latitude
string
Example:

"3.2028"

longitude
string
Example:

"73.2207"

memories_at
string<date-time>
Example:

"2025-11-17T17:00:00Z"

Response

200 - application/json

Successful response

code
Example:

"0000"

msg
string
Example:

"success"

data
success
boolean
Example:

true

failed
boolean
Example:

false