We created a new model of type Data. We added an HTML field to that model.
We then tried to use the POST method in the Write API to create new content for that model.
We used the key present in the Environments tab.
Here is the Write call…
curl https://builder.io/api/v1/write/test-generic-html-model
-X POST
-d ‘{ “name”: “imported-html-1”, “data”: { “importedpagehtml”: “
hello
” } }’-H ‘Authorization: Bearer ’
-H ‘Content-Type: application/json’
where test-generic-html-model is the identifier of the model we have, and importedpagehtml is the name of the HTML field.
However we are getting
{
“status”: 401,
“message”: “Unauthorized”,
“code”: “e462”
}