Skip to main content
POST
/
v3
/
documents
/
file
Upload a file
const url = 'https://api.supermemory.ai/v3/documents/file';
const form = new FormData();
form.append('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

Body

multipart/form-data
file
file
required
containerTags
string
Example:
fileType
string
Example:
mimeType
string
metadata
string
Example:

Response

id
string
required
status
string
required