Upload a file
POST
/uploads
const url = 'https://api.muninx.com/uploads';const form = new FormData();form.append('file', '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);}curl --request POST \ --url https://api.muninx.com/uploads \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: multipart/form-data' \ --form file=@fileUploads a single file using multipart/form-data. Requires a valid JWT Bearer token.
Authorizations
Section titled “Authorizations ”Request Body required
Section titled “Request Body required ” Media type multipart/form-data
object
file
required
string format: binary
Responses
Section titled “ Responses ”File uploaded
Media type application/json
object
url
string format: uri
Example
{ "url": "https://cdn.muninx.com/acme/123e4567-e89b-12d3-a456-426614174000.png"}Invalid request
Media type application/problem+json
RFC 9457 problem details
object
type
string format: uri
title
string
status
integer format: int32
detail
string
instance
string
code
Stable machine-readable error code
string
Example
{ "type": "about:blank", "title": "Bad Request", "status": 400, "detail": "Invalid file", "instance": "/uploads", "code": "invalid_request"}Unauthorized
Media type application/problem+json
RFC 9457 problem details
object
type
string format: uri
title
string
status
integer format: int32
detail
string
instance
string
code
Stable machine-readable error code
string
Example
{ "type": "about:blank", "title": "Bad Request", "status": 400, "detail": "Invalid file", "instance": "/uploads", "code": "invalid_request"}Payload too large
Media type application/problem+json
RFC 9457 problem details
object
type
string format: uri
title
string
status
integer format: int32
detail
string
instance
string
code
Stable machine-readable error code
string
Example
{ "type": "about:blank", "title": "Bad Request", "status": 400, "detail": "Invalid file", "instance": "/uploads", "code": "invalid_request"}Internal server error
Media type application/problem+json
RFC 9457 problem details
object
type
string format: uri
title
string
status
integer format: int32
detail
string
instance
string
code
Stable machine-readable error code
string
Example
{ "type": "about:blank", "title": "Bad Request", "status": 400, "detail": "Invalid file", "instance": "/uploads", "code": "invalid_request"}