Publish Theme

Publish a specific theme using its unique identifier.

🔒

Requires write_themes access scope. More access scope

The Publish Theme API sets a theme as the currently active or published theme for the store. Only one theme can be active at any given time, and using this API will replace the current active theme with the specified theme.

This API is especially useful for:

  1. Programmatically activating a newly created or modified theme.
  2. Automating the theme publishing process for store updates.

Request Parameters

Public Request Parameters

📘

Path Parameters

ParameterTypeRequiredExampleDescription
theme_idstringYes1500021b-88ed-4750-bbc5-97ec98351dc0Theme's unique identifier.

Response Explanation

Public Response Parameters

📘

Successful Response

ParameterTypeExampleDescription
codestring"success"Status code of the response
messagestring"OK"Descriptive message of the response
data.themesarray[object][{...}]Array of theme objects

Theme Object Parameters

ParameterTypeExampleDescription
idstring"theme_123"Theme's unique identifier
namestring"Summer Collection"Theme name
merchant_theme_idstring"mth_456"Merchant theme ID
localestring"en-US"Theme locale
presetstring"modern"Theme style preset
publishedstring"1"Whether theme is published (0 or 1)
statusstring"active"Theme status
updated_atstring"2025-01-01T00:00:00Z"Last update timestamp
publish_timestring"2025-01-01T00:00:00Z"Publish timestamp
theme_save_timestring"2025-01-01T00:00:00Z"Last manual save time
theme_version_idstring"tvi_789"Theme version ID
revoke_publish_idstring"tvi_789"ID used to revoke publishing, if applicable.

Error Response

FieldTypeExampleDescription
codestringInvalidParameterError http message
messagestring``Error message

API Structure Overview

Language
Credentials
Header
URL
Click Try It! to start a request and see the response here!