const url = 'https://api.sherpo.io/merchant/v1/stores/<store>/products/<product>/prompts';
const options = {
method: 'POST',
headers: {'Content-Type': 'application/json', Authorization: 'Bearer <token>'},
body: JSON.stringify({
name: 'string',
title: 'string',
description: 'string',
body: 'string',
arguments: [
{
name: 'string',
description: 'string',
required: true,
default: 'string',
match: 'string',
flags: 'str',
message: 'string',
lenient: true
}
],
access: {tier: {id: 'string'}}
})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));