Make a PUT request to https://api.bigcommerce.com/stores/ikiuocf6r8/v3/content/widget-templates/{widget uuid}
with the following headers
X-Auth-Client {{auth client secret }}
X-Auth-Token {{ auth token }}
Accept: application/json
Content-Type: application/json
Then put the widget code in the body. For example
{
"name":"Innovator",
"template": "<div class='innovator' data-photo='{{ image.src }}' data-photo-alt='{{ image_alt }}' data-title='{{ title }}' data-name='{{ name }}' data-bio='{{ bio }}'><div class='innovator-image'><img src='{{ image.src }}'/><div class='innovator-alt_text' data-alt-text='{{image_alt}}'></div></div><h3 class='innovator-name'>{{ name }}</h3><h4 class='innovator-title'>{{ title }}</h4><div class='innovator-bio'>{{{ bio }}}</div></div>",
"schema": [{
"type": "tab",
"label": "Content",
"sections": [
{
"label": "Image",
"settings": [
{
"type": "imageManager",
"id": "image",
"default": {
"src": "",
"type": "IMAGE_MANAGER"
}
},
{
"type": "input",
"label": "Alt Text",
"id": "image_alt",
"default": ""
}
]
},
{
"label": "Name",
"settings": [{
"type": "input",
"id": "name",
"default":""
}]
},
{
"label": "Title",
"settings": [{
"type": "input",
"id": "title",
"default":""
}]
},
{
"label": "Bio",
"settings": [{
"type": "text",
"id": "bio",
"default":""
}]
}
]
}]
}