内容を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