Profile

Bind Profile Template

Bind a Profile template to a user or Agent, creating a Profile memory instance. After binding, the corresponding attribute fields are automatically updated whenever new messages are added.

POST
/
bind
/
profile_template
import os
import requests
import json

# Replace with your API Key
os.environ["MEMOS_API_KEY"] = "YOUR_API_KEY"
os.environ["MEMOS_BASE_URL"] = "https://memos.memtensor.cn/api/openmem/v1"

data = {
  "bind_list": [
    {
      "user_id": "memos_user_123",
      "profile_template_id": "tpl_user_001"
    }
  ]
}
headers = {
  "Content-Type": "application/json",
  "Authorization": f"Token {os.environ['MEMOS_API_KEY']}"
}
url = f"{os.environ['MEMOS_BASE_URL']}/bind/profile_template"

res = requests.post(url=url, headers=headers, data=json.dumps(data))

print(f"result: {res.json()}")
{
  "code": 0,
  "data": {
    "success": true
  },
  "message": "<string>"
}

Authorizations

Authorization
string
header
required

Token API_key, available in API Console > API Keys

Body

application/json
bind_list
object[]
required
List of bindings to create in a single call, up to 20 per request.
Show child attributes

Response

application/json

Successful Response

code
number

API status code.

data
object
Show child attributes
message
string

API response message.