@confera/sdk
v1.0.1
Published
TypeScript SDK for Confera CMS API
Downloads
38
Maintainers
Readme
Confera Public API TypeScript SDK
Official TypeScript/JavaScript SDK for the Confera Public API (API-key authenticated).
Designed for simple, safe integrations:
- Server-side usage (API keys are secrets).
- Small, predictable methods.
- Clear errors with HTTP status codes.
Installation
pnpm add @confera/sdkQuick start (copy/paste)
import { createConferaPublicClient } from "@confera/sdk";
const confera = createConferaPublicClient({
baseUrl: "https://your-domain",
apiKey: process.env.CONFERA_API_KEY!,
});
// 1) Health check
await confera.health();
// 2) Schedule events
const events = await confera.events.list({ limit: 50, offset: 0 });
// 3) Badge check-in (kiosk)
await confera.badges.checkin({ qr: "ABC123", location: "kiosk-1" });Registrations example
External registration flow: fetch config → submit registration.
const cfg = await confera.registrations.getConfig();
if (!cfg.data.public_registration_enabled)
throw new Error("Registrations are closed");
const created = await confera.registrations.create({
firstName: "Aisha",
lastName: "Khan",
email: "[email protected]",
ticketTypeId: "<ticket_type_id>",
paymentMethodId: "<payment_method_id>",
paymentReference: "TXN-12345",
paymentProofUrl: "https://example.com/receipt.png",
});
console.log(created);Security rules (important)
- Keep API keys on the server (never in the browser).
- Use the smallest scopes you need when creating a key.
- Revoke leaked keys immediately.
- Keys automatically stop working when the conference is not live or the plan ends.
Errors
Requests throw a ConferaApiError on non-2xx responses.
import { ConferaApiError } from "@confera/sdk";
try {
await confera.health();
} catch (e) {
if (e instanceof ConferaApiError) {
console.log(e.status, e.code, e.message);
}
}What’s included
health()website.getSite()- Events
events.list(),events.listVenues(),events.listSpeakers()events.listWorkshops(),events.registerForWorkshop(),events.listWorkshopRegistrations(),events.getWorkshopRegistration()- Workshop proof helpers:
events.createWorkshopPaymentProofUploadUrl(),events.uploadWorkshopPaymentProof(),events.setWorkshopPaymentProof()
- Abstracts
- Public:
abstracts.listAccepted(),abstracts.getAcceptedById() - Submissions + uploads:
abstracts.createAttachmentUploadUrl(),abstracts.uploadAttachment(),abstracts.submit(),abstracts.listSubmissions(),abstracts.getSubmission()
- Public:
- Exhibition
- Public:
exhibition.listExhibits() - Submissions + uploads:
exhibition.createSubmissionPaymentProofUploadUrl(),exhibition.uploadSubmissionPaymentProof(),exhibition.submitExhibit()
- Public:
- Registrations
registrations.getConfig(),registrations.searchUniversities(),registrations.list(),registrations.get(),registrations.getReceiptUrl(),registrations.create()- Receipt upload helpers:
registrations.createEvidenceUploadUrl(),registrations.uploadEvidence()
- Check-ins
badges.checkin()attendance.checkin()
