Register Upload
Finalize a signed-URL upload into a Moda file row.
Streams the staged blob through download_with_hash (writes to a
temp file on disk, hashes in 8 KiB chunks) so a 250 MB upload never
fully materializes in process memory — loading even a couple of those
concurrently on Cloud Run would risk OOM and defeat the point of the
direct-to-storage flow.
Deduplicates against existing team files by content hash. On a dedup
miss the staged blob is server-side-copied to the canonical
teams/<team>/files/<id> key via storage.copy (zero data
transfer on GCS) and registered via create_file_from_storage. The
pending blob is best-effort deleted either way.
Authorizations
API key from Settings > Developer > REST API
Headers
Calendar-dated API version pin. New integrations should pin 2026-05-01 to opt into the newest response shapes. For back-compat the server also accepts requests with no header and resolves them to the current default (today: 2026-04-12); that default advances on each sunset date. Any unsupported value returns 400 unsupported_version.
2026-04-12, 2026-05-01 "2026-05-01"
Body
storage_key returned by a prior POST /v1/uploads/url after the PUT completed.
Filename to record on the File row. Defaults to the basename embedded in storage_key.
512MIME type to record on the File row. Defaults to the type the signed URL was originally bound to (inferred from the filename when not supplied).
Prefixed fld_ wire ID (Crockford base32 body) — the canonical, recommended form. For back-compat, a bare UUID string is also accepted in both path parameters and JSON request bodies (older integrations that stored raw UUIDs keep working). Both are permanent, supported inputs.
^fld_[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$"fld_01HT9WK8N3M2J4A5Z6P7Q8R9TV"
Response
Successful Response
Unique file identifier (prefixed file_...).
^file_[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$"file_01HT9WK8N3M2J4A5Z6P7Q8R9TV"
Stable proxy URL for the uploaded file. Use this in attachment URLs.
Filename of the uploaded file.
MIME type of the file.
File size in bytes.
True if an identical file already existed (deduplicated).
Prefixed fld_ wire ID (Crockford base32 body) — the canonical, recommended form. For back-compat, a bare UUID string is also accepted in both path parameters and JSON request bodies (older integrations that stored raw UUIDs keep working). Both are permanent, supported inputs.
^fld_[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$"fld_01HT9WK8N3M2J4A5Z6P7Q8R9TV"