boundry.
Sydney, Australia
Documentation/JavaScript SDK

JavaScript / TypeScript SDK

boundry-sdk is the typed fetch client for Node.js, Bun, Deno, Cloudflare Workers, and browser-compatible runtimes.

Install
bash
npm install boundry-sdk
send.ts
TypeScript
import Boundry from "boundry-sdk";

const client = new Boundry({ apiKey: process.env.BOUNDRY_API_KEY });

const email = await client.emails.send({
  from: "hello@example.com",
  to: "person@example.net",
  subject: "Hello from Boundry",
  html: "<strong>Hello</strong>",
});

console.log(email.id);

Complete API surface

Use the ergonomic resources for common workflows and client.api for every generated operation in the canonical regional API. Review the public source for package tests and runtime compatibility.

SDK methodWhat it doesAPI reference
client.api.listApiKeys(...)listApiKeysOpenAPI only
client.api.createApiKey(...)createApiKeyOpenAPI only
client.api.deleteApiKey(...)deleteApiKeyOpenAPI only
client.api.listBroadcasts(...)listBroadcastsOpenAPI only
client.api.createBroadcast(...)createBroadcastOpenAPI only
client.api.deleteBroadcast(...)deleteBroadcastOpenAPI only
client.api.getBroadcast(...)getBroadcastOpenAPI only
client.api.updateBroadcast(...)updateBroadcastOpenAPI only
client.api.cancelBroadcast(...)cancelBroadcastOpenAPI only
client.api.listBroadcastClickedLinks(...)listBroadcastClickedLinksOpenAPI only
client.api.getBroadcastMetrics(...)getBroadcastMetricsOpenAPI only
client.api.listBroadcastRecipients(...)listBroadcastRecipientsOpenAPI only
client.api.sendBroadcast(...)sendBroadcastOpenAPI only
client.api.listContactProperties(...)listContactPropertiesOpenAPI only
client.api.createContactProperty(...)createContactPropertyOpenAPI only
client.api.deleteContactProperty(...)deleteContactPropertyOpenAPI only
client.api.getContactProperty(...)getContactPropertyOpenAPI only
client.api.updateContactProperty(...)updateContactPropertyOpenAPI only
client.api.listContacts(...)listContactsOpenAPI only
client.api.createContact(...)createContactOpenAPI only
client.api.deleteContact(...)deleteContactOpenAPI only
client.api.getContact(...)getContactOpenAPI only
client.api.updateContact(...)updateContactOpenAPI only
client.api.listContactSegments(...)listContactSegmentsOpenAPI only
client.api.removeContactFromSegment(...)removeContactFromSegmentOpenAPI only
client.api.addContactToSegment(...)addContactToSegmentOpenAPI only
client.api.getContactTopics(...)getContactTopicsOpenAPI only
client.api.updateContactTopics(...)updateContactTopicsOpenAPI only
client.api.listDomains(...)List domainsView endpoint
client.api.createDomain(...)Create a domainView endpoint
client.api.deleteDomain(...)deleteDomainOpenAPI only
client.api.getDomain(...)Retrieve a domainView endpoint
client.api.updateDomain(...)updateDomainOpenAPI only
client.api.verifyDomain(...)Verify a domainView endpoint
client.api.createDomainClaim(...)createDomainClaimOpenAPI only
client.api.getDomainClaim(...)getDomainClaimOpenAPI only
client.api.verifyDomainClaim(...)verifyDomainClaimOpenAPI only
client.api.listEmails(...)List emailsView endpoint
client.api.sendEmail(...)Send an emailView endpoint
client.api.getEmail(...)Retrieve an emailView endpoint
client.api.updateScheduledEmail(...)updateScheduledEmailOpenAPI only
client.api.listEmailAttachments(...)listEmailAttachmentsOpenAPI only
client.api.getEmailAttachment(...)getEmailAttachmentOpenAPI only
client.api.cancelEmail(...)cancelEmailOpenAPI only
client.api.retryEmail(...)retryEmailOpenAPI only
client.api.getEmailSource(...)getEmailSourceOpenAPI only
client.api.sendBatchEmails(...)sendBatchEmailsOpenAPI only
client.api.getEmailMetrics(...)getEmailMetricsOpenAPI only
client.api.listReceivedEmails(...)listReceivedEmailsOpenAPI only
client.api.getReceivedEmail(...)getReceivedEmailOpenAPI only
client.api.listReceivedEmailAttachments(...)listReceivedEmailAttachmentsOpenAPI only
client.api.getReceivedEmailAttachment(...)getReceivedEmailAttachmentOpenAPI only
client.api.getReceivedEmailSource(...)getReceivedEmailSourceOpenAPI only
client.api.getReceivedEmailThread(...)getReceivedEmailThreadOpenAPI only
client.api.health(...)healthOpenAPI only
client.api.listLogs(...)listLogsOpenAPI only
client.api.getLog(...)getLogOpenAPI only
client.api.authorizeOAuth(...)authorizeOAuthOpenAPI only
client.api.authorizeOAuthPost(...)authorizeOAuthPostOpenAPI only
client.api.listOAuthGrants(...)listOAuthGrantsOpenAPI only
client.api.revokeOAuthGrant(...)revokeOAuthGrantOpenAPI only
client.api.registerOAuthClient(...)registerOAuthClientOpenAPI only
client.api.revokeOAuthToken(...)revokeOAuthTokenOpenAPI only
client.api.exchangeOAuthToken(...)exchangeOAuthTokenOpenAPI only
client.api.listRegions(...)List live regions and markets accepting demand requestsOpenAPI only
client.api.requestRegion(...)Create or update a regional demand requestOpenAPI only
client.api.listSegments(...)listSegmentsOpenAPI only
client.api.createSegment(...)createSegmentOpenAPI only
client.api.deleteSegment(...)deleteSegmentOpenAPI only
client.api.getSegment(...)getSegmentOpenAPI only
client.api.listSegmentContacts(...)listSegmentContactsOpenAPI only
client.api.getSegmentMetrics(...)getSegmentMetricsOpenAPI only
client.api.listSuppressions(...)listSuppressionsOpenAPI only
client.api.createSuppression(...)createSuppressionOpenAPI only
client.api.deleteSuppression(...)deleteSuppressionOpenAPI only
client.api.getSuppression(...)getSuppressionOpenAPI only
client.api.deleteBatchSuppressions(...)deleteBatchSuppressionsOpenAPI only
client.api.createBatchSuppressions(...)createBatchSuppressionsOpenAPI only
client.api.listTemplates(...)listTemplatesOpenAPI only
client.api.createTemplate(...)createTemplateOpenAPI only
client.api.deleteTemplate(...)deleteTemplateOpenAPI only
client.api.getTemplate(...)getTemplateOpenAPI only
client.api.updateTemplate(...)updateTemplateOpenAPI only
client.api.duplicateTemplate(...)duplicateTemplateOpenAPI only
client.api.publishTemplate(...)publishTemplateOpenAPI only
client.api.listTopics(...)listTopicsOpenAPI only
client.api.createTopic(...)createTopicOpenAPI only
client.api.deleteTopic(...)deleteTopicOpenAPI only
client.api.getTopic(...)getTopicOpenAPI only
client.api.updateTopic(...)updateTopicOpenAPI only
client.api.managedOneClickUnsubscribe(...)Process an RFC 8058 one-click unsubscribeOpenAPI only
client.api.listProjectWebhookEvents(...)listProjectWebhookEventsOpenAPI only
client.api.listWebhooks(...)List webhooksView endpoint
client.api.createWebhook(...)Create a webhookView endpoint
client.api.deleteWebhook(...)Delete a webhookView endpoint
client.api.getWebhook(...)Retrieve a webhookView endpoint
client.api.updateWebhook(...)Update a webhookView endpoint
client.api.listWebhookEvents(...)listWebhookEventsOpenAPI only
client.api.getWebhookEvent(...)getWebhookEventOpenAPI only
client.api.listWebhookAttempts(...)listWebhookAttemptsOpenAPI only

Before you send

Keep BOUNDRY_API_KEY on the server and send from a domain verified in the same project: an unverified from domain returns 422. See verify a domain, then send email for attachments, idempotency keys and managed unsubscribe, or webhooks to verify delivery event signatures.