POST
/
v3
/
memories
/
file
Upload a file
const url = 'https://api.supermemory.ai/v3/memories/file';
const form = new FormData();
form.append('file', '{
  "fileName": "example-file"
}');

const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};

options.body = form;

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
{
  "id": "<string>",
  "status": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

multipart/form-data

Response

200
application/json

Successfully uploaded file

The response is of type object.