Steps
- Create an API key
- Call the endpoint with fetch
- Read the returned post URL
Example (javascript)
const res = await fetch("https://blogjh.lovable.app/api/public/v1/posts", {
method: "POST",
headers: { Authorization: "Bearer bpk_live_YOUR_KEY", "Content-Type": "application/json" },
body: JSON.stringify({ title: "Hello from Node", html: "<p>Hi</p>", is_draft: false }),
});
console.log(await res.json());FAQ
Should I call the API from the browser?
Prefer server-side calls so your API key stays secret.
