post
https://api.ashbyhq.com/file.createFileUploadHandle
Creates a presigned upload URL that allows uploading a file directly to storage, bypassing the need to send file bytes through the API.
Benefits over multipart upload:
- Reliability: File bytes are uploaded directly to storage, avoiding timeouts and connection resets that can occur when proxying large files through the API.
- Compatibility: Avoids issues with firewalls or proxies that block or scan multipart payloads containing binary content.
- Simplicity: The follow-up call to, e.g.,
candidate.uploadResumeorcandidate.uploadFileis a plainapplication/jsonrequest rather thanmultipart/form-data.
Requires the candidatesWrite permission.
Usage flow:
- Call
file.createFileUploadHandlewith the file metadata to get a presigned upload URL, form fields, and a handle. - Upload the file directly to the returned
urlusing amultipart/form-dataPOST request. Include all returnedfieldsas form fields, and the file as the last field namedfile. - Call
candidate.uploadResumewith{ candidateId, resumeHandle }orcandidate.uploadFilewith{ candidateId, fileHandle }usingContent-Type: application/jsonto associate the uploaded file with a candidate.
The presigned URL expires after 10 minutes. The fileUploadContext must be one of CandidateResume or CandidateFiles.
