Start a file upload into a Documents folder (step 1 of 3)

posthttps://api.expiryedge.com/v1/getFolderFileUploadUrl
editor or admin60/minIdempotency-Key
Request
curl -X POST 'https://api.expiryedge.com/v1/getFolderFileUploadUrl' \
  -H "Authorization: Bearer $EXPIRYEDGE_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "folderId": "fld_Ins2026",
  "file_name": "Liability Insurance Certificate 2026.pdf",
  "content_type": "application/pdf",
  "size": 184022
}'
Response
{
  "upload_id": "pUp7x1",
  "upload_url": "https://storage.googleapis.com/expiryedge.appspot.com/organizations/org_northwind/folder_files/fld_Ins2026/1790518300000_Liability_Insurance_Certificate_2026.pdf?X-Goog-Signature=abc123",
  "method": "PUT",
  "headers": {
    "Content-Type": "application/pdf",
    "x-goog-content-length-range": "0,184022"
  },
  "expires_at": "2026-09-27T14:20:00.000Z",
  "max_size": 184022
}

Validates the file and returns a one-time signed URL. PUT the bytes to upload_url with the returned headers within 15 minutes, then call completeFolderFileUpload. Max 50 MB; must fit in your storage quota.

Headers

  • Idempotency-Keystring
    Optional client-generated key (1-255 characters of letters, digits, - _ : .).
    pattern: ^[A-Za-z0-9_\-:.]{1,255}$

Body parameters

application/json
  • file_namestringrequired
    max length: 255
  • content_typestringrequired
  • sizeintegerrequired
    Exact file size in bytes.
    min: 1 · max: 52428800
  • folderIdstring | null
    Target folder id; omit, null or root for the top level.

Returns

201
Upload link created.
  • upload_idstringrequired
  • upload_urlstringrequired
    Signed Google Cloud Storage URL.
    format: uri
  • methodstringrequired
    AllowedPUT
  • headersmap of stringrequired
  • expires_atstringrequired
    format: date-time
  • max_sizeintegerrequired

Errors

400
Invalid request, or UNSUPPORTED_FILE_TYPE for a content type that is not allowed.
401
Missing, expired or invalid bearer token.
403
Viewer role, no organization, or STORAGE_LIMIT_REACHED (the file would exceed your plan storage).
404
The record does not exist or is not in your organization.
405
The endpoint does not accept this HTTP method.
409
A request with the same Idempotency-Key is still being processed. Retry after Retry-After seconds.
413
FILE_TOO_LARGE - the file is over 50 MB.
422
The Idempotency-Key was already used with a different request body.
429
Too many requests for this endpoint from your IP. Wait Retry-After seconds.
500
Unexpected server error. Retry later; quote requestId to support.