Create a presigned S3 POST upload request for a portfolio file upload.
File uploads use a three-step flow:
- Create an upload request to receive a temporary S3 upload URL and required POST parameters.
- Upload the file directly to S3 with a multipart/form-data POST. Include every key/value pair from
fieldsas form parameters, followed by the file as the file part. - Finalize the upload by creating a portfolio file with
upload_request_id.
Upload requests expire after 15 minutes and can only be finalized once.
Body
Required
-
Name of the file to upload
-
Claimed upload size in bytes
Minimum value is
1, maximum value is104857600. -
MIME type of the file to upload
Values are
application/pdf,application/msword,application/vnd.ms-excel,application/vnd.ms-powerpoint,application/vnd.openxmlformats-officedocument.presentationml.presentation,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.openxmlformats-officedocument.wordprocessingml.document,image/gif,image/heic,image/jpeg,image/png,image/webp, ortext/csv. -
ID of the portfolio company profile the file belongs to
Responses
-
Upload request successfully created
-
Bad Request - The request is invalid or malformed
-
Unauthorized - Invalid or missing authentication token
-
Forbidden - The authenticated user does not have access to the requested resource
-
Unprocessable Entity - The request is valid but contains semantic errors
-
Too Many Requests - Rate limit exceeded
curl \
--request POST 'https://api.visible.vc/portfolio_file_upload_requests' \
--header "Authorization: Bearer $ACCESS_TOKEN" \
--header "Content-Type: application/json" \
--data '{"name":"Board Deck.pdf","size":1024,"content_type":"application/pdf","portfolio_company_profile_id":"cad09a10-73e8-4205-ae67-4e6156f37be8"}'
{
"name": "Board Deck.pdf",
"size": 1024,
"content_type": "application/pdf",
"portfolio_company_profile_id": "cad09a10-73e8-4205-ae67-4e6156f37be8"
}
{
"portfolio_file_upload_request": {
"upload_request_id": "ec5252fe-9abc-4096-85e9-1374e70a3182",
"upload_url": "https://visible-test.s3.amazonaws.com",
"fields": {
"key": "portfolio_files/example/Board_Deck.pdf",
"acl": "private",
"Content-Type": "application/pdf"
},
"expires_at": "2025-01-01T00:15:00.000Z"
}
}
{
"errors": [
{
"type": "parameter_invalid",
"field": "filter",
"message": "must be an object"
}
]
}
{
"errors": [
{
"type": "unauthorized"
}
]
}
{
"errors": [
{
"type": "forbidden"
}
]
}
{
"errors": [
{
"type": "attribute_invalid",
"field": "value",
"message": "required"
}
]
}
{
"errors": [
{
"type": "rate_limit_exceeded"
}
]
}