@siteme/sdk
v0.1.1
Published
Server-side JavaScript client for the SiteMe Partner API
Readme
@siteme/sdk
Server-side JavaScript client for the SiteMe Partner API.
Full usage guide (JS, Python, REST, domains, pricing): sdks/README.md
Do not use this in a browser — API keys must stay on your backend.
import { SiteMe } from "@siteme/sdk";
const siteme = new SiteMe({ apiKey: process.env.SITEME_API_KEY });
const site = await siteme.sites.create({
businessName: "Acme Dental",
customerBrief: "Family dentistry in Austin. Bookings, insurance, two locations.",
output: { look: "standard" },
slug: "acme-dental",
});
const ready = await siteme.sites.wait(site.id);Mint a hosted editor session for your frontend (never send the API key to the browser):
const session = await siteme.sites.createEmbedSession(ready.id, {
theme: { primary: "#0f766e" },
});
// hand session.embed_url to @siteme/editorEditor guide: sdks/EDITOR.md
npm install @siteme/sdkFrom this repo: npm install ./packages/sdk
