Javascript
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>" }
Upload a file to be processed
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Bearer <token>
<token>
Successfully uploaded file
The response is of type object.
object
Was this page helpful?