Profile

Delete Profile Template

Delete a Profile template along with all of its active instances and bindings; other templates and memories are unaffected. To delete only the instance of a specific user or Agent, use /delete/profile.

POST
/
delete
/
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 = {
  "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']}/delete/profile_template"

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

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

Authorizations

Authorization
string
header
required

Token API_key, available in API Console > API Keys

Body

application/json
profile_template_id
string
required
ID of a template in the current project.

Response

application/json

Successful Response

code
number

API status code.

Example: 0
data
object
Show child attributes
message
string

API response message.

Example: "ok"