Use the Files API to upload, list, inspect, rename and delete files. Select the library with type on list requests and file_type on upload requests. upload is Media; site_asset is Site Assets. The library cannot be changed after upload.
Media requires read_files for reads and write_files for writes. Site Assets requires read_site_assets and write_site_assets. A request spanning both libraries requires the corresponding scopes for both. Upload finalize and status calls use write scopes because they belong to the upload workflow.
Both libraries share the store's storage allowance. Attaching a file to a product, content record or storefront setting is a separate resource operation; the target field determines the accepted library, media type and additional permissions. Uploading a file alone does not attach it.
Use the signed request returned by an upload intent only to upload that file. File responses provide delivery URLs for display and download; use those URLs as returned. Library scopes protect API access, not access to a public delivery URL.
Endpoints#
Get file limits
Read supported formats and request limits.
Returns the current format, size, image pixel-count, text-length and batch limits. Upload batches use max_files_per_upload; lookups use bulk_lookup_max; deletions use bulk_delete_max. Configure list and picker pagination from their respective page-size values. Sample values are illustrative; fetch this endpoint for the current limits. Size limits ending in _mb use 1,048,576 bytes per unit. model_viewer_url identifies the hosted 3D viewer.
Headers
| Name | Type | Description |
|---|---|---|
Authorization
required
|
string |
Bearer Store API token. |
Errors
-
401UNAUTHORIZEDAuthorization header missing, malformed, or token invalid/expired.
-
402SUBSCRIPTION_REQUIREDThe store does not have an active or trialing subscription.
-
403STORE_API_SCOPE_REQUIREDToken is valid but lacks the required scope for this call.
-
429RATE_LIMITEDThe token's request allowance is exhausted. Retry after the Retry-After header.
Get storage usage
Read the store's used storage, file count and allowances.
Media and Site Assets share this allowance. used_bytes reports counted file storage and excludes space reserved for uploads still in progress. quota_bytes - used_bytes is therefore not guaranteed upload capacity. Creating upload intents checks committed and reserved usage together. The _gb fields use 1,073,741,824 bytes per unit. used_files counts Media and Site Assets files together, one per file whatever its size; file_limit is the plan's maximum. Uploads still in progress also hold a file slot, so file_limit - used_files is not guaranteed upload capacity either. An upload that would pass the file limit fails with STORAGE_FILE_LIMIT_REACHED.
Headers
| Name | Type | Description |
|---|---|---|
Authorization
required
|
string |
Bearer Store API token. |
Errors
-
401UNAUTHORIZEDAuthorization header missing, malformed, or token invalid/expired.
-
402SUBSCRIPTION_REQUIREDThe store does not have an active or trialing subscription.
-
403STORE_API_SCOPE_REQUIREDToken is valid but lacks the required scope for this call.
-
429RATE_LIMITEDThe token's request allowance is exhausted. Retry after the Retry-After header.
List files
List files in one library.
Defaults to Media (type=upload); use type=site_asset for Site Assets. Results are ordered by upload time, newest first, with an ID tie-breaker. media filters the media type and search matches original_filename case-insensitively. Pass returned cursors unchanged and keep the same library, media filter and search. Reset the cursor when changing those filters. total is counted when the cursor walk begins and is carried through later pages; it is not a live count or a snapshot of the library. An omitted limit uses list_page_size; an invalid or oversized limit is rejected.
Query parameters
| Name | Type | Description |
|---|---|---|
type
|
string |
File namespace. Omit or use |
media
|
string |
Filter by media type: |
search
|
string |
Free-text filename match (case-insensitive substring). |
sort
|
string |
Order: |
cursor
|
string |
Opaque cursor returned by the previous response. Keep the same namespace, media filter, search, and sort while using it. |
limit
|
integer |
Page size, 1-200 (default 50). |
Headers
| Name | Type | Description |
|---|---|---|
Authorization
required
|
string |
Bearer Store API token. |
Errors
-
401UNAUTHORIZEDAuthorization header missing, malformed, or token invalid/expired.
-
402SUBSCRIPTION_REQUIREDThe store does not have an active or trialing subscription.
-
403STORE_API_SCOPE_REQUIREDToken is valid but lacks the required scope for this call.
-
429RATE_LIMITEDThe token's request allowance is exhausted. Retry after the Retry-After header.
-
400STORAGE_INVALID_FILE_TYPEtypemust beuploadorsite_asset. -
400STORAGE_MEDIA_TYPE_INVALIDmediamust beimage,video,document, or3d. -
400STORAGE_INVALID_REQUESTThe cursor or filters are invalid, search is too long, or limit is outside 1 through list_max_limit.
Create upload intents
Reserve storage and obtain signed upload requests.
Creates one intent for each item, in request order. Upload each original file body with HTTPS PUT to its returned url, including every returned signed header unchanged. Do not send the Store API bearer token to that URL. The declared byte size must match the uploaded body. A new create request creates new intents; keep their IDs to recover interrupted uploads. After validation, video and 3D preview work starts automatically for Store API uploads. Preview completion is separate from the original becoming ready.
Headers
| Name | Type | Description |
|---|---|---|
Authorization
required
|
string |
Bearer Store API token. |
Body parameters
| Name | Type | Description |
|---|---|---|
file_type
|
string |
Defaults to |
items
required
|
array<object> |
Files to reserve. Each item requires |
Errors
-
401UNAUTHORIZEDAuthorization header missing, malformed, or token invalid/expired.
-
402SUBSCRIPTION_REQUIREDThe store does not have an active or trialing subscription.
-
403STORE_API_SCOPE_REQUIREDToken is valid but lacks the required scope for this call.
-
429RATE_LIMITEDThe token's request allowance is exhausted. Retry after the Retry-After header.
-
400STORAGE_INVALID_REQUESTThe request body or one of its file declarations is invalid.
-
400STORAGE_INVALID_FILE_TYPEfile_typemust beuploadorsite_asset. -
400STORAGE_MAX_FILES_PER_UPLOADThe batch exceeds the maximum files per upload.
-
400STORAGE_FILE_TYPE_NOT_ALLOWEDA filename or declared MIME type is not in the allowed formats returned by
files.limits. -
400STORAGE_FILE_TOO_LARGEA file exceeds its media-type size cap. See
files.limitsfor the per-type cap. -
400STORAGE_ALT_TEXT_TOO_LONGAn item's
alt_textexceeds the maximum returned byfiles.limits. -
400STORAGE_QUOTA_EXCEEDEDThe store's storage quota would be exceeded. Free up space or upload fewer files.
-
400STORAGE_FILE_LIMIT_REACHEDThe batch would pass the plan's media file limit. Delete files or upload fewer; see
files.quotaforused_filesandfile_limit.
Finalize uploads
Check uploaded files and begin validation.
Call after each signed PUT attempt has finished, including an attempt whose response was lost. Send at most max_files_per_upload intent IDs. The library and creating identity must match: app uploads belong to the app installation, and other uploads to their creating user. Finalize returns per-intent results; processing means validation is still running and only ready makes the file available. A missing uploaded body can be rejected. HTTP 200 does not mean every file was accepted: inspect each intent's status and optional error.
Headers
| Name | Type | Description |
|---|---|---|
Authorization
required
|
string |
Bearer Store API token. |
Body parameters
| Name | Type | Description |
|---|---|---|
file_type
|
string |
Use the library selected at creation. Omission defaults to |
intent_ids
required
|
array<string> |
Intent ids returned by the create call. |
Errors
-
401UNAUTHORIZEDAuthorization header missing, malformed, or token invalid/expired.
-
402SUBSCRIPTION_REQUIREDThe store does not have an active or trialing subscription.
-
403STORE_API_SCOPE_REQUIREDToken is valid but lacks the required scope for this call.
-
429RATE_LIMITEDThe token's request allowance is exhausted. Retry after the Retry-After header.
-
400STORAGE_INVALID_REQUESTThe request body or intent list is invalid.
-
400STORAGE_INVALID_FILE_TYPEfile_typemust match the intent namespace. -
404STORAGE_FILE_NOT_FOUNDAn intent is unavailable in this store or belongs to a different creating identity.
Get upload status
Read the result of each upload intent.
Send at most max_files_per_upload intent IDs with the same library and creating identity. Each result is pending, processing, ready, rejected or expired. A ready result contains file. A rejected or expired result contains error, including its code and message, within the successful response envelope. Validation codes can include STORAGE_CONTENT_TYPE_MISMATCH, STORAGE_IMAGE_MEGAPIXELS_TOO_BIG and STORAGE_MALWARE_REJECTED. Inspect every result and stop polling terminal intents. Retain IDs while recovering an interrupted upload.
Headers
| Name | Type | Description |
|---|---|---|
Authorization
required
|
string |
Bearer Store API token. |
Body parameters
| Name | Type | Description |
|---|---|---|
file_type
|
string |
Use the library selected at creation. Omission defaults to |
intent_ids
required
|
array<string> |
Intent ids to inspect. |
Errors
-
401UNAUTHORIZEDAuthorization header missing, malformed, or token invalid/expired.
-
402SUBSCRIPTION_REQUIREDThe store does not have an active or trialing subscription.
-
403STORE_API_SCOPE_REQUIREDToken is valid but lacks the required scope for this call.
-
429RATE_LIMITEDThe token's request allowance is exhausted. Retry after the Retry-After header.
-
400STORAGE_INVALID_REQUESTThe request body or intent list is invalid.
-
400STORAGE_INVALID_FILE_TYPEfile_typemust match the intent namespace. -
404STORAGE_FILE_NOT_FOUNDAn intent is unavailable in this store or belongs to a different creating identity.
Get multiple files
Read metadata for a set of file IDs.
Every requested ID must belong to the store and be readable under the token's library scopes. An unavailable or unreadable file fails the lookup; this endpoint does not return a partial authorized subset or per-file errors. Match results by id rather than depending on their order. Reading both libraries requires both read scopes.
Headers
| Name | Type | Description |
|---|---|---|
Authorization
required
|
string |
Bearer Store API token. |
Body parameters
| Name | Type | Description |
|---|---|---|
file_ids
required
|
array<string> |
File IDs to look up, up to |
Errors
-
401UNAUTHORIZEDAuthorization header missing, malformed, or token invalid/expired.
-
402SUBSCRIPTION_REQUIREDThe store does not have an active or trialing subscription.
-
403STORE_API_SCOPE_REQUIREDToken is valid but lacks the required scope for this call.
-
429RATE_LIMITEDThe token's request allowance is exhausted. Retry after the Retry-After header.
-
400STORAGE_INVALID_REQUESTThe request body is malformed.
-
400STORAGE_FILE_IDS_REQUIREDThe body must include a non-empty
file_idsarray. -
400STORAGE_BULK_LOOKUP_MAX_EXCEEDEDThe batch exceeds the maximum files per lookup.
-
404STORAGE_FILE_NOT_FOUNDOne or more selected files are unavailable in this store or outside the permitted libraries.
Get a file
Read one file and its delivery URLs.
Returns file metadata, preview state and delivery URLs. original_filename is the editable display name; filename is the file name assigned when the file was created. Use display_url for the current source, download_url for download and thumbnail_display_url for a generated thumbnail when present. preview_url falls back to the source URL when no current thumbnail is available, so it is not always an image. An ordinary image can have preview_status=none and still display normally. revision identifies the source revision; preview_revision identifies the source used by the thumbnail. has_original indicates a retained earlier source, not whether the current original exists. Optional fields are omitted when absent. Delivery URLs are opaque: use them as returned.
Path parameters
| Name | Type | Description |
|---|---|---|
id
required
|
uuid |
File id. |
Headers
| Name | Type | Description |
|---|---|---|
Authorization
required
|
string |
Bearer Store API token. |
Errors
-
401UNAUTHORIZEDAuthorization header missing, malformed, or token invalid/expired.
-
402SUBSCRIPTION_REQUIREDThe store does not have an active or trialing subscription.
-
403STORE_API_SCOPE_REQUIREDToken is valid but lacks the required scope for this call.
-
429RATE_LIMITEDThe token's request allowance is exhausted. Retry after the Retry-After header.
-
404STORAGE_FILE_NOT_FOUNDThe file is unavailable in this store or is outside the permitted library.
Request a preview
Request the thumbnail for a video or 3D model.
Starts preview generation for the current source revision, or requests it again after failure. Repeating a request for an already pending or available current preview does not create another job. The response describes the current file state; it does not guarantee that preview generation has finished. Read the file to observe preview_status, and use thumbnail_display_url when present. A failed preview leaves the validated original available.
Path parameters
| Name | Type | Description |
|---|---|---|
id
required
|
uuid |
Video or 3D file id. |
Headers
| Name | Type | Description |
|---|---|---|
Authorization
required
|
string |
Bearer Store API token. |
Errors
-
401UNAUTHORIZEDAuthorization header missing, malformed, or token invalid/expired.
-
402SUBSCRIPTION_REQUIREDThe store does not have an active or trialing subscription.
-
403STORE_API_SCOPE_REQUIREDToken is valid but lacks the required scope for this call.
-
429RATE_LIMITEDThe token's request allowance is exhausted. Retry after the Retry-After header.
-
400STORAGE_MEDIA_TYPE_INVALIDThe file is not an MP4 video, GLB model, or USDZ model.
-
404STORAGE_FILE_NOT_FOUNDThe file is unavailable in this store or is outside the permitted library.
Update file metadata
Change the display filename or alt text.
Updates only supplied fields; omitted fields are unchanged. original_filename and alt_text are trimmed and validated against the limits response. Use an empty alt_text to clear it; a blank filename is rejected. This endpoint does not replace file contents, change the library, convert the format or change existing file references. Renaming leaves delivery URLs unchanged. The consuming theme or content determines how alt text is rendered.
Path parameters
| Name | Type | Description |
|---|---|---|
id
required
|
uuid |
File id. |
Headers
| Name | Type | Description |
|---|---|---|
Authorization
required
|
string |
Bearer Store API token. |
Body parameters
| Name | Type | Description |
|---|---|---|
original_filename
|
string |
New filename. Empty string is rejected. |
alt_text
|
string |
A text alternative for the image. Use an empty string to clear it. |
Errors
-
401UNAUTHORIZEDAuthorization header missing, malformed, or token invalid/expired.
-
402SUBSCRIPTION_REQUIREDThe store does not have an active or trialing subscription.
-
403STORE_API_SCOPE_REQUIREDToken is valid but lacks the required scope for this call.
-
429RATE_LIMITEDThe token's request allowance is exhausted. Retry after the Retry-After header.
-
400STORAGE_INVALID_REQUESTThe request body is malformed.
-
400STORAGE_FILENAME_REQUIREDoriginal_filenamewas provided as an empty string. -
400STORAGE_FILENAME_TOO_LONGoriginal_filenameexceeds the max length. -
400STORAGE_ALT_TEXT_TOO_LONGalt_textexceeds the max length. -
404STORAGE_FILE_NOT_FOUNDThe file is unavailable in this store or is outside the permitted library.
Delete a file
Delete a file and clear its removable references.
A file with no tracked uses is deleted without an impact-confirmation round trip. Optional catalog images, product gallery entries, blog featured images and author avatars, supported file metafields and Online Store image settings can be detached after CONFIRMATION_REQUIRED. Repeat the same request with confirmed: true and the returned token. An attribute-option image blocks deletion; replace it or remove the option first. Manually pasted URLs in HTML and external content are not tracked or rewritten. Deletion commits the library removal, reference cleanup and quota change together; removal of delivered file objects follows asynchronously.
Path parameters
| Name | Type | Description |
|---|---|---|
id
required
|
uuid |
File id. |
Headers
| Name | Type | Description |
|---|---|---|
Authorization
required
|
string |
Bearer Store API token. |
Body parameters
| Name | Type | Description |
|---|---|---|
confirmed
|
boolean |
On a confirmation retry, set this to true and send the returned confirmation_token. Omit it on the first request. |
confirmation_token
|
string |
Token from the CONFIRMATION_REQUIRED response. Omit it on the first request and resend the exact same id selection when using it. |
Errors
-
401UNAUTHORIZEDAuthorization header missing, malformed, or token invalid/expired.
-
402SUBSCRIPTION_REQUIREDThe store does not have an active or trialing subscription.
-
403STORE_API_SCOPE_REQUIREDToken is valid but lacks the required scope for this call.
-
429RATE_LIMITEDThe token's request allowance is exhausted. Retry after the Retry-After header.
-
400STORAGE_INVALID_REQUESTThe request body is malformed.
-
400STORAGE_INVALID_CONFIRMATIONconfirmation_tokenis missing, expired, or mismatched. -
400STORAGE_FILE_DELETE_BLOCKEDThe file is required by another resource and cannot be deleted. Remove that blocking reference first.
-
404STORAGE_FILE_NOT_FOUNDThe file is unavailable in this store or is outside the permitted library.
-
409CONFIRMATION_REQUIREDReturned when removable references exist. Re-send with
confirmed: trueand the response'sconfirmation_tokento detach those references and delete the file.
Delete multiple files
Delete a selected set of files.
Every file must exist, belong to the store and be writable by the token. Both write scopes are needed for a selection spanning both libraries. If removable references exist, CONFIRMATION_REQUIRED returns their impact without deleting the selection. After approval, resend the same IDs with confirmed: true and the returned confirmation_token. Changing the selection requires a new unconfirmed request. A required attribute-option image blocks the entire selection. File-record deletion and removable-reference cleanup commit together; delivered file cleanup follows asynchronously. After a lost response, read the library before making another deletion request.
Headers
| Name | Type | Description |
|---|---|---|
Authorization
required
|
string |
Bearer Store API token. |
Body parameters
| Name | Type | Description |
|---|---|---|
file_ids
required
|
array<string> |
File IDs to delete, up to |
confirmed
|
boolean |
On a confirmation retry, set this to |
confirmation_token
|
string |
Token returned by the first call when confirmation is required. |
Errors
-
401UNAUTHORIZEDAuthorization header missing, malformed, or token invalid/expired.
-
402SUBSCRIPTION_REQUIREDThe store does not have an active or trialing subscription.
-
403STORE_API_SCOPE_REQUIREDToken is valid but lacks the required scope for this call.
-
429RATE_LIMITEDThe token's request allowance is exhausted. Retry after the Retry-After header.
-
400STORAGE_INVALID_REQUESTThe request body is malformed.
-
400STORAGE_FILE_IDS_REQUIREDThe body must include a non-empty
file_idsarray. -
400STORAGE_BULK_DELETE_MAX_EXCEEDEDThe batch exceeds the maximum files per delete.
-
400STORAGE_INVALID_CONFIRMATIONconfirmation_tokenis missing, expired, or mismatched. -
400STORAGE_FILE_DELETE_BLOCKEDAt least one file is required by another resource and cannot be deleted. Remove the blocking reference first.
-
404STORAGE_FILE_NOT_FOUNDOne or more selected files are unavailable in this store or outside the permitted libraries.
-
409CONFIRMATION_REQUIREDReturned when removable references require approval. After approval, resend the same file IDs with
confirmed: trueand the returnedconfirmation_token.
Webhook events#
Subscribe to files/* for Media and site_assets/* for Site Assets using the corresponding read scope. Payloads describe the file and preview state without delivery URLs. Read the file when you need a current URL. Preview completion and failure emit update events; an upload becoming ready does not imply that its preview is ready.
File created
Payload fields
| Field | Type | Description |
|---|---|---|
file.id |
string |
Always present
The stable file id. |
file.type |
string |
Always present
The file namespace: upload or site_asset. |
file.media_type |
string |
Always present
The detected media class: image, video, document, or 3d. |
file.filename |
string |
Always present
The file name assigned when the file was created; use original_filename for its editable display name. |
file.original_filename |
string |
Always present
The merchant-facing filename. |
file.size_bytes |
integer |
Always present
The validated source size in bytes. |
file.mime_type |
string |
Always present
The MIME type detected from the source bytes. |
file.width |
integer |
Selectable in the Payload builder
The source width in pixels when applicable. |
file.height |
integer |
Selectable in the Payload builder
The source height in pixels when applicable. |
file.alt_text |
string |
Selectable in the Payload builder
The file's accessibility description. |
file.revision |
integer |
Always present
The current source revision. |
file.preview_status |
string |
Always present
Preview lifecycle state: none, pending, ready, or failed. |
file.preview_error_code |
string |
Selectable in the Payload builder
|
file.preview_revision |
integer |
Always present
The source revision represented by the current preview; zero means no preview. |
file.preview_requested_at |
string |
Selectable in the Payload builder
Time in the store's time zone, with its offset (RFC 3339), when preview work was most recently requested. |
file.preview_completed_at |
string |
Selectable in the Payload builder
Time in the store's time zone, with its offset (RFC 3339), when the current preview became ready. |
file.created_at |
string |
Always present
Time in the store's time zone, with its offset (RFC 3339), when the file became ready. |
file.updated_at |
string |
Always present
Time in the store's time zone, with its offset (RFC 3339), when file metadata or preview state last changed. |
File updated
Payload fields
| Field | Type | Description |
|---|---|---|
file.id |
string |
Always present
The stable file id. |
file.type |
string |
Always present
The file namespace: upload or site_asset. |
file.media_type |
string |
Always present
The detected media class: image, video, document, or 3d. |
file.filename |
string |
Always present
The file name assigned when the file was created; use original_filename for its editable display name. |
file.original_filename |
string |
Always present
The merchant-facing filename. |
file.size_bytes |
integer |
Always present
The validated source size in bytes. |
file.mime_type |
string |
Always present
The MIME type detected from the source bytes. |
file.width |
integer |
Selectable in the Payload builder
The source width in pixels when applicable. |
file.height |
integer |
Selectable in the Payload builder
The source height in pixels when applicable. |
file.alt_text |
string |
Selectable in the Payload builder
The file's accessibility description. |
file.revision |
integer |
Always present
The current source revision. |
file.preview_status |
string |
Always present
Preview lifecycle state: none, pending, ready, or failed. |
file.preview_error_code |
string |
Selectable in the Payload builder
|
file.preview_revision |
integer |
Always present
The source revision represented by the current preview; zero means no preview. |
file.preview_requested_at |
string |
Selectable in the Payload builder
Time in the store's time zone, with its offset (RFC 3339), when preview work was most recently requested. |
file.preview_completed_at |
string |
Selectable in the Payload builder
Time in the store's time zone, with its offset (RFC 3339), when the current preview became ready. |
file.created_at |
string |
Always present
Time in the store's time zone, with its offset (RFC 3339), when the file became ready. |
file.updated_at |
string |
Always present
Time in the store's time zone, with its offset (RFC 3339), when file metadata or preview state last changed. |
changed_fields |
array |
Always present
The file fields changed by this event. |
File deleted
Payload fields
| Field | Type | Description |
|---|---|---|
file.id |
string |
Always present
The stable file id. |
file.type |
string |
Always present
The file namespace: upload or site_asset. |
file.media_type |
string |
Always present
The detected media class: image, video, document, or 3d. |
file.filename |
string |
Always present
The file name assigned when the file was created; use original_filename for its editable display name. |
file.original_filename |
string |
Always present
The merchant-facing filename. |
file.size_bytes |
integer |
Always present
The validated source size in bytes. |
file.mime_type |
string |
Always present
The MIME type detected from the source bytes. |
file.width |
integer |
Selectable in the Payload builder
The source width in pixels when applicable. |
file.height |
integer |
Selectable in the Payload builder
The source height in pixels when applicable. |
file.alt_text |
string |
Selectable in the Payload builder
The file's accessibility description. |
file.revision |
integer |
Always present
The current source revision. |
file.preview_status |
string |
Always present
Preview lifecycle state: none, pending, ready, or failed. |
file.preview_error_code |
string |
Selectable in the Payload builder
|
file.preview_revision |
integer |
Always present
The source revision represented by the current preview; zero means no preview. |
file.preview_requested_at |
string |
Selectable in the Payload builder
Time in the store's time zone, with its offset (RFC 3339), when preview work was most recently requested. |
file.preview_completed_at |
string |
Selectable in the Payload builder
Time in the store's time zone, with its offset (RFC 3339), when the current preview became ready. |
file.created_at |
string |
Always present
Time in the store's time zone, with its offset (RFC 3339), when the file became ready. |
file.updated_at |
string |
Always present
Time in the store's time zone, with its offset (RFC 3339), when file metadata or preview state last changed. |
deleted_at |
string |
Always present
Time in the store's time zone, with its offset (RFC 3339), when the file was deleted. |
Site asset created
Payload fields
| Field | Type | Description |
|---|---|---|
file.id |
string |
Always present
The stable file id. |
file.type |
string |
Always present
The file namespace: upload or site_asset. |
file.media_type |
string |
Always present
The detected media class: image, video, document, or 3d. |
file.filename |
string |
Always present
The file name assigned when the file was created; use original_filename for its editable display name. |
file.original_filename |
string |
Always present
The merchant-facing filename. |
file.size_bytes |
integer |
Always present
The validated source size in bytes. |
file.mime_type |
string |
Always present
The MIME type detected from the source bytes. |
file.width |
integer |
Selectable in the Payload builder
The source width in pixels when applicable. |
file.height |
integer |
Selectable in the Payload builder
The source height in pixels when applicable. |
file.alt_text |
string |
Selectable in the Payload builder
The file's accessibility description. |
file.revision |
integer |
Always present
The current source revision. |
file.preview_status |
string |
Always present
Preview lifecycle state: none, pending, ready, or failed. |
file.preview_error_code |
string |
Selectable in the Payload builder
|
file.preview_revision |
integer |
Always present
The source revision represented by the current preview; zero means no preview. |
file.preview_requested_at |
string |
Selectable in the Payload builder
Time in the store's time zone, with its offset (RFC 3339), when preview work was most recently requested. |
file.preview_completed_at |
string |
Selectable in the Payload builder
Time in the store's time zone, with its offset (RFC 3339), when the current preview became ready. |
file.created_at |
string |
Always present
Time in the store's time zone, with its offset (RFC 3339), when the file became ready. |
file.updated_at |
string |
Always present
Time in the store's time zone, with its offset (RFC 3339), when file metadata or preview state last changed. |
Site asset updated
Payload fields
| Field | Type | Description |
|---|---|---|
file.id |
string |
Always present
The stable file id. |
file.type |
string |
Always present
The file namespace: upload or site_asset. |
file.media_type |
string |
Always present
The detected media class: image, video, document, or 3d. |
file.filename |
string |
Always present
The file name assigned when the file was created; use original_filename for its editable display name. |
file.original_filename |
string |
Always present
The merchant-facing filename. |
file.size_bytes |
integer |
Always present
The validated source size in bytes. |
file.mime_type |
string |
Always present
The MIME type detected from the source bytes. |
file.width |
integer |
Selectable in the Payload builder
The source width in pixels when applicable. |
file.height |
integer |
Selectable in the Payload builder
The source height in pixels when applicable. |
file.alt_text |
string |
Selectable in the Payload builder
The file's accessibility description. |
file.revision |
integer |
Always present
The current source revision. |
file.preview_status |
string |
Always present
Preview lifecycle state: none, pending, ready, or failed. |
file.preview_error_code |
string |
Selectable in the Payload builder
|
file.preview_revision |
integer |
Always present
The source revision represented by the current preview; zero means no preview. |
file.preview_requested_at |
string |
Selectable in the Payload builder
Time in the store's time zone, with its offset (RFC 3339), when preview work was most recently requested. |
file.preview_completed_at |
string |
Selectable in the Payload builder
Time in the store's time zone, with its offset (RFC 3339), when the current preview became ready. |
file.created_at |
string |
Always present
Time in the store's time zone, with its offset (RFC 3339), when the file became ready. |
file.updated_at |
string |
Always present
Time in the store's time zone, with its offset (RFC 3339), when file metadata or preview state last changed. |
changed_fields |
array |
Always present
The file fields changed by this event. |
Site asset deleted
Payload fields
| Field | Type | Description |
|---|---|---|
file.id |
string |
Always present
The stable file id. |
file.type |
string |
Always present
The file namespace: upload or site_asset. |
file.media_type |
string |
Always present
The detected media class: image, video, document, or 3d. |
file.filename |
string |
Always present
The file name assigned when the file was created; use original_filename for its editable display name. |
file.original_filename |
string |
Always present
The merchant-facing filename. |
file.size_bytes |
integer |
Always present
The validated source size in bytes. |
file.mime_type |
string |
Always present
The MIME type detected from the source bytes. |
file.width |
integer |
Selectable in the Payload builder
The source width in pixels when applicable. |
file.height |
integer |
Selectable in the Payload builder
The source height in pixels when applicable. |
file.alt_text |
string |
Selectable in the Payload builder
The file's accessibility description. |
file.revision |
integer |
Always present
The current source revision. |
file.preview_status |
string |
Always present
Preview lifecycle state: none, pending, ready, or failed. |
file.preview_error_code |
string |
Selectable in the Payload builder
|
file.preview_revision |
integer |
Always present
The source revision represented by the current preview; zero means no preview. |
file.preview_requested_at |
string |
Selectable in the Payload builder
Time in the store's time zone, with its offset (RFC 3339), when preview work was most recently requested. |
file.preview_completed_at |
string |
Selectable in the Payload builder
Time in the store's time zone, with its offset (RFC 3339), when the current preview became ready. |
file.created_at |
string |
Always present
Time in the store's time zone, with its offset (RFC 3339), when the file became ready. |
file.updated_at |
string |
Always present
Time in the store's time zone, with its offset (RFC 3339), when file metadata or preview state last changed. |
deleted_at |
string |
Always present
Time in the store's time zone, with its offset (RFC 3339), when the file was deleted. |
Complete or recover an upload#
Read GET /files/limits, create upload intents, PUT each file body to its signed URL, then finalize the completed PUT attempts. Include the returned signed headers and do not send the Store API token to the signed URL. Keep the intent IDs and the creating identity until every result is terminal.
If a finalize response is lost, read upload status with the same intent IDs. pending may still need finalize; processing is still being validated. ready contains the file. rejected and expired contain an error for that intent. A successful HTTP response can include rejected files. Only start a replacement upload after confirming that the earlier intent cannot complete.
Use video and 3D previews#
Store API video and 3D uploads start preview generation after validation. POST /files/{id}/preview can request it again after failure and requires the write scope for that library. Observe preview_status through the file read or update webhook. Use thumbnail_display_url for an available current thumbnail. preview_url falls back to the original source and can therefore be a video or model URL. A failed preview does not remove the original.
Confirm deletion impact#
Show the impact returned by CONFIRMATION_REQUIRED. After approval, resend the same selection with confirmed: true and its confirmation_token. Required attribute-option images still block deletion. Manually pasted links in HTML or external content are not tracked and are not rewritten. Library removal and reference cleanup are committed together; delivered file cleanup may finish afterward.