{"id":40904903,"url":"https://github.com/mailersend/mailersend-nodejs","last_synced_at":"2026-01-22T02:37:26.991Z","repository":{"id":42981748,"uuid":"305364859","full_name":"mailersend/mailersend-nodejs","owner":"mailersend","description":"The official MailerSend Node.js SDK","archived":false,"fork":false,"pushed_at":"2026-01-16T00:43:05.000Z","size":494,"stargazers_count":169,"open_issues_count":15,"forks_count":32,"subscribers_count":8,"default_branch":"main","last_synced_at":"2026-01-16T06:34:06.363Z","etag":null,"topics":["email","hacktoberfest","mailersend","nodejs","transactional-emails"],"latest_commit_sha":null,"homepage":"https://developers.mailersend.com","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mailersend.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-10-19T11:43:09.000Z","updated_at":"2026-01-14T11:59:23.000Z","dependencies_parsed_at":"2025-07-19T13:06:07.425Z","dependency_job_id":"15a756d9-baa7-407f-a1aa-9cd846ae75ec","html_url":"https://github.com/mailersend/mailersend-nodejs","commit_stats":{"total_commits":135,"total_committers":17,"mean_commits":"7.9411764705882355","dds":0.6444444444444444,"last_synced_commit":"826d157a116aea76a64c97cac0b0cc27fb546f3c"},"previous_names":[],"tags_count":28,"template":false,"template_full_name":null,"purl":"pkg:github/mailersend/mailersend-nodejs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mailersend%2Fmailersend-nodejs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mailersend%2Fmailersend-nodejs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mailersend%2Fmailersend-nodejs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mailersend%2Fmailersend-nodejs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mailersend","download_url":"https://codeload.github.com/mailersend/mailersend-nodejs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mailersend%2Fmailersend-nodejs/sbom","scorecard":{"id":612825,"data":{"date":"2025-08-11","repo":{"name":"github.com/mailersend/mailersend-nodejs","commit":"eecd731220096964ecc9b3d34943a92404369b5b"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.8,"checks":[{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":10,"reason":"all changesets reviewed","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":4,"reason":"5 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 4","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/publish.yaml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yaml:9: update your workflow using https://app.stepsecurity.io/secureworkflow/mailersend/mailersend-nodejs/publish.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yaml:10: update your workflow using https://app.stepsecurity.io/secureworkflow/mailersend/mailersend-nodejs/publish.yaml/main?enable=pin","Warn: npmCommand not pinned by hash: .github/workflows/publish.yaml:15","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 npmCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Packaging","score":10,"reason":"packaging workflow detected","details":["Info: Project packages its releases by way of GitHub Actions.: .github/workflows/publish.yaml:6"],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'v1'","Warn: 'allow deletion' enabled on branch 'main'","Warn: 'force pushes' enabled on branch 'main'","Info: 'branch protection settings apply to administrators' is required to merge on branch 'main'","Warn: 'stale review dismissal' is disabled on branch 'main'","Warn: required approving review count is 1 on branch 'main'","Warn: codeowners review is not required on branch 'main'","Warn: 'last push approval' is disabled on branch 'main'","Warn: no status checks found to merge onto branch 'main'","Info: PRs are required in order to make changes on branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 30 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":7,"reason":"3 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-vh95-rmgr-6w4m","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-21T03:04:36.571Z","repository_id":42981748,"created_at":"2025-08-21T03:04:36.571Z","updated_at":"2025-08-21T03:04:36.571Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28651809,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-22T01:17:37.254Z","status":"online","status_checked_at":"2026-01-22T02:00:07.137Z","response_time":144,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["email","hacktoberfest","mailersend","nodejs","transactional-emails"],"created_at":"2026-01-22T02:37:26.887Z","updated_at":"2026-01-22T02:37:26.986Z","avatar_url":"https://github.com/mailersend.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ca href=\"https://www.mailersend.com\"\u003e\u003cimg src=\"https://www.mailersend.com/images/logo.svg\" width=\"200px\"/\u003e\u003c/a\u003e\n\nMailerSend Node.js SDK\n\n[![MIT licensed](https://img.shields.io/npm/l/mailersend)](./LICENSE.md)\n![NPM Version](https://img.shields.io/npm/v/mailersend)\n![Top language](https://img.shields.io/github/languages/top/IARKI/mailer-send-ts)\n\n\u003cbr/\u003e\n\n## Welcome to MailerSend 👋\n\n_Send emails and SMS in minutes_\n\nDevelopers come for the high deliverability, and stay because our intuitive API and built-in integrations make life easier. 🤝\n\nFor more info, you can:\n\n- Visit our [Developers site 💻](https://developers.mailersend.com/) for REST API reference\n- Read our [Knowledge base ❓](https://www.mailersend.com/help) for guides on how to use MailerSend\n- Contact our [Support team 📨](https://www.mailersend.com/contact-us) if you require more assistance\n\n#### V1 Documentation can be found [here](https://github.com/mailersend/mailersend-nodejs/tree/v1#readme)\n\n\u003cbr/\u003e\n\n# Table of Contents\n\n- [Installation](#installation)\n  - [Setup](#setup)\n- [Usage](#usage)\n  - [Email](#email)\n    - [Send an email](#send-an-email)\n    - [Add CC, BCC recipients](#add-cc-bcc-recipients)\n    - [Send a template-based email](#send-a-template-based-email)\n    - [Personalization](#advanced-personalization)\n    - [Send email with attachment](#send-email-with-attachment)\n    - [Send email with inline attachment](#send-email-with-inline-attachment)\n    - [Send bulk emails](#send-bulk-emails)\n    - [Get bulk request status](#get-bulk-request-status)\n  - [Tokens](#tokens)\n    - [Create a token](#create-a-token)\n    - [Update token](#update-token)\n    - [Delete token](#delete-token)\n  - [Activity](#activity)\n    - [Get activity list](#get-activity-list)\n  - [Analytics](#analytics)\n    - [Get activity data by date](#get-activity-data-by-date)\n    - [Opens by country](#opens-by-country)\n    - [Opens by user-agent](#opens-by-user-agent)\n    - [Opens by reading environment](#opens-by-reading-environment)\n  - [Domains](#domains)\n    - [Get a list of domains](#get-a-list-of-domains)\n    - [Get domain](#get-domain)\n    - [Delete domain](#delete-domain)\n    - [Get a list of recipients per domain](#get-a-list-of-recipients-per-domain)\n    - [Update domain settings](#update-domain-settings)\n    - [Add a domain](#add-a-domain)\n    - [Get DNS records](#get-dns-records)\n    - [Get verification status](#get-verification-status)\n  - [Identity](#identity)\n    - [Get identity list](#get-identity-list)\n    - [Get identity](#get-identity)\n    - [Get identity by email](#get-identity-by-email-address)\n    - [Create identity](#create-identity)\n    - [Update identity](#update-identity)\n    - [Update identity by email](#update-identity-by-email-address)\n    - [Delete identity](#delete-identity)\n    - [Delete identity by email](#delete-identity-by-email-address)\n  - [Inbounds](#inbound)\n    - [Get inbound list](#get-inbound-list)\n    - [Get inbound](#get-inbound)\n    - [Create inbound](#create-inbound)\n    - [Update inbound](#update-inbound)\n    - [Delete inbound](#delete-inbound)\n  - [Messages](#messages)\n    - [Get a list of messages](#get-a-list-of-messages)\n    - [Get info on a message](#get-info-on-a-message)\n  - [Recipients](#recipients)\n    - [Get a list of recipients](#get-a-list-of-recipients)\n    - [Get single recipient](#get-single-recipient)\n    - [Delete recipient](#delete-recipient)\n    - [Add recipients to a suppression list](#add-recipients-to-a-suppression-list)\n    - [Get recipients from a suppression list](#get-recipients-from-a-suppression-list)\n    - [Delete recipients from a suppression list](#delete-recipients-from-a-suppression-list)\n  - [Templates](#templates)\n    - [Get a list of templates](#get-a-list-of-templates)\n    - [Get a single template](#get-a-single-template)\n    - [Delete a template](#delete-a-template)\n  - [Webhooks](#webhooks)\n    - [Get a list of webhooks](#get-a-list-of-webhooks)\n    - [Get webhook](#get-webhook)\n    - [Create webhook](#create-webhook)\n    - [Update webhook](#update-webhook)\n    - [Delete webhook](#delete-webhook)\n    - [Verify a webhook signature](#verify-webhook-signature)\n  - [Others](#others)\n    - [Get API Quota](#get-api-quota)\n- [Support and Feedback](#support-and-feedback)\n- [License](#license)\n\n# Installation\n\n## Setup\n\n```bash\nnpm install mailersend\n```\n\nif you would like to use the env approach as shown in the examples, please run\n\n```bash\nnpm install dotenv --save\n```\n\n# Usage\n\n## Email\n\n### Send an email\n\n```js\nimport 'dotenv/config';\nimport { MailerSend, EmailParams, Sender, Recipient } from \"mailersend\";\n\nconst mailerSend = new MailerSend({\n  apiKey: process.env.API_KEY,\n});\n\nconst sentFrom = new Sender(\"you@yourdomain.com\", \"Your name\");\n\nconst recipients = [\n  new Recipient(\"your@client.com\", \"Your Client\")\n];\n\nconst emailParams = new EmailParams()\n  .setFrom(sentFrom)\n  .setTo(recipients)\n  .setReplyTo(sentFrom)\n  .setSubject(\"This is a Subject\")\n  .setHtml(\"\u003cstrong\u003eThis is the HTML content\u003c/strong\u003e\")\n  .setText(\"This is the text content\");\n\nawait mailerSend.email.send(emailParams);\n\n```\n\n### Add CC, BCC recipients\n\n```js\nimport 'dotenv/config';\nimport { MailerSend, EmailParams, Sender, Recipient } from \"mailersend\";\n\nconst mailerSend = new MailerSend({\n  apiKey: process.env.API_KEY,\n});\n\nconst sentFrom = new Sender(\"bbbb@yourdomain.com\", \"Your name\");\n\nconst recipients = [\n  new Recipient(\"your@client.com\", \"Your Client\")\n];\nconst cc = [\n  new Recipient(\"your_cc@client.com\", \"Your Client CC\")\n];\nconst bcc = [\n  new Recipient(\"your_bcc@client.com\", \"Your Client BCC\")\n];\n\nconst emailParams = new EmailParams()\n  .setFrom(sentFrom)\n  .setTo(recipients)\n  .setCc(cc)\n  .setBcc(bcc)\n  .setSubject(\"This is a Subject\")\n  .setHtml(\"\u003cstrong\u003eThis is the HTML content\u003c/strong\u003e\")\n  .setText(\"This is the text content\");\n\nawait mailerSend.email.send(emailParams);\n```\n\n### Send a template-based email\n\n```js\nimport 'dotenv/config';\nimport { MailerSend, EmailParams, Sender, Recipient } from \"mailersend\";\n\nconst mailerSend = new MailerSend({\n  apiKey: process.env.API_KEY,\n});\n\nconst sentFrom = new Sender(\"you@yourdomain.com\", \"Your name\");\n\nconst recipients = [\n  new Recipient(\"your@client.com\", \"Your Client\")\n];\n\nconst emailParams = new EmailParams()\n  .setFrom(sentFrom)\n  .setTo(recipients)\n  .setReplyTo(sentFrom)\n  .setSubject(\"This is a Subject\")\n  .setTemplateId('templateId');\n\nawait mailerSend.email.send(emailParams);\n\n```\n\n### Personalization\n\n```js\nimport 'dotenv/config';\nimport { MailerSend, EmailParams, Sender, Recipient } from \"mailersend\";\n\nconst mailerSend = new MailerSend({\n  apiKey: process.env.API_KEY,\n});\n\nconst sentFrom = new Sender(\"you@yourdomain.com\", \"Your name\");\n\nconst recipients = [\n  new Recipient(\"your@client.com\", \"Your Client\")\n];\n\nconst personalization = [\n  {\n    email: \"your@client.com\",\n    data: {\n      test: 'Test Value'\n    },\n  }\n];\n\nconst emailParams = new EmailParams()\n  .setFrom(sentFrom)\n  .setTo(recipients)\n  .setReplyTo(sentFrom)\n  .setPersonalization(personalization)\n  .setSubject(\"Subject, {{ test }}\")\n  .setHtml(\"This is the HTML content, {{ test }}\")\n  .setText(\"This is the text content, {{ test }}\");\n\nawait mailerSend.email.send(emailParams);\n\n```\n\n### Send email with attachment\n\n```js\nimport 'dotenv/config';\nimport fs from \"fs\";\nimport { MailerSend, EmailParams, Sender, Recipient, Attachment } from \"mailersend\";\n\nconst mailerSend = new MailerSend({\n  apiKey: process.env.API_KEY,\n});\n\nconst sentFrom = new Sender(\"you@yourdomain.com\", \"Your name\");\n\nconst recipients = [\n  new Recipient(\"your@client.com\", \"Your Client\")\n];\n\nconst attachments = [\n  new Attachment(\n    fs.readFileSync('/path/to/file.pdf', { encoding: 'base64' }),\n    'file.pdf',\n    'attachment'\n  )\n]\n\nconst emailParams = new EmailParams()\n  .setFrom(sentFrom)\n  .setTo(recipients)\n  .setReplyTo(sentFrom)\n  .setAttachments(attachments)\n  .setSubject(\"This is a Subject\")\n  .setHtml(\"\u003cstrong\u003eThis is the HTML content\u003c/strong\u003e\")\n  .setText(\"This is the text content\");\n\nawait mailerSend.email.send(emailParams);\n\n```\n\n### Send email with inline attachment\n\n```js\nimport 'dotenv/config';\nimport fs from \"fs\";\nimport { MailerSend, EmailParams, Sender, Recipient, Attachment } from \"mailersend\";\n\nconst mailerSend = new MailerSend({\n  apiKey: process.env.API_KEY,\n});\n\nconst sentFrom = new Sender(\"you@yourdomain.com\", \"Your name\");\n\nconst recipients = [\n  new Recipient(\"your@client.com\", \"Your Client\")\n];\n\nconst attachments = [\n  new Attachment(\n    fs.readFileSync('/path/to/file.png', { encoding: 'base64' }),\n    'file.png',\n    'inline',\n    '0123456789'\n  )\n]\n\nconst emailParams = new EmailParams()\n  .setFrom(sentFrom)\n  .setTo(recipients)\n  .setReplyTo(sentFrom)\n  .setAttachments(attachments)\n  .setSubject(\"This is a Subject\")\n  .setHtml(\"\u003cstrong\u003eThis is the HTML content with an inline image attachment \u003cimg src=\\\"cid:0123456789\\\"/\u003e\u003c/strong\u003e\")\n  .setText(\"This is the text content\");\n\nawait mailerSend.email.send(emailParams);\n\n```\n\n### Send a scheduled email\n\n```js\nimport 'dotenv/config';\nimport { MailerSend, EmailParams, Sender, Recipient } from \"mailersend\";\n\nconst mailerSend = new MailerSend({\n  apiKey: process.env.API_KEY,\n});\n\nconst sentFrom = new Sender(\"you@yourdomain.com\", \"Your name\");\n\nconst recipients = [\n  new Recipient(\"your@client.com\", \"Your Client\")\n];\n\nconst emailParams = new EmailParams()\n  .setFrom(sentFrom)\n  .setTo(recipients)\n  .setReplyTo(sentFrom)\n  .setSubject(\"This is a scheduled Subject\")\n  .setHtml(\"\u003cstrong\u003eThis is a scheduled HTML content\u003c/strong\u003e\")\n  .setText(\"This is a scheduled text content\")\n  .setSendAt(Math.floor((new Date(Date.now()+ 30*60*1000)).getTime() / 1000)); //send in 30mins NB:param has to be a Unix timestamp e.g 2443651141\n\nawait mailerSend.email.send(emailParams);\n\n```\n\n### Send bulk emails\n\n```js\nimport 'dotenv/config';\nimport { MailerSend, EmailParams, Sender, Recipient } from \"mailersend\";\n\nconst mailerSend = new MailerSend({\n  apiKey: process.env.API_KEY,\n});\n\nconst sentFrom = new Sender(\"your@yourdomain.com\", \"Your name\");\n\nconst bulkEmails = [];\n\nconst emailParams = new EmailParams()\n  .setFrom(sentFrom)\n  .setTo([\n    new Recipient(\"your@client.com\", \"Your Client\")\n  ])\n  .setSubject(\"This is a Subject\")\n  .setHtml(\"\u003cstrong\u003eThis is the HTML content\u003c/strong\u003e\")\n  .setText(\"This is the text content\");\n\nbulkEmails.push(emailParams);\n\nconst emailParams2 = new EmailParams()\n  .setFrom(sentFrom)\n  .setTo([\n    new Recipient(\"your_2@client.com\", \"Your Client 2\")\n  ])\n  .setSubject(\"This is a Subject 2\")\n  .setHtml(\"\u003cstrong\u003eThis is the HTML content 2\u003c/strong\u003e\")\n  .setText(\"This is the text content 2\");\n\nbulkEmails.push(emailParams2);\n\nawait mailerSend.email.sendBulk(bulkEmails);\n\n```\n\n### Get bulk request status\n\n```js\nimport 'dotenv/config';\nimport { MailerSend } from \"mailersend\";\n\nconst mailerSend = new MailerSend({\n  apiKey: process.env.API_KEY,\n});\n\nmailerSend.email.getBulkStatus('bulk_email_id') // bulk email Id e.g 63af1fdb790d97105a090001\n  .then((response) =\u003e {\n    console.log(response.body);\n  });\n\n```\n\n## Tokens\n\n### Create a token\n\n```js\nimport 'dotenv/config';\nimport { MailerSend, Token} from \"mailersend\";\n\nconst mailerSend = new MailerSend({\n  apiKey: process.env.API_KEY,\n});\n\nconst token = new Token()\n  .setName(\"Token name\")\n  .setDomainId(\"domain_id\")\n  .setScopes([\n    \"email_full\",\n    \"domains_read\",\n    \"domains_full\",\n    \"activity_read\",\n    \"activity_full\",\n    \"analytics_read\",\n    \"analytics_full\",\n    \"tokens_full\",\n  ]);\n\nmailerSend.token.create(token)\n  .then((response) =\u003e console.log(response.body))\n  .catch((error) =\u003e console.log(error.body));\n\n```\n\n### Update token\n\n```js\nimport 'dotenv/config';\nimport { MailerSend} from \"mailersend\";\n\nconst mailerSend = new MailerSend({\n  apiKey: process.env.API_KEY,\n});\n\nmailerSend.token.updateSettings(\"token_id\", {\n  status: \"pause\",\n})\n  .then((response) =\u003e console.log(response.body))\n  .catch((error) =\u003e console.log(error.body));\n\n```\n\n### Delete token\n\n```js\nimport 'dotenv/config';\nimport { MailerSend} from \"mailersend\";\n\nconst mailerSend = new MailerSend({\n  apiKey: process.env.API_KEY,\n});\n\nmailerSend.token.delete(\"token_id\")\n  .then((response) =\u003e console.log(response.body))\n  .catch((error) =\u003e console.log(error.body));\n\n```\n\n## Activity\n\n### Get activity list\n\n```js\nimport 'dotenv/config';\nimport { MailerSend, ActivityEventType } from \"mailersend\";\n\nconst mailerSend = new MailerSend({\n  apiKey: process.env.API_KEY,\n});\n\nconst queryParams = {\n  limit: 10, // Min: 10, Max: 100, Default: 25\n  page: 2,\n  date_from: 1443651141, // Unix timestamp\n  date_to: 1443651141, // Unix timestamp\n  event: [ActivityEventType.SENT, ActivityEventType.SOFT_BOUNCED]\n}\n\nmailerSend.email.activity.domain(\"domain_id\", queryParams)\n  .then((response) =\u003e console.log(response.body))\n  .catch((error) =\u003e console.log(error));\n\n```\n\n## Analytics\n\n### Get activity data by date\n\n```js\nimport 'dotenv/config';\nimport { ActivityEventType, MailerSend } from \"mailersend\";\n\nconst mailerSend = new MailerSend({\n  apiKey: process.env.API_KEY,\n});\n\nmailerSend.email.analytics.byDate({\n  date_from: 1443651141,\n  date_to: 2443651141,\n  event: [ActivityEventType.CLICKED, ActivityEventType.OPENED],\n}).then(response =\u003e {\n  console.log(response.body);\n}).catch(error =\u003e {\n  console.log(error.body);\n});\n\n```\n\n### Opens by country\n\n```js\nimport 'dotenv/config';\nimport { ActivityEventType, MailerSend } from \"mailersend\";\n\nconst mailerSend = new MailerSend({\n  apiKey: process.env.API_KEY,\n});\n\nmailerSend.email.analytics.byCountry({\n  date_from: 1443651141,\n  date_to: 2443651141,\n}).then(response =\u003e {\n  console.log(response.body);\n}).catch(error =\u003e {\n  console.log(error.body);\n});\n\n```\n\n### Opens by user-agent\n\n```js\nimport 'dotenv/config';\nimport { ActivityEventType, MailerSend } from \"mailersend\";\n\nconst mailerSend = new MailerSend({\n  apiKey: process.env.API_KEY,\n});\n\nmailerSend.email.analytics.byUserAgent({\n  date_from: 1443651141,\n  date_to: 2443651141,\n}).then(response =\u003e {\n  console.log(response.body);\n}).catch(error =\u003e {\n  console.log(error.body);\n});\n\n```\n\n### Opens by reading environment\n\n```js\nimport 'dotenv/config';\nimport { ActivityEventType, MailerSend } from \"mailersend\";\n\nconst mailerSend = new MailerSend({\n  apiKey: process.env.API_KEY,\n});\n\nmailerSend.email.analytics.byReadingEnvironment({\n  date_from: 1443651141,\n  date_to: 2443651141,\n}).then(response =\u003e {\n  console.log(response.body);\n}).catch(error =\u003e {\n  console.log(error.body);\n});\n\n```\n\n## Domains\n\n### Get a list of domains\n\n```js\nimport 'dotenv/config';\nimport { MailerSend } from \"mailersend\";\n\nconst mailerSend = new MailerSend({\n  apiKey: process.env.API_KEY,\n});\n\nmailerSend.email.domain.list()\n  .then((response) =\u003e console.log(response.body))\n  .catch((error) =\u003e console.log(error.body));\n\n```\n\n### Get domain\n\n```js\nimport 'dotenv/config';\nimport { MailerSend } from \"mailersend\";\n\nconst mailerSend = new MailerSend({\n  apiKey: process.env.API_KEY,\n});\n\nmailerSend.email.domain.single(\"domain_id\")\n  .then((response) =\u003e console.log(response.body))\n  .catch((error) =\u003e console.log(error.body));\n\n```\n\n### Delete domain\n\n```js\nimport 'dotenv/config';\nimport { MailerSend } from \"mailersend\";\n\nconst mailerSend = new MailerSend({\n  apiKey: process.env.API_KEY,\n});\n\nmailerSend.email.domain.delete(\"domain_id\")\n  .then((response) =\u003e console.log(response.body))\n  .catch((error) =\u003e console.log(error.body));\n\n```\n\n### Get a list of recipients per domain\n\n```js\nimport 'dotenv/config';\nimport { MailerSend } from \"mailersend\";\n\nconst mailerSend = new MailerSend({\n  apiKey: process.env.API_KEY,\n});\n\nmailerSend.email.domain.recipients(\"domain_id\", {\n  page: 1,\n  limit: 10\n})\n  .then((response) =\u003e console.log(response.body))\n  .catch((error) =\u003e console.log(error.body));\n\n```\n\n### Update domain settings\n\n```js\nimport 'dotenv/config';\nimport { MailerSend } from \"mailersend\";\n\nconst mailerSend = new MailerSend({\n  apiKey: process.env.API_KEY,\n});\n\nmailerSend.email.domain.updateSettings(\"domain_id\", {\n  send_paused: 1,\n  track_clicks: 1,\n  track_opens: 1,\n  track_unsubscribe: 1,\n  track_unsubscribe_html: \"\u003cstrong\u003e Unsubscribe now \u003c/strong\u003e\",\n  track_unsubscribe_plain: \"Unsubscribe now\",\n  track_content: 1,\n  custom_tracking_enabled: 1,\n  custom_tracking_subdomain: \"subdomain\",\n  precedence_bulk: 1,\n  ignore_duplicated_recipients: 1,\n})\n  .then((response) =\u003e console.log(response.body))\n  .catch((error) =\u003e console.log(error.body));\n\n```\n\n### Add a domain\n\n```js\nimport 'dotenv/config';\nimport { MailerSend, Domain } from \"mailersend\";\n\nconst mailerSend = new MailerSend({\n  apiKey: process.env.API_KEY,\n});\n\nconst domain = new Domain({\n  name: \"example.com\",\n  returnPathSubdomain: \"rp_subdomain\",\n  customTrackingSubdomain: \"ct_subdomain\",\n  inboundRoutingSubdomain: \"ir_subdomain\",\n})\n\nmailerSend.email.domain.create(domain)\n  .then((response) =\u003e console.log(response.body))\n  .catch((error) =\u003e console.log(error.body));\n\n```\n\n### Get DNS records\n\n```js\nimport 'dotenv/config';\nimport { MailerSend } from \"mailersend\";\n\nconst mailerSend = new MailerSend({\n  apiKey: process.env.API_KEY,\n});\n\nmailerSend.email.domain.dns(\"domain_id\")\n  .then((response) =\u003e console.log(response.body))\n  .catch((error) =\u003e console.log(error.body));\n\n```\n\n### Get verification status\n\n```js\nimport 'dotenv/config';\nimport { MailerSend } from \"mailersend\";\n\nconst mailerSend = new MailerSend({\n  apiKey: process.env.API_KEY,\n});\n\nmailerSend.email.domain.verify(\"domain_id\")\n  .then((response) =\u003e console.log(response.body))\n  .catch((error) =\u003e console.log(error.body));\n\n```\n\n## Identity\n\n### Get identity list\n\n```js\nimport 'dotenv/config';\nimport { MailerSend } from \"mailersend\";\n\nconst mailerSend = new MailerSend({\n  apiKey: process.env.API_KEY,\n});\n\nmailerSend.email.identity.list()\n  .then((response) =\u003e console.log(response.body))\n  .catch((error) =\u003e console.log(error.body));\n\n```\n\n### Get identity\n\n```js\nimport 'dotenv/config';\nimport { MailerSend } from \"mailersend\";\n\nconst mailerSend = new MailerSend({\n  apiKey: process.env.API_KEY,\n});\n\nmailerSend.email.identity.single(\"identity_id\")\n  .then((response) =\u003e console.log(response.body))\n  .catch((error) =\u003e console.log(error.body));\n\n```\n\n### Get identity by email address\n\n```js\nimport 'dotenv/config';\nimport { MailerSend } from \"mailersend\";\n\nconst mailerSend = new MailerSend({\n  apiKey: process.env.API_KEY,\n});\n\nmailerSend.email.identity.singleByEmail('email_address')\n  .then((response) =\u003e console.log(response.body))\n  .catch((error) =\u003e console.log(error.body));\n\n```\n\n### Create identity\n\n```js\nimport 'dotenv/config';\nimport { MailerSend, Inbound, InboundFilterType } from \"mailersend\";\n\nconst mailerSend = new MailerSend({\n  apiKey: process.env.API_KEY,\n});\n\nconst identity = new Identity()\n  .setDomainId('domain_id')\n  .setEmail('identity@yourdomain.com')\n  .setName('Name')\n  .setReplyToEmail('reply_identity@yourdomain.com')\n  .setReplyToName('Reply Name')\n  .setAddNote(false);\n\nmailerSend.email.identity.create(identity)\n  .then((response) =\u003e console.log(response.body))\n  .catch((error) =\u003e console.log(error.body));\n\n```\n\n### Update identity\n\n```js\nimport 'dotenv/config';\nimport { MailerSend, Inbound, InboundFilterType } from \"mailersend\";\n\nconst mailerSend = new MailerSend({\n  apiKey: process.env.API_KEY,\n});\n\nconst data = {\n  domain_id: 'string',\n  email: 'email@yourdomain.com',\n  name: 'name',\n  personal_note: 'Personal note',\n  reply_to_name: 'Reply Name',\n  reply_to_email: 'repy@yourdomain.com',\n  add_note: true,\n};\n\nmailerSend.email.identity.update('identiy_id', data)\n  .then((response) =\u003e console.log(response.body))\n  .catch((error) =\u003e console.log(error.body));\n\n```\n\n### Update identity by email address\n\n```js\nimport 'dotenv/config';\nimport { MailerSend, Inbound, InboundFilterType } from \"mailersend\";\n\nconst mailerSend = new MailerSend({\n  apiKey: process.env.API_KEY,\n});\n\nconst data = {\n  domain_id: 'string',\n  email: 'email@yourdomain.com',\n  name: 'name',\n  personal_note: 'Personal note',\n  reply_to_name: 'Reply Name',\n  reply_to_email: 'repy@yourdomain.com',\n  add_note: true,\n};\n\nmailerSend.email.identity.updateByEmail('email_address', data)\n  .then((response) =\u003e console.log(response.body))\n  .catch((error) =\u003e console.log(error.body));\n\n```\n\n### Delete identity\n\n```js\nimport 'dotenv/config';\nimport { MailerSend } from \"mailersend\";\n\nconst mailerSend = new MailerSend({\n  apiKey: process.env.API_KEY,\n});\n\nmailerSend.email.identity.delete(\"identity_id\")\n  .then((response) =\u003e console.log(response.body))\n  .catch((error) =\u003e console.log(error.body));\n\n```\n\n### Delete identity by email address\n\n```js\nimport 'dotenv/config';\nimport { MailerSend } from \"mailersend\";\n\nconst mailerSend = new MailerSend({\n  apiKey: process.env.API_KEY,\n});\n\nmailerSend.email.identity.deleteByEmail('email_address')\n  .then((response) =\u003e console.log(response.body))\n  .catch((error) =\u003e console.log(error.body));\n\n```\n\n## Inbound\n\n### Get inbound list\n\n```js\nimport 'dotenv/config';\nimport { MailerSend } from \"mailersend\";\n\nconst mailerSend = new MailerSend({\n  apiKey: process.env.API_KEY,\n});\n\nmailerSend.email.inbound.list()\n  .then((response) =\u003e console.log(response.body))\n  .catch((error) =\u003e console.log(error.body));\n\n```\n\n### Get inbound\n\n```js\nimport 'dotenv/config';\nimport { MailerSend } from \"mailersend\";\n\nconst mailerSend = new MailerSend({\n  apiKey: process.env.API_KEY,\n});\n\nmailerSend.email.inbound.single(\"inbound_id\")\n  .then((response) =\u003e console.log(response.body))\n  .catch((error) =\u003e console.log(error.body));\n\n```\n\n### Create inbound\n\n```js\nimport 'dotenv/config';\nimport { MailerSend, Inbound, InboundFilterType } from \"mailersend\";\n\nconst mailerSend = new MailerSend({\n  apiKey: process.env.API_KEY,\n});\n\nconst inbound = new Inbound()\n  .setDomainId('domain_id')\n  .setName('inbound test')\n  .setDomainEnabled(true)\n  .setMatchFilter({\n    type: InboundFilterType.MATCH_ALL,\n  })\n  .setForwards([\n    {\n      type: \"webhook\",\n      value: \"https://www.yourdomain.com/hook\"\n    }\n  ]);\n\nmailerSend.email.inbound.create(inbound)\n  .then((response) =\u003e console.log(response.body))\n  .catch((error) =\u003e console.log(error.body));\n\n```\n\n### Update inbound\n\n```js\nimport 'dotenv/config';\nimport { MailerSend, Inbound, InboundFilterType } from \"mailersend\";\n\nconst mailerSend = new MailerSend({\n  apiKey: process.env.API_KEY,\n});\n\nconst inbound = new Inbound()\n  .setDomainId('domain_id')\n  .setName('inbound test 2')\n  .setDomainEnabled(false)\n  .setMatchFilter({\n    type: InboundFilterType.MATCH_ALL,\n  })\n  .setForwards([\n    {\n      type: \"webhook\",\n      value: \"https://www.yourdomain.com/hook\"\n    }\n  ]);\n\nmailerSend.email.inbound.update('inbound_id', inbound)\n  .then((response) =\u003e console.log(response.body))\n  .catch((error) =\u003e console.log(error.body));\n\n```\n\n### Delete inbound\n\n```js\nimport 'dotenv/config';\nimport { MailerSend } from \"mailersend\";\n\nconst mailerSend = new MailerSend({\n  apiKey: process.env.API_KEY,\n});\n\nmailerSend.email.inbound.delete(\"inbound_id\")\n  .then((response) =\u003e console.log(response.body))\n  .catch((error) =\u003e console.log(error.body));\n\n```\n\n## Messages\n\n### Get a list of messages\n\n```js\nimport 'dotenv/config';\nimport { MailerSend} from \"mailersend\";\n\nconst mailerSend = new MailerSend({\n  apiKey: process.env.API_KEY,\n});\n\n\nmailerSend.email.message.list()\n  .then((response) =\u003e console.log(response.body))\n  .catch((error) =\u003e console.log(error.body));\n\n```\n\n### Get info on a message\n\n```js\nimport 'dotenv/config';\nimport { MailerSend} from \"mailersend\";\n\nconst mailerSend = new MailerSend({\n  apiKey: process.env.API_KEY,\n});\n\nmailerSend.email.message.single(\"message_id\")\n  .then((response) =\u003e console.log(response.body))\n  .catch((error) =\u003e console.log(error.body));\n\n```\n\n## Scheduled Messages\n\n### Get scheduled email list\n\n```js\nimport 'dotenv/config';\nimport { MailerSend} from \"mailersend\";\n\nconst mailerSend = new MailerSend({\n  apiKey: process.env.API_KEY,\n});\n\nmailerSend.email.schedule.list()\n  .then((response) =\u003e console.log(response.body))\n  .catch((error) =\u003e console.log(error.body));\n\n```\n\n### Get scheduled email\n\n```js\nimport 'dotenv/config';\nimport { MailerSend} from \"mailersend\";\n\nconst mailerSend = new MailerSend({\n  apiKey: process.env.API_KEY,\n});\n\nmailerSend.email.schedule.single(\"message_id\")\n  .then((response) =\u003e console.log(response.body))\n  .catch((error) =\u003e console.log(error.body));\n\n```\n\n### Delete scheduled email\n\n```js\nimport 'dotenv/config';\nimport { MailerSend} from \"mailersend\";\n\nconst mailerSend = new MailerSend({\n  apiKey: process.env.API_KEY,\n});\n\nmailerSend.email.schedule.delete(\"message_id\")\n  .then((response) =\u003e console.log(response.body))\n  .catch((error) =\u003e console.log(error.body));\n\n```\n\n## Recipients\n\n### Get a list of recipients\n\n```js\nimport 'dotenv/config';\nimport { MailerSend } from \"mailersend\";\n\nconst mailerSend = new MailerSend({\n  apiKey: process.env.API_KEY,\n});\n\nmailerSend.email.recipient.list({\n  domain_id: \"domain_id\",\n  limit: 10,\n})\n  .then((response) =\u003e console.log(response.body))\n  .catch((error) =\u003e console.log(error.body));\n\n```\n\n### Get single recipient\n\n```js\nimport 'dotenv/config';\nimport { MailerSend} from \"mailersend\";\n\nconst mailerSend = new MailerSend({\n  apiKey: process.env.API_KEY,\n});\n\nmailerSend.email.recipient.single(\"recipient_id\")\n  .then((response) =\u003e console.log(response.body))\n  .catch((error) =\u003e console.log(error.body));\n\n```\n\n### Delete recipient\n\n```js\nimport 'dotenv/config';\nimport { MailerSend} from \"mailersend\";\n\nconst mailerSend = new MailerSend({\n  apiKey: process.env.API_KEY,\n});\n\nmailerSend.email.recipient.delete(\"recipient_id\")\n  .then((response) =\u003e console.log(response.body))\n  .catch((error) =\u003e console.log(error.body));\n\n```\n\n### Add recipients to a suppression list\n\n#### Blocklist\n\n```js\nimport 'dotenv/config';\nimport { BlockListType, MailerSend } from \"mailersend\";\n\nconst mailerSend = new MailerSend({\n  apiKey: process.env.API_KEY,\n});\n\nmailerSend.email.recipient.blockRecipients({\n  domain_id: 'domain_id',\n  recipients: [\n    \"test@example.com\"\n  ]\n}, BlockListType.BLOCK_LIST)\n  .then((response) =\u003e console.log(response.body))\n  .catch((error) =\u003e console.log(error.body));\n\n```\n\n#### Hard Bounces\n\n```js\nimport 'dotenv/config';\nimport { BlockListType, MailerSend } from \"mailersend\";\n\nconst mailerSend = new MailerSend({\n  apiKey: process.env.API_KEY,\n});\n\nmailerSend.email.recipient.blockRecipients({\n  domain_id: 'domain_id',\n  recipients: [\n    \"test@example.com\"\n  ]\n}, BlockListType.HARD_BOUNCES_LIST)\n  .then((response) =\u003e console.log(response.body))\n  .catch((error) =\u003e console.log(error.body));\n\n```\n\n#### Spam Complaints\n\n```js\nimport 'dotenv/config';\nimport { BlockListType, MailerSend } from \"mailersend\";\n\nconst mailerSend = new MailerSend({\n  apiKey: process.env.API_KEY,\n});\n\nmailerSend.email.recipient.blockRecipients({\n  domain_id: 'domain_id',\n  recipients: [\n    \"test@example.com\"\n  ]\n}, BlockListType.SPAM_COMPLAINTS_LIST)\n  .then((response) =\u003e console.log(response.body))\n  .catch((error) =\u003e console.log(error.body));\n\n```\n\n#### Unsubscribe\n\n```js\nimport 'dotenv/config';\nimport { BlockListType, MailerSend } from \"mailersend\";\n\nconst mailerSend = new MailerSend({\n  apiKey: process.env.API_KEY,\n});\n\nmailerSend.email.recipient.blockRecipients({\n  domain_id: 'domain_id',\n  recipients: [\n    \"test@example.com\"\n  ]\n}, BlockListType.UNSUBSCRIBES_LIST)\n  .then((response) =\u003e console.log(response.body))\n  .catch((error) =\u003e console.log(error.body));\n\n```\n\n### Get recipients from a suppression list\n\n#### Blocklist\n\n```js\nimport 'dotenv/config';\nimport { BlockListType, MailerSend} from \"mailersend\";\n\nconst mailerSend = new MailerSend({\n  apiKey: process.env.API_KEY,\n});\n\nmailerSend.email.recipient.blockList(\n  { domain_id: \"domain_id\", },\n  BlockListType.BLOCK_LIST\n)\n  .then((response) =\u003e console.log(response.body))\n  .catch((error) =\u003e console.log(error.body));\n\n```\n\n#### Hard Bounce\n\n```js\nimport 'dotenv/config';\nimport { BlockListType, MailerSend } from \"mailersend\";\n\nconst mailerSend = new MailerSend({\n  apiKey: process.env.API_KEY,\n});\n\nmailerSend.email.recipient.blockList(\n  { domain_id: \"domain_id\", },\n  BlockListType.HARD_BOUNCES_LIST\n)\n  .then((response) =\u003e console.log(response.body))\n  .catch((error) =\u003e console.log(error.body));\n\n```\n\n#### Spam Complaint\n\n```js\nimport 'dotenv/config';\nimport { BlockListType, MailerSend} from \"mailersend\";\n\nconst mailerSend = new MailerSend({\n  apiKey: process.env.API_KEY,\n});\n\nmailerSend.email.recipient.blockList(\n  { domain_id: \"domain_id\", },\n  BlockListType.SPAM_COMPLAINTS_LIST\n)\n  .then((response) =\u003e console.log(response.body))\n  .catch((error) =\u003e console.log(error.body));\n\n```\n\n#### Unsubscribe\n\n```js\nimport 'dotenv/config';\nimport { BlockListType, MailerSend} from \"mailersend\";\n\nconst mailerSend = new MailerSend({\n  apiKey: process.env.API_KEY,\n});\n\nmailerSend.email.recipient.blockList(\n  { domain_id: \"domain_id\", },\n  BlockListType.UNSUBSCRIBES_LIST\n)\n  .then((response) =\u003e console.log(response.body))\n  .catch((error) =\u003e console.log(error.body));\n\n```\n\n### Delete recipients from a suppression list\n\n#### Blocklist\n\n```js\nimport 'dotenv/config';\nimport { BlockListType, MailerSend } from \"mailersend\";\n\nconst mailerSend = new MailerSend({\n  apiKey: process.env.API_KEY,\n});\n\nmailerSend.email.recipient.delBlockListRecipients(\n  [\"recipient_id\", \"recipient_id\"],\n  BlockListType.BLOCK_LIST\n)\n  .then((response) =\u003e console.log(response.body))\n  .catch((error) =\u003e console.log(error.body));\n\n```\n\n#### Hard Bounce\n\n```js\nimport 'dotenv/config';\nimport { BlockListType, MailerSend } from \"mailersend\";\n\nconst mailerSend = new MailerSend({\n  apiKey: process.env.API_KEY,\n});\n\nmailerSend.email.recipient.delBlockListRecipients(\n  [\"recipient_id\", \"recipient_id\"],\n  BlockListType.HARD_BOUNCES_LIST\n)\n  .then((response) =\u003e console.log(response.body))\n  .catch((error) =\u003e console.log(error.body));\n\n```\n\n#### Spam Complaint\n\n```js\nimport 'dotenv/config';\nimport { BlockListType, MailerSend } from \"mailersend\";\n\nconst mailerSend = new MailerSend({\n  apiKey: process.env.API_KEY,\n});\n\nmailerSend.email.recipient.delBlockListRecipients(\n  [\"recipient_id\", \"recipient_id\"],\n  BlockListType.SPAM_COMPLAINTS_LIST\n)\n  .then((response) =\u003e console.log(response.body))\n  .catch((error) =\u003e console.log(error.body));\n\n```\n\n#### Unsubscribe\n\n```js\nimport 'dotenv/config';\nimport { BlockListType, MailerSend } from \"mailersend\";\n\nconst mailerSend = new MailerSend({\n  apiKey: process.env.API_KEY,\n});\n\nmailerSend.email.recipient.delBlockListRecipients(\n  [\"recipient_id\", \"recipient_id\"],\n  BlockListType.UNSUBSCRIBES_LIST\n)\n  .then((response) =\u003e console.log(response.body))\n  .catch((error) =\u003e console.log(error.body));\n\n```\n\n## Templates\n\n### Get a list of templates\n\n```js\nimport 'dotenv/config';\nimport { MailerSend} from \"mailersend\";\n\nconst mailerSend = new MailerSend({\n  apiKey: process.env.API_KEY,\n});\n\nmailerSend.email.template.list({\n    domain_id: \"domain_id\"\n})\n  .then((response) =\u003e console.log(response.body))\n  .catch((error) =\u003e console.log(error.body));\n\n```\n\n### Get a single template\n\n```js\nimport 'dotenv/config';\nimport { MailerSend} from \"mailersend\";\n\nconst mailerSend = new MailerSend({\n  apiKey: process.env.API_KEY,\n});\n\nmailerSend.email.template.single(\"domain_id\")\n  .then((response) =\u003e console.log(response.body))\n  .catch((error) =\u003e console.log(error.body));\n\n```\n\n### Delete a template\n\n```js\nimport 'dotenv/config';\nimport { MailerSend} from \"mailersend\";\n\nconst mailerSend = new MailerSend({\n  apiKey: process.env.API_KEY,\n});\n\nmailerSend.email.template.single(\"domain_id\")\n  .then((response) =\u003e console.log(response.body))\n  .catch((error) =\u003e console.log(error.body));\n\n```\n\n## Webhooks\n\n### Get a list of webhooks\n\n```js\nimport 'dotenv/config';\nimport { MailerSend} from \"mailersend\";\n\nconst mailerSend = new MailerSend({\n  apiKey: process.env.API_KEY,\n});\n\nmailerSend.email.webhook.list(\"domain_id\")\n  .then((response) =\u003e console.log(response.body))\n  .catch((error) =\u003e console.log(error.body));\n\n```\n\n### Get webhook\n\n```js\nimport 'dotenv/config';\nimport { MailerSend} from \"mailersend\";\n\nconst mailerSend = new MailerSend({\n  apiKey: process.env.API_KEY,\n});\n\nmailerSend.email.webhook.single(\"webhook_id\")\n  .then((response) =\u003e console.log(response.body))\n  .catch((error) =\u003e console.log(error.body));\n\n```\n\n### Create webhook\n\n```js\nimport 'dotenv/config';\nimport { EmailWebhook, EmailWebhookEventType, MailerSend } from \"mailersend\";\n\nconst mailerSend = new MailerSend({\n  apiKey: process.env.API_KEY,\n});\n\nconst emailWebhook = new EmailWebhook()\n  .setName(\"Webhook Name\")\n  .setUrl(\"https://example.com\")\n  .setDomainId(\"domain_id\")\n  .setEnabled(true)\n  .setEvents([EmailWebhookEventType.SENT, EmailWebhookEventType.OPENED]);\n\nmailerSend.email.webhook.create(emailWebhook)\n  .then((response) =\u003e console.log(response.body))\n  .catch((error) =\u003e console.log(error.body));\n\n```\n\n### Update webhook\n\n```js\nimport 'dotenv/config';\nimport { EmailWebhook, EmailWebhookEventType, MailerSend } from \"mailersend\";\n\nconst mailerSend = new MailerSend({\n  apiKey: process.env.API_KEY,\n});\n\nconst emailWebhook = new EmailWebhook()\n  .setName(\"Webhook Name 2\")\n  .setEnabled(false)\n  .setEvents([EmailWebhookEventType.SENT, EmailWebhookEventType.OPENED]);\n\nmailerSend.email.webhook.update(\"webhook_id\", emailWebhook)\n  .then((response) =\u003e console.log(response.body))\n  .catch((error) =\u003e console.log(error.body));\n\n```\n\n### Delete webhook\n\n```js\nimport 'dotenv/config';\nimport { MailerSend} from \"mailersend\";\n\nconst mailerSend = new MailerSend({\n  apiKey: process.env.API_KEY,\n});\n\nmailerSend.email.webhook.delete(\"webhook_id\")\n  .then((response) =\u003e console.log(response.body))\n  .catch((error) =\u003e console.log(error.body));\n\n```\n\n# SMS\n\n### Send SMS\n\n```js\nimport 'dotenv/config';\nimport { MailerSend, SMSParams } from \"mailersend\";\n\nconst mailersend = new MailerSend({\n  apiKey: process.env.API_KEY,\n});\n\nconst recipients = [\n  \"+18332647501\"\n];\n\nconst smsParams = new SMSParams()\n  .setFrom(\"+18332647501\")\n  .setTo(recipients)\n  .setText(\"This is the text content\");\n\nawait mailersend.sms.send(smsParams);\n\n```\n\n### SMS personalization\n\n```js\nimport 'dotenv/config';\nimport { MailerSend, SMSParams, SMSPersonalization } from \"mailersend\";\n\nconst mailersend = new MailerSend({\n  apiKey: process.env.API_KEY,\n});\n\nconst recipients = [\n  \"+18332647501\",\n  \"+18332647502\"\n];\n\nconst personalization = [\n  new SMSPersonalization(\"+18332647501\", {\n    \"name\": \"Dummy\"\n  }),\n  new SMSPersonalization(\"+18332647502\", {\n    \"name\": \"Not Dummy\"\n  }),\n];\n\nconst smsParams = new SMSParams()\n  .setFrom(\"+18332647501\")\n  .setTo(recipients)\n  .setPersonalization(personalization)\n  .setText(\"Hey {{name}} welcome to our organization\");\n\nawait mailersend.sms.send(smsParams);\n\n```\n\n## Phone Numbers\n\n### Get phone number list\n\n```js\nimport 'dotenv/config';\nimport { MailerSend } from \"mailersend\";\n\nconst mailerSend = new MailerSend({\n  apiKey: process.env.API_KEY,\n});\n\nmailerSend.sms.number.list({\n  paused: false,\n  limit: 10,\n  page: 1\n})\n  .then((response) =\u003e console.log(response.body))\n  .catch((error) =\u003e console.log(error.body));\n\n```\n\n### Get phone number\n\n```js\nimport 'dotenv/config';\nimport { MailerSend } from \"mailersend\";\n\nconst mailerSend = new MailerSend({\n  apiKey: process.env.API_KEY,\n});\n\nmailerSend.sms.number.single(\"sms_number_id\")\n  .then((response) =\u003e console.log(response.body))\n  .catch((error) =\u003e console.log(error.body));\n\n```\n\n### Update phone number\n\n```js\nimport 'dotenv/config';\nimport { MailerSend } from \"mailersend\";\n\nconst mailerSend = new MailerSend({\n  apiKey: process.env.API_KEY,\n});\n\nmailerSend.sms.number.update(\"sms_number_id\", true)\n  .then((response) =\u003e console.log(response.body))\n  .catch((error) =\u003e console.log(error.body));\n\n```\n\n### Delete phone number\n\n```js\nimport 'dotenv/config';\nimport { MailerSend } from \"mailersend\";\n\nconst mailerSend = new MailerSend({\n  apiKey: process.env.API_KEY,\n});\n\nmailerSend.sms.number.delete(\"sms_number_id\")\n  .then((response) =\u003e console.log(response.body))\n  .catch((error) =\u003e console.log(error.body));\n\n```\n\n## Messages\n\n### Get messages list\n\n```js\nimport 'dotenv/config';\nimport { MailerSend } from \"mailersend\";\n\nconst mailerSend = new MailerSend({\n  apiKey: process.env.API_KEY,\n});\n\nmailerSend.sms.message.list({\n  limit: 10,\n  page: 1\n})\n  .then((response) =\u003e console.log(response.body))\n  .catch((error) =\u003e console.log(error.body));\n\n```\n\n### Get a message\n\n```js\nimport 'dotenv/config';\nimport { MailerSend } from \"mailersend\";\n\nconst mailerSend = new MailerSend({\n  apiKey: process.env.API_KEY,\n});\n\nmailerSend.sms.message.single(\"sms_message_id\")\n  .then((response) =\u003e console.log(response.body))\n  .catch((error) =\u003e console.log(error.body));\n\n```\n\n## Activity\n\n### Get activity list\n\n```js\nimport 'dotenv/config';\nimport { MailerSend, SmsActivityStatusType } from \"mailersend\";\n\nconst mailerSend = new MailerSend({\n  apiKey: process.env.API_KEY,\n});\n\nmailerSend.sms.activity.list({\n  sms_number_id: \"number_id\",\n  status: [SmsActivityStatusType.SENT, SmsActivityStatusType.DELIVERED],\n  limit: 10,\n  page: 1\n})\n  .then((response) =\u003e console.log(response.body))\n  .catch((error) =\u003e console.log(error.body));\n\n```\n\n### Get activity of a message\n\n```js\nimport 'dotenv/config';\nimport { MailerSend } from \"mailersend\";\n\nconst mailerSend = new MailerSend({\n  apiKey: process.env.API_KEY,\n});\n\nmailerSend.sms.activity.single(\"sms_message_id\")\n  .then((response) =\u003e console.log(response.body))\n  .catch((error) =\u003e console.log(error.body));\n\n```\n\n## Recipients\n\n### Get recipient list\n\n```js\nimport 'dotenv/config';\nimport { MailerSend } from \"mailersend\";\n\nconst mailerSend = new MailerSend({\n  apiKey: process.env.API_KEY,\n});\n\nmailerSend.sms.recipient.list({\n  sms_number_id: \"sms_number_id\",\n  status: \"active\",\n  limit: 10,\n  page: 1,\n})\n  .then((response) =\u003e console.log(response.body))\n  .catch((error) =\u003e console.log(error.body));\n\n```\n\n### Get recipient\n\n```js\nimport 'dotenv/config';\nimport { MailerSend } from \"mailersend\";\n\nconst mailerSend = new MailerSend({\n  apiKey: process.env.API_KEY,\n});\n\nmailerSend.sms.recipient.single(\"sms_recipient_id\")\n  .then((response) =\u003e console.log(response.body))\n  .catch((error) =\u003e console.log(error.body));\n\n```\n\n### Update recipient\n\n```js\nimport 'dotenv/config';\nimport { MailerSend } from \"mailersend\";\n\nconst mailerSend = new MailerSend({\n  apiKey: process.env.API_KEY,\n});\n\nmailerSend.sms.recipient.update(\"sms_recipient_id\", \"active\")\n  .then((response) =\u003e console.log(response.body))\n  .catch((error) =\u003e console.log(error.body));\n\n```\n\n## Webhooks\n\n### Get webhook list for a number\n\n```js\nimport 'dotenv/config';\nimport { MailerSend } from \"mailersend\";\n\nconst mailerSend = new MailerSend({\n  apiKey: process.env.API_KEY,\n});\n\nmailerSend.sms.webhook.list(\"sms_number_id\")\n  .then((response) =\u003e console.log(response.body))\n  .catch((error) =\u003e console.log(error.body));\n\n```\n\n### Get webhook\n\n```js\nimport 'dotenv/config';\nimport { MailerSend } from \"mailersend\";\n\nconst mailerSend = new MailerSend({\n  apiKey: process.env.API_KEY,\n});\n\nmailerSend.sms.webhook.single(\"sms_webhook_id\")\n  .then((response) =\u003e console.log(response.body))\n  .catch((error) =\u003e console.log(error.body));\n\n```\n\n### Create webhook\n\n```js\nimport 'dotenv/config';\nimport { MailerSend, SmsWebhook, SmsWebhookEventType } from \"mailersend\";\n\nconst mailerSend = new MailerSend({\n  apiKey: process.env.API_KEY,\n});\n\nconst smsWebhook = new SmsWebhook()\n  .setName(\"Sms Webhook\")\n  .setUrl(\"https:://yourapp.com/hook\")\n  .setSmsNumberId(\"sms_number_id\")\n  .setEnabled(true)\n  .setEvents([SmsWebhookEventType.SENT, SmsWebhookEventType.DELIVERED])\n\nmailerSend.sms.webhook.create(smsWebhook)\n  .then((response) =\u003e console.log(response.body))\n  .catch((error) =\u003e console.log(error.body));\n\n```\n\n### Update webhook\n\n```js\nimport 'dotenv/config';\nimport { MailerSend } from \"mailersend\";\n\nconst mailerSend = new MailerSend({\n  apiKey: process.env.API_KEY,\n});\n\nmailerSend.sms.webhook.update(\"sms_webhook_id\", {\n  name: \"Webhook\",\n  url: \"https:://yourapp.com/hook\",\n  enabled: [\"sms.sent\", \"sms.delivered\", \"sms.failed\"],\n  enabled: true\n})\n  .then((response) =\u003e console.log(response.body))\n  .catch((error) =\u003e console.log(error.body));\n\n```\n\n### Delete webhook\n\n```js\nimport 'dotenv/config';\nimport { MailerSend } from \"mailersend\";\n\nconst mailerSend = new MailerSend({\n  apiKey: process.env.API_KEY,\n});\n\nmailerSend.sms.webhook.delete(\"sms_webhook_id\")\n  .then((response) =\u003e console.log(response.body))\n  .catch((error) =\u003e console.log(error.body));\n\n```\n\n### Verify webhook signature\n\n```js\nimport crypto from 'crypto'\n\nconst requestContent = '{request payload from webhook}';\nconst receivedSignature = 'signature from webhook header';\nconst signingSecret = 'your-secret-key';\n\nconst computedSignature = crypto\n  .createHmac('sha256', signingSecret)\n  .update(requestContent, 'utf8')\n  .digest('hex');\n\nreturn crypto.timingSafeEqual(\n  Buffer.from(receivedSignature, 'hex'),\n  Buffer.from(computedSignature, 'hex')\n);\n```\n\n## Inbound\n\n### Get inbound list\n\n```js\nimport 'dotenv/config';\nimport { MailerSend } from \"mailersend\";\n\nconst mailerSend = new MailerSend({\n  apiKey: process.env.API_KEY,\n});\n\nmailerSend.sms.inbound.list({\n  enabled: 1,\n  sms_number_id: \"sms_number_id\",\n  limit: 10,\n  page: 1,\n})\n  .then((response) =\u003e console.log(response.body))\n  .catch((error) =\u003e console.log(error.body));\n\n```\n\n### Get inbound\n\n```js\nimport 'dotenv/config';\nimport { MailerSend } from \"mailersend\";\n\nconst mailerSend = new MailerSend({\n  apiKey: process.env.API_KEY,\n});\n\nmailerSend.sms.inbound.single(\"sms_inbound_id\")\n  .then((response) =\u003e console.log(response.body))\n  .catch((error) =\u003e console.log(error.body));\n\n```\n\n### Add inbound\n\n```js\nimport 'dotenv/config';\nimport { MailerSend, SmsInbound } from \"mailersend\";\n\nconst mailerSend = new MailerSend({\n  apiKey: process.env.API_KEY,\n});\n\nconst smsInbound = new SmsInbound()\n  .setSmsNumberId(\"sms_number_id\")\n  .setEnabled(true)\n  .setName(\"Inbound Name\")\n  .setForwardUrl(\"yourapp.com/hook\")\n  .setFilter({\n    comparer: \"equal\",\n    value: \"START\"\n  });\n\nmailerSend.sms.inbound.create(smsInbound)\n  .then((response) =\u003e console.log(response.body))\n  .catch((error) =\u003e console.log(error.body));\n\n```\n\n### Update inbound\n\n```js\nimport 'dotenv/config';\nimport { MailerSend, SmsInbound } from \"mailersend\";\n\nconst mailerSend = new MailerSend({\n  apiKey: process.env.API_KEY,\n});\n\nconst smsInbound = new SmsInbound()\n  .setSmsNumberId(\"sms_number_id\")\n  .setEnabled(true)\n  .setName(\"Inbound Name Update\")\n  .setForwardUrl(\"yourapp.com/hook\")\n  .setFilter({\n    comparer: \"equal\",\n    value: \"START\"\n  });\n\nmailerSend.sms.inbound.update(\"sms_inbound_id\", {...smsInbound})\n  .then((response) =\u003e console.log(response.body))\n  .catch((error) =\u003e console.log(error.body));\n\n```\n\n### Delete inbound\n\n```js\nimport 'dotenv/config';\nimport { MailerSend } from \"mailersend\";\n\nconst mailerSend = new MailerSend({\n  apiKey: process.env.API_KEY,\n});\n\nmailerSend.sms.inbound.delete(\"sms_inbound_id\")\n  .then((response) =\u003e console.log(response.body))\n  .catch((error) =\u003e console.log(error.body));\n\n```\n\n## Others\n\n### Get Api Quota\n\n```js\nimport 'dotenv/config';\nimport { MailerSend} from \"mailersend\";\n\nconst mailerSend = new MailerSend({\n  apiKey: process.env.API_KEY,\n});\n\nmailerSend.others.getApiQuota()\n  .then((response) =\u003e console.log(response.body))\n  .catch((error) =\u003e console.log(error.body));\n\n```\n\n# Support and Feedback\n\nIn case you find any bugs, submit an issue directly here in GitHub.\n\nYou are welcome to create SDK for any other programming language.\n\nIf you have any troubles using our API or SDK free to contact our support by email [info@mailersend.com](mailto:info@mailersend.com)\n\nThe official documentation is at [https://developers.mailersend.com](https://developers.mailersend.com)\n\n# License\n\n[The MIT License (MIT)](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmailersend%2Fmailersend-nodejs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmailersend%2Fmailersend-nodejs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmailersend%2Fmailersend-nodejs/lists"}