Upload File

POST /v0/files

Headers

  • Authorization (string, required) — Token for authentication (Bearer token)

Request body

  • Content type: multipart/form-data

  • Field: file (binary, required) — File to upload

Responses

  • 200 — File uploaded successfully (application/json)

upload-file.js
const form = new FormData();
form.append('file', fs.createReadStream('path/to/your/file.pdf'));

const response = await fetch('https://api.getfractal.xyz/v0/files', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_TOKEN'
  },
  body: form
});

const data = await response.json();

Example successful response (200)

chevron-rightResponse schema / object detailshashtag

Response: application/json — object with properties returned on success (example above).

Last updated