Access
JavaScript SDK
Typed client for Node and browsers.
Install the typed client with npm install https://messyapi.com/pkg/messyapi-sdk-1.1.0.tgz. Plain fetch also works — the API is HTTPS + JSON.
const res = await fetch("https://messyapi.com/api/v1/repair", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.MESSYAPI_API_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({ records: [{ email: " Ana@Example.com " }] }),
})
if (!res.ok) { const { error } = await res.json(); throw new Error(`${error.code}: ${error.message}`) }
console.log(await res.json())