Skip to main content
Version: 202506

Create script tag

POST 

/openapi/2025-06/script_tags

Create and inject JavaScript tags into a shop's storefront pages.

Request

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

Responses

OK

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