將內容記住到 Rememberizer
Saves a document with a name and content
Body
namestringRequired
contentstringRequired
Responses
200
Document saved successfully
application/json
dataobject[]Optional
messagestringOptional
codestring · nullableOptional
400
Bad request (invalid parameters)
500
Internal server error
post
/documents/memorize/範例請求
curl -X POST \
https://api.rememberizer.ai/api/v1/documents/memorize/ \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "重要資訊",
"content": "這是我希望 Rememberizer 記住的重要內容。"
}'const memorizeContent = async () => {
const response = await fetch('https://api.rememberizer.ai/api/v1/documents/memorize/', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_JWT_TOKEN',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: '重要資訊',
content: '這是我希望 Rememberizer 記住的重要內容。'
})
});
if (response.status === 201) {
console.log("內容成功儲存");
} else {
console.error("儲存內容失敗");
const errorData = await response.json();
console.error(errorData);
}
};
memorizeContent();請求參數
參數
類型
描述
回應
錯誤回應
狀態碼
描述
使用案例
Last updated