bavimail
v0.3.7
Published
Typescript SDK for the Bavimail email service API
Maintainers
Readme
bavimail
Official TypeScript SDK for the Bavimail API.
Install
npm install bavimailUsage
API key auth (legacy/default server usage)
import { Bavimail } from "bavimail";
const client = new Bavimail({
apiKey: process.env.BAVIMAIL_API_KEY!,
});Bearer auth
import { Bavimail } from "bavimail";
const client = new Bavimail({
baseUrl: import.meta.env.VITE_BAVIMAIL_API_BASE_URL,
auth: {
mode: "bearer",
getBearerToken: () => localStorage.getItem("bavimail_jwt"),
},
});Notes
x-api-keyis only sent inapiKeymode.User-Agentis set only in non-browser runtimes.- Response payloads remain camelCase in SDK models.
- Current resource coverage:
domains,aliases,attachments,analytics,emails,inboundEmails,conversations,suppressions,tags, andwebhooks.
Migration Notes (0.3.0)
sessionandsessionOrBearerauth modes are no longer part of the public SDK.- Use
bearermode for browser/front-end usage. - Session-cookie auth is considered an internal platform concern and is intentionally not exposed via the npm SDK.
