New:Microsoft Teams Notifications Are Now Available in Socket.Learn more →
Get Started

@agentisend/sdk-node

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@agentisend/sdk-node

Typed Node client for the AgentiSend API.

latest
Source
npmnpm
Version
0.2.0
Version published
Maintainers
1
Created
Source
AgentiSend AgentiSend

@agentisend/sdk-node

Typed Node client for the AgentiSend API. Node 20 or newer, ESM, no runtime dependencies.

npm install @agentisend/sdk-node

Send

import { AgentiSend } from '@agentisend/sdk-node';

const agentisend = new AgentiSend(process.env.AGENTISEND_API_KEY);
const { id } = await agentisend.emails.send({
  from: 'you@yourdomain.com',
  to: 'someone@example.com',
  subject: 'Hello from AgentiSend',
  text: 'Ten minutes, start to sent.',
});
console.log(id);

That block is executed against a running API server on every build of this repository, so a snippet that stops working fails the build rather than your first send.

Every mutating call takes an idempotency key. Pass one whenever a retry is possible: agentisend.emails.send(payload, { idempotencyKey: idempotencyKey('welcome-email', 'user_123') }). The same key with the same body replays the first response instead of sending twice.

Errors throw AgentiSendError, which carries code, message, fix and docsUrl. fix names what to do and which endpoint to call; on a 429 the error also carries retryAfterSeconds.

Coming from Resend

@agentisend/sdk-node/compat-resend exports a Resend class with every method the Resend SDK has and its { data, error } return shape, so the migration is the import line:

import { Resend } from '@agentisend/sdk-node/compat-resend';

const resend = new Resend(process.env.AGENTISEND_API_KEY);
const { data, error } = await resend.emails.send({ from, to, subject, html });

Where AgentiSend is stricter than Resend, the shim warns on stderr instead of changing what it does.

CLI

The package installs an agentisend binary.

npx @agentisend/sdk-node emails send --to someone@example.com \
  --from you@yourdomain.com --subject Hi --text "Sent from the CLI"
CommandWhat it does
emails send / get / list / cancelThe send path from a shell.
emails explain <id>Everything that happened to one message, in order.
domains list / verifySending domains and a re-check of their DNS.
webhooks listen --forward-to <url>Verify deliveries locally and forward the raw bytes to your app.
receiving listenThe same, for inbound mail.
limits kill / resumeStop a key sending, and undo it.
trust standingThis account's standing and the reasons behind it.
doctorCheck the key, the domains and the DNS in one pass.
profile list / use / setNamed key and base-URL profiles.
completions <shell>bash, zsh or fish.

AGENTISEND_API_KEY is read from the environment. Piped or redirected output is JSON; a terminal gets the table.

Verifying webhooks

@agentisend/sdk-node/webhook-signing is the same implementation that signs the delivery, so a signature that verifies here verified on the wire.

import { verifyWebhookSignature, SIGNATURE_HEADER } from '@agentisend/sdk-node/webhook-signing';

const ok = verifyWebhookSignature(secret, req.headers[SIGNATURE_HEADER], rawBody);

Pass the raw request body, byte for byte. Re-serialising parsed JSON changes the bytes and therefore the HMAC.

Docs

agentisend.com/docs. Problems: hello@agentisend.com.

Keywords

email

FAQs

Package last updated on 19 Sep 2026

Related posts