post

/content/widget-templates

Creates a Widget Template.

Note: There is a limit of 100 custom widget templates per store.

Required Fields

  • name
  • template

Authorization

apiKey - X-Auth-Token

Request Parameters

2 Headers

Request Body

2 Examples
Schema
object
name
string

User-friendly name.

required
schema
array[anyOf]

The schema for the widget’s merchant-facing UI. For more information on the available schema settings, see Widget UI Schema.

template
string

Handlebars HTML content. Also has access to Stencil Paper helpers.

1 validation + required
storefront_api_query
string

The GraphQL Storefront API query that provides widget data.

Responses

1 Example
Schema
object
data
object
meta
object

Send a Test Request

Send requests directly from the browser (CORS must be enabled)
$$.env
1 variable not set
store_hash
X-Auth-Token