Skip to main content
POST
/
files
Upload file
const form = new FormData();
form.append('file', '<string>');
form.append('purpose', '<string>');

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

options.body = form;

fetch('https://api.phaseo.app/v1/files', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
{
  "error": "error_type",
  "ok": false,
  "message": "Human-readable error message",
  "description": "Additional error details."
}
This route is reserved for upcoming file upload support.

Authorizations

Authorization
string
header
required

Bearer token authentication

Body

multipart/form-data
file
file
required
purpose
string
required

Response

Unauthorized

error
required
Example:

"error_type"

ok
boolean
Example:

false

message
string
Example:

"Human-readable error message"

description
string
Example:

"Additional error details."

Last modified on February 25, 2026