v1

latestOpenAPI 3.0.3Proprietary2026-07-26162247330.6 KB
Buckets

Presign an upload or download for an object in a bucket

Returns a presigned URL that transfers bytes directly to or from the object's bucket on the specified branch, without the caller ever handling S3 credentials. The operation field selects the direction:

  • upload returns a presigned PUT URL (the caller PUTs the file bytes straight to url with the returned headers). Authorized with project write access.
  • download returns a presigned GET URL (the caller GETs the bytes straight from url). Authorized with project read access.

The platform mints a short-lived credential and builds the SigV4-signed URL against the branch's S3 data-plane host, returning it together with the HTTP method, any headers the caller must echo, and the URL's expiry.

Served by the user's session (no customer S3 credentials required).

Note: This endpoint is currently in Private Beta.

post/projects/{project_id}/branches/{branch_id}/buckets/{bucket_name}/objects/{object_key}/presign

Request body

operation'upload' | 'download' required

The transfer direction. upload returns a presigned PUT URL; download returns a presigned GET URL.

content_typestring

The Content-Type to bind into the signed request. Only meaningful for upload: when set, the caller MUST send the same Content-Type header on the PUT, and the value is echoed back in the response headers. Ignored for download.

expires_in_secondsinteger

How long the presigned URL stays valid, in seconds. Defaults to 900 (15 minutes); capped at 604800 (7 days).

Response

A presigned URL valid until expires_at. The caller transfers the object bytes by issuing method url with the returned headers.

urlstring required

The presigned URL. Transfer the object bytes by issuing method url with the returned headers.

methodstring required

The HTTP method to use against url: PUT for an upload, GET for a download.

headersobject required

Headers the caller MUST send verbatim on the request (e.g. Content-Type when it was signed on an upload). May be empty.

expires_atstring date-time required

When the presigned URL stops being valid.