Skip to navigation

Create a presigned upload URL

Step 1 of the direct-to-S3 upload path: presign → PUT the bytes to uploadUrl → confirm. Use it for large files or browser uploads that should not stream through the API.

Creates a placeholder document (status: inactive, fileSize: 0, contentSha256: null, metadata.presignPending: true) and returns it with a presigned S3 PUT URL valid for 15 minutes. The URL is signed for the given mimeType: send the PUT with exactly that Content-Type header or S3 rejects it. Nothing is validated, scanned, activated or processed until you call confirm; the placeholder is visible in List documents in the meantime.

mimeType is not checked against the upload allowlist here — an unsupported type is only rejected at confirm. There is no activate or force option on this path: a confirmed document is always activated.

Requires scope documents:write.

Authentication

AuthorizationBearer

Session JWT or API key (ak_...)

Path parameters

subcontractorIdstringRequiredformat: "uuid"

Request

This endpoint expects an object.
fileNamestringRequired>=1 character

File name; becomes the last segment of the S3 object key.

mimeTypestringRequired>=1 character

Content type you will PUT with. Must be one of application/pdf, image/png, image/jpeg, image/jpg, image/webp, image/heic, image/heif, image/tiff or confirm fails with 400.

documentCategoryenumRequired

Category of a document or of the evidence a requirement asks for. The three upload paths accept every value except business_registration (used by report requirements), notice_of_cancellation and certificate (the profile’s “Certificate checks” requirement, which reads the insurance certificate).

documentTypeenumOptional

The kind of a non-insurance document, within its category:

  • tax_form: w9
  • workers_compensation_exemption: wc_exemption
  • training_cert: osha_card, first_aid_cpr, lift_safety (required)
  • safety_policy: safety_policy
  • agreement: agreement

Stored on the document as metadata.documentType. A type from another category, or one sent with insurance, endorsement or license, is a 400. license and background_check documents are stored only and have no type; a background_check upload still accepts the former values level_2_screening and background_check as a label.

documentLabelstringOptional<=255 characters
submittedByEmailstringOptionalformat: "email"

The email address that sent you this document, when it came from someone else (for example the broker who emailed it to you). When it is the subcontractor’s broker on file, its policies count as verified by the broker (verifiedBy: broker_sent_coi) and no verification call is placed. An address that isn’t on file yet (including one that only matches the producer printed on this certificate) goes to TradeGuard staff to confirm.

Response

Placeholder document created, with the presigned upload URL
dataobjectOptional
The placeholder document created by presign, plus the S3 upload URL.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
429
Too Many Requests Error
500
Internal Server Error