Upload file
POST
/api/public/v1/documents/file
const url = 'https://app.kontera.ch/api/public/v1/documents/file';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"fileName":"document.pdf","contentType":"application/pdf"}'};
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://app.kontera.ch/api/public/v1/documents/file \ --header 'Content-Type: application/json' \ --data '{ "fileName": "document.pdf", "contentType": "application/pdf" }'Generate a signed URL to upload a document to.
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
fileName
required
Filename of your document, including its extension.
string
Example
document.pdfcontentType
ContentType of uploaded document. If none is provided, Kontera will auto-detect it using the provided filename.
string
Example
application/pdfResponses
Section titled “Responses”Media typeapplication/json
object
signedContentType
required
Detected or provided content type
string
signedFileName
required
The name of the file being uploaded
string
signedUrl
required
The signed url where the file should be uploaded to using multi-part form upload.
string
Examplegenerated
{ "signedContentType": "example", "signedFileName": "example", "signedUrl": "example"}