Admin API
Themes
- GETThe store theme as the editor sees it: templates, widget library, settings and code
- PATCHChange the draft: files (null puts the platform file back), templates, settings or code
- POSTThrow away the draft and go back to what buyers see
- GETEvery file of the draft theme and its custom code, to keep or move to another store
- GETOne theme file of the draft, with the platform version when there is one
- POSTA short-lived token that shows the draft theme on the store (add ?orb_preview=<token>)
- POSTPublish the draft: buyers see it from now on
The store theme as the editor sees it: templates, widget library, settings and code
GET/admin/2026-11/theme
Response 200
idID (thm_...) or nullrequirednamestringrequiredversionintegerrequiredGoes up by one on every publish.
published_attimestamp or nullrequiredupdated_attimestamp or nullrequiredhas_unpublished_changesbooleanrequiredfilesarray of objectrequiredEvery file of the draft theme.
files[].pathstringrequiredfiles[].sizeintegerrequiredfiles[].customizedbooleanrequiredfiles[].addedbooleanrequiredcodeobjectrequiredcode.cssstringrequiredExtra CSS for every store page.
Up to 200000 characters
code.head_htmlstringrequiredHTML added at the end of <head> on store pages.
Up to 50000 characters
code.body_htmlstringrequiredHTML added at the end of <body> on store pages.
Up to 50000 characters
code.allow_externalbooleanrequiredLet custom code run inline scripts and load scripts, styles, fonts and frames from other sites.
Default false
templatesobjectrequiredThe draft of each editable template.
sectionsarray of objectrequiredSection types the draft theme has: the widget library.
sections[].typestringrequiredsections[].namestringrequiredsections[].categorystringrequiredsections[].descriptionstring or nullrequiredsections[].mainbooleanrequiredThe page content itself: always on its template, never removed.
sections[].templatesarray of string or nullrequiredTemplates that may use it; null for all.
sections[].settingsarray of objectrequiredsections[].settings[].typestringrequiredsections[].settings[].idstringrequiredsections[].settings[].labelstringrequiredsections[].settings[].defaultstringsections[].settings[].optionsarray of objectsections[].settings[].options[].valuestringrequiredsections[].settings[].options[].labelstringrequiredsections[].settings[].minnumbersections[].settings[].maxnumbersections[].settings[].stepnumbersections[].settings[].infostringsections[].settings[].placeholderstringsections[].blocksarray of objectrequiredsections[].blocks[].typestringrequiredsections[].blocks[].namestringrequiredsections[].blocks[].limitnumber or nullrequiredsections[].blocks[].settingsarray of objectrequiredsections[].blocks[].settings[].typestringrequiredsections[].blocks[].settings[].idstringrequiredsections[].blocks[].settings[].labelstringrequiredsections[].blocks[].settings[].defaultstringsections[].blocks[].settings[].optionsarray of objectsections[].blocks[].settings[].options[].valuestringrequiredsections[].blocks[].settings[].options[].labelstringrequiredsections[].blocks[].settings[].minnumbersections[].blocks[].settings[].maxnumbersections[].blocks[].settings[].stepnumbersections[].blocks[].settings[].infostringsections[].blocks[].settings[].placeholderstringsections[].max_blocksintegerrequiredsections[].presetsarray of objectrequiredsections[].presets[].namestringrequiredsections[].presets[].settingsobjectrequiredsections[].presets[].blocksarray of objectrequiredsections[].presets[].blocks[].typestringrequiredsections[].presets[].blocks[].settingsobjectrequiredsettings_schemaarray of objectrequiredsettings_schema[].namestringrequiredsettings_schema[].settingsarray of objectrequiredsettings_schema[].settings[].typestringrequiredsettings_schema[].settings[].idstringrequiredsettings_schema[].settings[].labelstringrequiredsettings_schema[].settings[].defaultstringsettings_schema[].settings[].optionsarray of objectsettings_schema[].settings[].options[].valuestringrequiredsettings_schema[].settings[].options[].labelstringrequiredsettings_schema[].settings[].minnumbersettings_schema[].settings[].maxnumbersettings_schema[].settings[].stepnumbersettings_schema[].settings[].infostringsettings_schema[].settings[].placeholderstringsettingsobjectrequiredTheme setting values of the draft.
Errors
| 401 | authentication_required | Send a valid access token or session. |
| 403 | missing_scope | The app token does not have the scope this endpoint needs. |
| 429 | rate_limited | Too many requests. Wait for the time in RateLimit-Reset. |
| 500 | internal_error | Something went wrong on our side. Quote the trace_id to support. |
curl https://api.storelyne.com/admin/2026-11/theme \
-H "Authorization: Bearer pat_live_..."const res = await fetch('https://api.storelyne.com/admin/2026-11/theme', {
method: 'GET',
headers: {
'Authorization': `Bearer ${process.env.STORELYNE_TOKEN}`,
},
});
const data = await res.json();{
"id": "thm_01JCG8ZQ5S7T0V4X8K2M3N6P9R",
"name": "Festive saree",
"version": 1,
"published_at": "2026-11-04T10:00:00.000Z",
"updated_at": "2026-11-04T10:00:00.000Z",
"has_unpublished_changes": false,
"files": [
{
"path": "string",
"size": 1,
"customized": false,
"added": false
}
],
"code": {
"css": "",
"head_html": "",
"body_html": "",
"allow_external": false
},
"templates": {},
"sections": [
{
"type": "string",
"name": "Festive saree",
"category": "string",
"description": "Hand block printed cotton.",
"main": false,
"templates": [
"string"
],
"settings": [
{
"type": "string",
"id": "string",
"label": "string",
"default": "string",
"options": [],
"min": 1,
"max": 1,
"step": 1,
"info": "string",
"placeholder": "string"
}
],
"blocks": [
{
"type": "string",
"name": "Festive saree",
"limit": 1,
"settings": []
}
],
"max_blocks": 1,
"presets": [
{
"name": "Festive saree",
"settings": {},
"blocks": []
}
]
}
],
"settings_schema": [
{
"name": "Festive saree",
"settings": [
{
"type": "string",
"id": "string",
"label": "string",
"default": "string",
"options": [],
"min": 1,
"max": 1,
"step": 1,
"info": "string",
"placeholder": "string"
}
]
}
],
"settings": {}
}Change the draft: files (null puts the platform file back), templates, settings or code
PATCH/admin/2026-11/theme
The whole draft is checked as rendering would meet it (paths, sizes, Liquid syntax, section schemas, templates). Nothing is saved when a check fails; the error names the file.
Headers
X-CSRF-TokenstringRequired with a seller session cookie: the value of the orb_csrf cookie.
Request body
filesobjectPath to new source; null resets the file to the platform version or removes an added file.
templatesobjectShortcut for templates/<name>.json.
settingsobjectTheme setting values; saved in config/settings_data.json.
codeobjectcode.cssstringExtra CSS for every store page.
Up to 200000 characters
code.head_htmlstringHTML added at the end of <head> on store pages.
Up to 50000 characters
code.body_htmlstringHTML added at the end of <body> on store pages.
Up to 50000 characters
code.allow_externalbooleanLet custom code run inline scripts and load scripts, styles, fonts and frames from other sites.
Default false
resetbooleanStart over from the platform theme, dropping every change in the draft.
Response 200
idID (thm_...) or nullrequirednamestringrequiredversionintegerrequiredGoes up by one on every publish.
published_attimestamp or nullrequiredupdated_attimestamp or nullrequiredhas_unpublished_changesbooleanrequiredfilesarray of objectrequiredEvery file of the draft theme.
files[].pathstringrequiredfiles[].sizeintegerrequiredfiles[].customizedbooleanrequiredfiles[].addedbooleanrequiredcodeobjectrequiredcode.cssstringrequiredExtra CSS for every store page.
Up to 200000 characters
code.head_htmlstringrequiredHTML added at the end of <head> on store pages.
Up to 50000 characters
code.body_htmlstringrequiredHTML added at the end of <body> on store pages.
Up to 50000 characters
code.allow_externalbooleanrequiredLet custom code run inline scripts and load scripts, styles, fonts and frames from other sites.
Default false
templatesobjectrequiredThe draft of each editable template.
sectionsarray of objectrequiredSection types the draft theme has: the widget library.
sections[].typestringrequiredsections[].namestringrequiredsections[].categorystringrequiredsections[].descriptionstring or nullrequiredsections[].mainbooleanrequiredThe page content itself: always on its template, never removed.
sections[].templatesarray of string or nullrequiredTemplates that may use it; null for all.
sections[].settingsarray of objectrequiredsections[].settings[].typestringrequiredsections[].settings[].idstringrequiredsections[].settings[].labelstringrequiredsections[].settings[].defaultstringsections[].settings[].optionsarray of objectsections[].settings[].options[].valuestringrequiredsections[].settings[].options[].labelstringrequiredsections[].settings[].minnumbersections[].settings[].maxnumbersections[].settings[].stepnumbersections[].settings[].infostringsections[].settings[].placeholderstringsections[].blocksarray of objectrequiredsections[].blocks[].typestringrequiredsections[].blocks[].namestringrequiredsections[].blocks[].limitnumber or nullrequiredsections[].blocks[].settingsarray of objectrequiredsections[].blocks[].settings[].typestringrequiredsections[].blocks[].settings[].idstringrequiredsections[].blocks[].settings[].labelstringrequiredsections[].blocks[].settings[].defaultstringsections[].blocks[].settings[].optionsarray of objectsections[].blocks[].settings[].options[].valuestringrequiredsections[].blocks[].settings[].options[].labelstringrequiredsections[].blocks[].settings[].minnumbersections[].blocks[].settings[].maxnumbersections[].blocks[].settings[].stepnumbersections[].blocks[].settings[].infostringsections[].blocks[].settings[].placeholderstringsections[].max_blocksintegerrequiredsections[].presetsarray of objectrequiredsections[].presets[].namestringrequiredsections[].presets[].settingsobjectrequiredsections[].presets[].blocksarray of objectrequiredsections[].presets[].blocks[].typestringrequiredsections[].presets[].blocks[].settingsobjectrequiredsettings_schemaarray of objectrequiredsettings_schema[].namestringrequiredsettings_schema[].settingsarray of objectrequiredsettings_schema[].settings[].typestringrequiredsettings_schema[].settings[].idstringrequiredsettings_schema[].settings[].labelstringrequiredsettings_schema[].settings[].defaultstringsettings_schema[].settings[].optionsarray of objectsettings_schema[].settings[].options[].valuestringrequiredsettings_schema[].settings[].options[].labelstringrequiredsettings_schema[].settings[].minnumbersettings_schema[].settings[].maxnumbersettings_schema[].settings[].stepnumbersettings_schema[].settings[].infostringsettings_schema[].settings[].placeholderstringsettingsobjectrequiredTheme setting values of the draft.
Errors
| 400 | validation_failed | A field in the request is missing or invalid. See param. |
| 401 | authentication_required | Send a valid access token or session. |
| 403 | missing_scope | The app token does not have the scope this endpoint needs. |
| 429 | rate_limited | Too many requests. Wait for the time in RateLimit-Reset. |
| 500 | internal_error | Something went wrong on our side. Quote the trace_id to support. |
curl -X PATCH https://api.storelyne.com/admin/2026-11/theme \
-H "Authorization: Bearer pat_live_..." \
-H "Content-Type: application/json" \
-d '{
"files": {},
"templates": {},
"settings": {}
}'const res = await fetch('https://api.storelyne.com/admin/2026-11/theme', {
method: 'PATCH',
headers: {
'Authorization': `Bearer ${process.env.STORELYNE_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"files": {},
"templates": {},
"settings": {}
}),
});
const data = await res.json();{
"id": "thm_01JCG8ZQ5S7T0V4X8K2M3N6P9R",
"name": "Festive saree",
"version": 1,
"published_at": "2026-11-04T10:00:00.000Z",
"updated_at": "2026-11-04T10:00:00.000Z",
"has_unpublished_changes": false,
"files": [
{
"path": "string",
"size": 1,
"customized": false,
"added": false
}
],
"code": {
"css": "",
"head_html": "",
"body_html": "",
"allow_external": false
},
"templates": {},
"sections": [
{
"type": "string",
"name": "Festive saree",
"category": "string",
"description": "Hand block printed cotton.",
"main": false,
"templates": [
"string"
],
"settings": [
{
"type": "string",
"id": "string",
"label": "string",
"default": "string",
"options": [],
"min": 1,
"max": 1,
"step": 1,
"info": "string",
"placeholder": "string"
}
],
"blocks": [
{
"type": "string",
"name": "Festive saree",
"limit": 1,
"settings": []
}
],
"max_blocks": 1,
"presets": [
{
"name": "Festive saree",
"settings": {},
"blocks": []
}
]
}
],
"settings_schema": [
{
"name": "Festive saree",
"settings": [
{
"type": "string",
"id": "string",
"label": "string",
"default": "string",
"options": [],
"min": 1,
"max": 1,
"step": 1,
"info": "string",
"placeholder": "string"
}
]
}
],
"settings": {}
}Throw away the draft and go back to what buyers see
POST/admin/2026-11/theme/discard
scope write_themesIdempotency-Key required
Headers
Idempotency-KeystringrequiredUnique key for this request. Retries with the same key return the first response.
At least 1 characters · Up to 255 characters
X-CSRF-TokenstringRequired with a seller session cookie: the value of the orb_csrf cookie.
Response 200
idID (thm_...) or nullrequirednamestringrequiredversionintegerrequiredGoes up by one on every publish.
published_attimestamp or nullrequiredupdated_attimestamp or nullrequiredhas_unpublished_changesbooleanrequiredfilesarray of objectrequiredEvery file of the draft theme.
files[].pathstringrequiredfiles[].sizeintegerrequiredfiles[].customizedbooleanrequiredfiles[].addedbooleanrequiredcodeobjectrequiredcode.cssstringrequiredExtra CSS for every store page.
Up to 200000 characters
code.head_htmlstringrequiredHTML added at the end of <head> on store pages.
Up to 50000 characters
code.body_htmlstringrequiredHTML added at the end of <body> on store pages.
Up to 50000 characters
code.allow_externalbooleanrequiredLet custom code run inline scripts and load scripts, styles, fonts and frames from other sites.
Default false
templatesobjectrequiredThe draft of each editable template.
sectionsarray of objectrequiredSection types the draft theme has: the widget library.
sections[].typestringrequiredsections[].namestringrequiredsections[].categorystringrequiredsections[].descriptionstring or nullrequiredsections[].mainbooleanrequiredThe page content itself: always on its template, never removed.
sections[].templatesarray of string or nullrequiredTemplates that may use it; null for all.
sections[].settingsarray of objectrequiredsections[].settings[].typestringrequiredsections[].settings[].idstringrequiredsections[].settings[].labelstringrequiredsections[].settings[].defaultstringsections[].settings[].optionsarray of objectsections[].settings[].options[].valuestringrequiredsections[].settings[].options[].labelstringrequiredsections[].settings[].minnumbersections[].settings[].maxnumbersections[].settings[].stepnumbersections[].settings[].infostringsections[].settings[].placeholderstringsections[].blocksarray of objectrequiredsections[].blocks[].typestringrequiredsections[].blocks[].namestringrequiredsections[].blocks[].limitnumber or nullrequiredsections[].blocks[].settingsarray of objectrequiredsections[].blocks[].settings[].typestringrequiredsections[].blocks[].settings[].idstringrequiredsections[].blocks[].settings[].labelstringrequiredsections[].blocks[].settings[].defaultstringsections[].blocks[].settings[].optionsarray of objectsections[].blocks[].settings[].options[].valuestringrequiredsections[].blocks[].settings[].options[].labelstringrequiredsections[].blocks[].settings[].minnumbersections[].blocks[].settings[].maxnumbersections[].blocks[].settings[].stepnumbersections[].blocks[].settings[].infostringsections[].blocks[].settings[].placeholderstringsections[].max_blocksintegerrequiredsections[].presetsarray of objectrequiredsections[].presets[].namestringrequiredsections[].presets[].settingsobjectrequiredsections[].presets[].blocksarray of objectrequiredsections[].presets[].blocks[].typestringrequiredsections[].presets[].blocks[].settingsobjectrequiredsettings_schemaarray of objectrequiredsettings_schema[].namestringrequiredsettings_schema[].settingsarray of objectrequiredsettings_schema[].settings[].typestringrequiredsettings_schema[].settings[].idstringrequiredsettings_schema[].settings[].labelstringrequiredsettings_schema[].settings[].defaultstringsettings_schema[].settings[].optionsarray of objectsettings_schema[].settings[].options[].valuestringrequiredsettings_schema[].settings[].options[].labelstringrequiredsettings_schema[].settings[].minnumbersettings_schema[].settings[].maxnumbersettings_schema[].settings[].stepnumbersettings_schema[].settings[].infostringsettings_schema[].settings[].placeholderstringsettingsobjectrequiredTheme setting values of the draft.
Errors
| 400 | idempotency_key_required | Every POST needs an Idempotency-Key header. |
| 401 | authentication_required | Send a valid access token or session. |
| 403 | missing_scope | The app token does not have the scope this endpoint needs. |
| 409 | idempotency_in_progress | A request with this Idempotency-Key is still running. |
| 422 | idempotency_key_reused | This Idempotency-Key was used with a different request. |
| 429 | rate_limited | Too many requests. Wait for the time in RateLimit-Reset. |
| 500 | internal_error | Something went wrong on our side. Quote the trace_id to support. |
curl -X POST https://api.storelyne.com/admin/2026-11/theme/discard \
-H "Authorization: Bearer pat_live_..." \
-H "Idempotency-Key: $(uuidgen)"const res = await fetch('https://api.storelyne.com/admin/2026-11/theme/discard', {
method: 'POST',
headers: {
'Authorization': `Bearer ${process.env.STORELYNE_TOKEN}`,
'Idempotency-Key': crypto.randomUUID(),
},
});
const data = await res.json();{
"id": "thm_01JCG8ZQ5S7T0V4X8K2M3N6P9R",
"name": "Festive saree",
"version": 1,
"published_at": "2026-11-04T10:00:00.000Z",
"updated_at": "2026-11-04T10:00:00.000Z",
"has_unpublished_changes": false,
"files": [
{
"path": "string",
"size": 1,
"customized": false,
"added": false
}
],
"code": {
"css": "",
"head_html": "",
"body_html": "",
"allow_external": false
},
"templates": {},
"sections": [
{
"type": "string",
"name": "Festive saree",
"category": "string",
"description": "Hand block printed cotton.",
"main": false,
"templates": [
"string"
],
"settings": [
{
"type": "string",
"id": "string",
"label": "string",
"default": "string",
"options": [],
"min": 1,
"max": 1,
"step": 1,
"info": "string",
"placeholder": "string"
}
],
"blocks": [
{
"type": "string",
"name": "Festive saree",
"limit": 1,
"settings": []
}
],
"max_blocks": 1,
"presets": [
{
"name": "Festive saree",
"settings": {},
"blocks": []
}
]
}
],
"settings_schema": [
{
"name": "Festive saree",
"settings": [
{
"type": "string",
"id": "string",
"label": "string",
"default": "string",
"options": [],
"min": 1,
"max": 1,
"step": 1,
"info": "string",
"placeholder": "string"
}
]
}
],
"settings": {}
}Every file of the draft theme and its custom code, to keep or move to another store
GET/admin/2026-11/theme/export
Response 200
format"storelyne-theme"requiredformat_version"1"requirednamestringrequiredexported_attimestamprequiredfilesobjectrequiredcodeobjectrequiredcode.cssstringrequiredExtra CSS for every store page.
Up to 200000 characters
code.head_htmlstringrequiredHTML added at the end of <head> on store pages.
Up to 50000 characters
code.body_htmlstringrequiredHTML added at the end of <body> on store pages.
Up to 50000 characters
code.allow_externalbooleanrequiredLet custom code run inline scripts and load scripts, styles, fonts and frames from other sites.
Default false
Errors
| 401 | authentication_required | Send a valid access token or session. |
| 403 | missing_scope | The app token does not have the scope this endpoint needs. |
| 429 | rate_limited | Too many requests. Wait for the time in RateLimit-Reset. |
| 500 | internal_error | Something went wrong on our side. Quote the trace_id to support. |
curl https://api.storelyne.com/admin/2026-11/theme/export \
-H "Authorization: Bearer pat_live_..."const res = await fetch('https://api.storelyne.com/admin/2026-11/theme/export', {
method: 'GET',
headers: {
'Authorization': `Bearer ${process.env.STORELYNE_TOKEN}`,
},
});
const data = await res.json();{
"format": "storelyne-theme",
"format_version": 1,
"name": "Festive saree",
"exported_at": "2026-11-04T10:00:00.000Z",
"files": {},
"code": {
"css": "",
"head_html": "",
"body_html": "",
"allow_external": false
}
}One theme file of the draft, with the platform version when there is one
GET/admin/2026-11/theme/file
Query parameters
pathstringrequired
Response 200
pathstringrequiredsourcestringrequireddefault_sourcestring or nullrequired
Errors
| 400 | validation_failed | A field in the request is missing or invalid. See param. |
| 401 | authentication_required | Send a valid access token or session. |
| 403 | missing_scope | The app token does not have the scope this endpoint needs. |
| 404 | resource_not_found | The object does not exist or belongs to another store. |
| 429 | rate_limited | Too many requests. Wait for the time in RateLimit-Reset. |
| 500 | internal_error | Something went wrong on our side. Quote the trace_id to support. |
curl https://api.storelyne.com/admin/2026-11/theme/file \
-H "Authorization: Bearer pat_live_..."const res = await fetch('https://api.storelyne.com/admin/2026-11/theme/file', {
method: 'GET',
headers: {
'Authorization': `Bearer ${process.env.STORELYNE_TOKEN}`,
},
});
const data = await res.json();{
"path": "string",
"source": "string",
"default_source": "string"
}A short-lived token that shows the draft theme on the store (add ?orb_preview=<token>)
POST/admin/2026-11/theme/preview
scope read_themesIdempotency-Key required
Headers
Idempotency-KeystringrequiredUnique key for this request. Retries with the same key return the first response.
At least 1 characters · Up to 255 characters
X-CSRF-TokenstringRequired with a seller session cookie: the value of the orb_csrf cookie.
Response 201
tokenstringrequiredexpires_attimestamprequired
Errors
| 400 | idempotency_key_required | Every POST needs an Idempotency-Key header. |
| 401 | authentication_required | Send a valid access token or session. |
| 403 | missing_scope | The app token does not have the scope this endpoint needs. |
| 409 | idempotency_in_progress | A request with this Idempotency-Key is still running. |
| 422 | idempotency_key_reused | This Idempotency-Key was used with a different request. |
| 429 | rate_limited | Too many requests. Wait for the time in RateLimit-Reset. |
| 500 | internal_error | Something went wrong on our side. Quote the trace_id to support. |
curl -X POST https://api.storelyne.com/admin/2026-11/theme/preview \
-H "Authorization: Bearer pat_live_..." \
-H "Idempotency-Key: $(uuidgen)"const res = await fetch('https://api.storelyne.com/admin/2026-11/theme/preview', {
method: 'POST',
headers: {
'Authorization': `Bearer ${process.env.STORELYNE_TOKEN}`,
'Idempotency-Key': crypto.randomUUID(),
},
});
const data = await res.json();{
"token": "string",
"expires_at": "2026-11-04T10:00:00.000Z"
}Publish the draft: buyers see it from now on
POST/admin/2026-11/theme/publish
scope write_themesIdempotency-Key required
Headers
Idempotency-KeystringrequiredUnique key for this request. Retries with the same key return the first response.
At least 1 characters · Up to 255 characters
X-CSRF-TokenstringRequired with a seller session cookie: the value of the orb_csrf cookie.
Response 200
idID (thm_...) or nullrequirednamestringrequiredversionintegerrequiredGoes up by one on every publish.
published_attimestamp or nullrequiredupdated_attimestamp or nullrequiredhas_unpublished_changesbooleanrequiredfilesarray of objectrequiredEvery file of the draft theme.
files[].pathstringrequiredfiles[].sizeintegerrequiredfiles[].customizedbooleanrequiredfiles[].addedbooleanrequiredcodeobjectrequiredcode.cssstringrequiredExtra CSS for every store page.
Up to 200000 characters
code.head_htmlstringrequiredHTML added at the end of <head> on store pages.
Up to 50000 characters
code.body_htmlstringrequiredHTML added at the end of <body> on store pages.
Up to 50000 characters
code.allow_externalbooleanrequiredLet custom code run inline scripts and load scripts, styles, fonts and frames from other sites.
Default false
templatesobjectrequiredThe draft of each editable template.
sectionsarray of objectrequiredSection types the draft theme has: the widget library.
sections[].typestringrequiredsections[].namestringrequiredsections[].categorystringrequiredsections[].descriptionstring or nullrequiredsections[].mainbooleanrequiredThe page content itself: always on its template, never removed.
sections[].templatesarray of string or nullrequiredTemplates that may use it; null for all.
sections[].settingsarray of objectrequiredsections[].settings[].typestringrequiredsections[].settings[].idstringrequiredsections[].settings[].labelstringrequiredsections[].settings[].defaultstringsections[].settings[].optionsarray of objectsections[].settings[].options[].valuestringrequiredsections[].settings[].options[].labelstringrequiredsections[].settings[].minnumbersections[].settings[].maxnumbersections[].settings[].stepnumbersections[].settings[].infostringsections[].settings[].placeholderstringsections[].blocksarray of objectrequiredsections[].blocks[].typestringrequiredsections[].blocks[].namestringrequiredsections[].blocks[].limitnumber or nullrequiredsections[].blocks[].settingsarray of objectrequiredsections[].blocks[].settings[].typestringrequiredsections[].blocks[].settings[].idstringrequiredsections[].blocks[].settings[].labelstringrequiredsections[].blocks[].settings[].defaultstringsections[].blocks[].settings[].optionsarray of objectsections[].blocks[].settings[].options[].valuestringrequiredsections[].blocks[].settings[].options[].labelstringrequiredsections[].blocks[].settings[].minnumbersections[].blocks[].settings[].maxnumbersections[].blocks[].settings[].stepnumbersections[].blocks[].settings[].infostringsections[].blocks[].settings[].placeholderstringsections[].max_blocksintegerrequiredsections[].presetsarray of objectrequiredsections[].presets[].namestringrequiredsections[].presets[].settingsobjectrequiredsections[].presets[].blocksarray of objectrequiredsections[].presets[].blocks[].typestringrequiredsections[].presets[].blocks[].settingsobjectrequiredsettings_schemaarray of objectrequiredsettings_schema[].namestringrequiredsettings_schema[].settingsarray of objectrequiredsettings_schema[].settings[].typestringrequiredsettings_schema[].settings[].idstringrequiredsettings_schema[].settings[].labelstringrequiredsettings_schema[].settings[].defaultstringsettings_schema[].settings[].optionsarray of objectsettings_schema[].settings[].options[].valuestringrequiredsettings_schema[].settings[].options[].labelstringrequiredsettings_schema[].settings[].minnumbersettings_schema[].settings[].maxnumbersettings_schema[].settings[].stepnumbersettings_schema[].settings[].infostringsettings_schema[].settings[].placeholderstringsettingsobjectrequiredTheme setting values of the draft.
Errors
| 400 | idempotency_key_required | Every POST needs an Idempotency-Key header. |
| 400 | validation_failed | A field in the request is missing or invalid. See param. |
| 401 | authentication_required | Send a valid access token or session. |
| 403 | missing_scope | The app token does not have the scope this endpoint needs. |
| 409 | idempotency_in_progress | A request with this Idempotency-Key is still running. |
| 422 | idempotency_key_reused | This Idempotency-Key was used with a different request. |
| 429 | rate_limited | Too many requests. Wait for the time in RateLimit-Reset. |
| 500 | internal_error | Something went wrong on our side. Quote the trace_id to support. |
curl -X POST https://api.storelyne.com/admin/2026-11/theme/publish \
-H "Authorization: Bearer pat_live_..." \
-H "Idempotency-Key: $(uuidgen)"const res = await fetch('https://api.storelyne.com/admin/2026-11/theme/publish', {
method: 'POST',
headers: {
'Authorization': `Bearer ${process.env.STORELYNE_TOKEN}`,
'Idempotency-Key': crypto.randomUUID(),
},
});
const data = await res.json();{
"id": "thm_01JCG8ZQ5S7T0V4X8K2M3N6P9R",
"name": "Festive saree",
"version": 1,
"published_at": "2026-11-04T10:00:00.000Z",
"updated_at": "2026-11-04T10:00:00.000Z",
"has_unpublished_changes": false,
"files": [
{
"path": "string",
"size": 1,
"customized": false,
"added": false
}
],
"code": {
"css": "",
"head_html": "",
"body_html": "",
"allow_external": false
},
"templates": {},
"sections": [
{
"type": "string",
"name": "Festive saree",
"category": "string",
"description": "Hand block printed cotton.",
"main": false,
"templates": [
"string"
],
"settings": [
{
"type": "string",
"id": "string",
"label": "string",
"default": "string",
"options": [],
"min": 1,
"max": 1,
"step": 1,
"info": "string",
"placeholder": "string"
}
],
"blocks": [
{
"type": "string",
"name": "Festive saree",
"limit": 1,
"settings": []
}
],
"max_blocks": 1,
"presets": [
{
"name": "Festive saree",
"settings": {},
"blocks": []
}
]
}
],
"settings_schema": [
{
"name": "Festive saree",
"settings": [
{
"type": "string",
"id": "string",
"label": "string",
"default": "string",
"options": [],
"min": 1,
"max": 1,
"step": 1,
"info": "string",
"placeholder": "string"
}
]
}
],
"settings": {}
}