Media Library

Request a pre-signed upload URL

Changed on

Rate limit: 20 requests / minute per shop. See Rate limiting.

Returns a pre-signed upload URL for uploading a new image. After receiving the response, PUT the image bytes directly to the uploadUrl.

post/open-api/v1.0/media/upload-url

Request

  • Base URL
    https://api.fourthwall.com
  • URL
    https://api.fourthwall.com/open-api/v1.0/media/upload-url
  • Auth
    • OAuth 2
      Implicit: https://auth.staging.fourthwall.com/auth/realms/Fourthwall/protocol/openid-connect/auth
      Scopes: media_write
    • or HTTP basic

Request body

fileNamestring required

Name of the file

contentTypestring required

MIME type of the file

sizeinteger required

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

Example request

{
  "fileName": "artwork.png",
  "contentType": "image/png",
  "size": 1048576
}

Response

Created

uploadUrlstring required
fileUrlstring required
expiresAtstring date-time

Changes

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the optional property to the response with the status