Docs menu

SDKs

Typed, dependency-free clients for Node (TypeScript) and Python. Both cover sending, batch, templates, the agent inbox API and webhook verification. Source: sdks/ in the repository.

import { FlinkkMail } from 'flinkk-mail';

const mail = new FlinkkMail(); // reads FLINKK_API_KEY
const { id } = await mail.emails.send(
  { from: 'Acme <hi@acme.com>', to: 'sam@example.com', template: 'welcome', variables: { product: 'Acme', url: 'https://acme.com' } },
  { idempotencyKey: 'welcome-sam-1' },
);
from flinkk_mail import FlinkkMail

mail = FlinkkMail()  # reads FLINKK_API_KEY
mail.emails.send({"from": "Acme <hi@acme.com>", "to": "sam@example.com", "template": "welcome",
                  "variables": {"product": "Acme", "url": "https://acme.com"}}, idempotency_key="welcome-sam-1")

Calls retry on 429 and 5xx only when that cannot cause a duplicate: reads, and sends with an idempotency key.

Logs and webhooks

const { data } = await mail.emails.list({ status: 'bounce', q: 'invoice', limit: 20 });
const email = await mail.emails.get(data[0].id); // includes email.events
const hook = await mail.webhooks.create({ url: 'https://example.com/hooks/flinkk', events: ['email.delivered', 'email.bounced'] });

Agents and webhooks

import { FlinkkAgents, verifyWebhook } from 'flinkk-mail';

const agent = new FlinkkAgents(); // reads FLINKK_AGENT_KEY
const { data: inboxes } = await agent.inboxes.list();

// In your webhook handler, with the RAW body string:
const ok = await verifyWebhook(rawBody, req.headers['flinkk-signature'], process.env.FLINKK_WEBHOOK_SECRET!);

See Agent inbox API for the endpoints and the signing scheme. The packages are not on npm or PyPI yet; copy the sdks/ folder or build it from the repository.