Hi, is it possible to dynamically create new collections from the API?
I would like each of these collections to have the exact same fields as each other. Ive seen this post here, but I think thats for existing collections
For example:
fetch('example.com/api/collections/updateCollection/posts?token=xxtokenxx', {
method: 'post',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
data: {
fields: [
{
name: "display_name",
label: "Display Name",
type: "text",
default: "",
info: "Name of the country as displayed to customers",
group: "",
localize: false,
options: [],
width: "1-1",
lst: true,
acl: [],
required: false
}
]
}
})
})
.then(collection => collection.json())
.then(collection => console.log(collection));
Throws a 404 error since the collection in this example called ‘posts’ doesn’t already exist. So my question is, is there a way to make it so the above would create a whole new collection type? Or is there a web hook I could try use?