SDKs

Generated from the OpenAPI document (folder sdk/ of the platform repository, regenerated with npm run sdk). No dependencies. Both retry 429 and 5xx with backoff (honouring Retry-After), add an Idempotency-Key to every write automatically, page through lists and verify webhooks.

import { OriginClient, verifyWebhook } from "./sdk/typescript/origin";

const origin = new OriginClient({ apiKey: process.env.ORIGIN_API_KEY! });
const lead = await origin.createLead({ name: "Website enquiry", source: "website" });
const page = await origin.listLeads({ "stage[in]": "new,qualified", limit: 50 });
for await (const t of origin.paginate("/api/v1/tickets", { status: "open" })) console.log(t.id);