Noketa Docs

Getting Started

Install and configure the Noketa SDK

Installation

bun add noketa

Create a Client

import { Noketa } from "noketa";

const client = new Noketa(process.env.NOKETA_API_KEY!);

The constructor requires a Noketa API key and throws if the key is missing.

First Request

await client.profiles.create({
  listId: "list_123",
  email: "person@example.com",
  attributes: {
    first_name: "Jane",
    last_name: "Doe",
  },
});

Error Handling

All request helpers throw Error with a message coming from the API response when available.

try {
  await client.emails.send({
    from: "noreply@yourdomain.com",
    to: "person@example.com",
    subject: "Welcome",
    html: "<p>Hello from Noketa</p>",
  });
} catch (error) {
  console.error((error as Error).message);
}