signed_id. Then pass the signed_id as background_image when you create or update a theme.
The image must be a PNG, JPEG, GIF or SVG of 1 MB or smaller. A signed_id works only in the workspace that created it, and only after the image bytes are uploaded.
Option 1: The image is on the web
1
Store the image
Send the public The response has the
https address to Upload an image from a URL. The address must be reachable without credentials and point to a public host. At most 2 redirects are followed.signed_id.2
Use it on a theme
Option 2: The image is on your machine
1
Reserve the upload
Send the file name, its size in bytes and its checksum to Reserve an image upload. The The response has the
checksum is the base64-encoded MD5 digest of the file, not the hex digest.signed_id, the upload_url and the upload_headers.2
Send the bytes
Send the file with an HTTP Use the headers from the response. Do not add an
PUT to upload_url. Send every header in upload_headers unchanged. The upload_url is a short-lived credential, so do not share or log it.X-Api-Key header to this request.3
Use it on a theme
Pass the
signed_id as background_image, as in option 1. A signed_id used before its bytes arrive returns a 422 error.Related theme properties
These properties go intheme.properties:
Send an empty string or
null as background_image to remove the image. Theme responses return background_image_url, the CDN address of the image, or null when there is none.