Skip to main content
POST
Request a presigned upload URL for a digital file
This endpoint is in beta and subject to change.
OAuth scope: offer_writeAPI keys have full access to this endpoint.
When you PUT the bytes to uploadUrl, you must send two headers that are baked into the URL’s signature — omit or mismatch either and Google Cloud Storage rejects the upload with 403 SignatureDoesNotMatch:
  • Content-Type — must equal the contentType you sent in this request.
  • x-goog-content-length-range: 0,<size> — must use the same size (in bytes) you sent in this request.
The PUT goes directly to Google Cloud Storage, not Fourthwall — don’t send your Fourthwall credentials with it, and note the URL is short-lived. See Create digital products for an end-to-end walkthrough.

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Path Parameters

productId
string
required

Body

application/json

Request for a presigned upload URL for a digital file

fileName
string
required

Name of the file

Example:

"artwork.png"

contentType
string
required

MIME type of the file

Example:

"image/png"

size
integer<int64>
required

Size of the file in bytes. Must match the x-goog-content-length-range header sent when uploading the bytes to uploadUrl.

Example:

1048576

Response

Created

Response containing a presigned upload URL for a digital file

uploadUrl
string
required

Presigned URL to upload the file to via HTTP PUT

fileUrl
string
required

The file URL reference to use when confirming the upload