Version: 202607
Create script tag
POST/openapi/2026-07/script_tags
Create and inject JavaScript tags into a shop's storefront pages.
Request
- application/json
- Body
- Example
Bodyrequired
script_tag objectrequired
Script tag
srcstringrequired
Java Script file URL, must be valid and accessible
display_scopestringrequired
Determines where the script is displayed
event_typestring
Tag type to identify the script usage. Defaults to app
{
"script_tag": {
"src": "string",
"display_scope": "string",
"event_type": "string"
}
}
Responses
- 200
OK
- application/json
- Schema
- Example
Schema
codestring
error code
messagestring
error message
data object
script_tag object
Script tag
idstring
Created script tag ID
display_scopestring
Indicates where the script tag is applied
srcstring
URL of the script file
event_typestring
The tag type, as specified during creation
created_atstring
The timestamp when the script tag was created. Format: YYYY-MM-DDTHH:mm:ssZ
updated_atstring
The timestamp when the script tag was last updated. Format: YYYY-MM-DDTHH:mm:ssZ
{
"code": "string",
"message": "string",
"data": {
"script_tag": {
"id": "string",
"display_scope": "string",
"src": "string",
"event_type": "string",
"created_at": "string",
"updated_at": "string"
}
}
}