File Upload Helpers
Create document attachment upload URL
Changed on<small>Requires an API token with the Document Manager role.</small>
Generates a presigned URL for securely uploading a file to cloud storage. The uploaded file can then be added to a document as an attachment via the Add an attachment to a document endpoint.
The returned URL expires after a limited time and should be used immediately for upload. Upload the file with a POST request to the returned URL, sending the provided fields as form fields in the request body, followed by the file contents in a file field.
The request accepts a content_type string matching one of the rows below.
| File type | content_type |
|---|---|
| application/pdf | |
| MS Word (.doc) | application/msword |
| MS Word (.docx) | application/vnd.openxmlformats-officedocument.wordprocessingml.document |
| Excel (.xls) | application/vnd.ms-excel |
| Excel (.xlsx) | application/vnd.openxmlformats-officedocument.spreadsheetml.sheet |
| PowerPoint (.ppt) | application/vnd.ms-powerpoint |
| PowerPoint (.pptx) | application/vnd.openxmlformats-officedocument.presentationml.presentation |
| XML | application/xml |
| EML | message/rfc822 |
| CSV | text/csv |
| Plain text (.txt) | text/plain |
| Images | image/jpeg, image/png, image/webp, image/gif |
For a complete guide with examples, see How to add an attachment to a document.
post/file-uploads/document-attachment
Request
- Base URLhttps://app.fynk.com/v1/api
- URLhttps://app.fynk.com/v1/api/file-uploads/document-attachment
- AuthHTTP bearer
Request body
Example request
{
"content_type": "application/pdf"
}Response
SignedUploadUrlResource
Example response
{
"data": {
"uuid": "ab2665c1-9a7c-4230-a431-21682eb302aa",
"url": "https://s3.eu-central-1.amazonaws.com/...",
"method": "POST",
"expires_at": "2019-08-24T14:15:22Z"
}
}Changes
- info
endpoint added
- info