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.uploadResume,candidate.uploadFile, orapplicationForm.submitis 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. - Use the returned
handlein a follow-up call:candidate.uploadResumewith{ candidateId, resumeHandle }to attach a resume to a candidate.candidate.uploadFilewith{ candidateId, fileHandle }to attach a file to a candidate.applicationForm.submitwithContent-Type: application/json, where file field values infieldSubmissionscontain the handle string instead of a multipart file reference.
The presigned URL expires after 10 minutes. The fileUploadContext must be one of CandidateResume, CandidateFiles, or ApplicationForm.
