{"id":13594809,"url":"https://github.com/resend/resend-node","last_synced_at":"2026-02-28T01:50:15.020Z","repository":{"id":65387401,"uuid":"519680875","full_name":"resend/resend-node","owner":"resend","description":"Resend's Official Node.js SDK","archived":false,"fork":false,"pushed_at":"2025-05-14T14:41:46.000Z","size":38496,"stargazers_count":684,"open_issues_count":66,"forks_count":51,"subscribers_count":4,"default_branch":"canary","last_synced_at":"2025-05-15T07:03:00.642Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/resend.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}},"created_at":"2022-07-31T04:38:52.000Z","updated_at":"2025-05-05T13:43:38.000Z","dependencies_parsed_at":"2023-10-11T00:44:55.874Z","dependency_job_id":"ae59a69e-6519-4059-9a65-a1d741afc490","html_url":"https://github.com/resend/resend-node","commit_stats":null,"previous_names":["resend-inc/resend-node","klotty/klotty-node","resend/resend-node","resendlabs/resend-node"],"tags_count":53,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/resend%2Fresend-node","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/resend%2Fresend-node/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/resend%2Fresend-node/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/resend%2Fresend-node/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/resend","download_url":"https://codeload.github.com/resend/resend-node/tar.gz/refs/heads/canary","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254291961,"owners_count":22046424,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-08-01T16:01:39.443Z","updated_at":"2026-02-28T01:50:15.013Z","avatar_url":"https://github.com/resend.png","language":"TypeScript","funding_links":[],"categories":["TypeScript","Email Infrastructure"],"sub_categories":["Transactional email (dual-use)"],"readme":"\n![nodejs-og](https://github.com/user-attachments/assets/7bc8f7c1-1877-4ddd-89f9-4f8d9bc32ed5)\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://resend.com/docs/send-with-nodejs\"\u003eQuickstart Docs\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  Framework guides\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n  \u003ca \n  - \u003ca href=\"https://resend.com/docs/send-with-nextjs\"\u003eNext.js\u003c/a\u003e \n  - \u003ca href=\"https://resend.com/docs/send-with-remix\"\u003eRemix\u003c/a\u003e \n  - \u003ca href=\"https://resend.com/docs/send-with-nuxt\"\u003eNuxt\u003c/a\u003e \n  - \u003ca href=\"https://resend.com/docs/send-with-express\"\u003eExpress\u003c/a\u003e \n  - \u003ca href=\"https://resend.com/docs/send-with-redwoodjs\"\u003eRedwoodJS\u003c/a\u003e \n  - \u003ca href=\"https://resend.com/docs/send-with-hono\"\u003eHono\u003c/a\u003e \n  - \u003ca href=\"https://resend.com/docs/send-with-bun\"\u003eBun\u003c/a\u003e \n  - \u003ca href=\"https://resend.com/docs/send-with-astro\"\u003eAstro\u003c/a\u003e \n\u003c/p\u003e\n\n# Resend Node.js SDK\n\nNode.js library for the Resend API.\n\n## Install\n\n```bash\nnpm install resend\n# or\nyarn add resend\n```\n\n## Examples\n\nSend email with:\n\n- [Node.js](https://github.com/resend/resend-node-example)\n- [Next.js (App Router)](https://github.com/resend/resend-nextjs-app-router-example)\n- [Next.js (Pages Router)](https://github.com/resend/resend-nextjs-pages-router-example)\n- [Express](https://github.com/resend/resend-express-example)\n\n## Setup\n\nFirst, you need to get an API key, which is available in the [Resend Dashboard](https://resend.com/api-keys).\n\n```js\nimport { Resend } from 'resend';\nconst resend = new Resend('re_xxxx...xxxxxx');\n```\n\n## Usage\n\nSend your first email:\n\n```js\nconst { data } = await resend.emails.send({\n  from: 'you@example.com',\n  to: 'user@gmail.com',\n  replyTo: 'you@example.com',\n  subject: 'hello world',\n  text: 'it works!',\n});\n\nconsole.log(`Email ${data.id} has been sent`);\n```\n\n\u003e [!NOTE]  \n\u003e In order to send from your own domain, you will first need to verify your domain in the [Resend Dashboard](https://resend.com/domains). \n\n## Send email using HTML\n\nSend an email custom HTML content:\n\n```js\nconst { data } = await resend.emails.send({\n  from: 'you@example.com',\n  to: 'user@gmail.com',\n  replyTo: 'you@example.com',\n  subject: 'hello world',\n  html: '\u003cstrong\u003eit works!\u003c/strong\u003e',\n});\n\nconsole.log(`Emaill ${data.id} with customer HTML content has been sent.`);\n```\n\n## Send email using React\n\nStart by creating your email template as a React component.\n\n```jsx\nimport React from 'react';\n\nexport default function EmailTemplate({ firstName, product }) {\n  return (\n    \u003cdiv\u003e\n      \u003ch1\u003eWelcome, {firstName}!\u003c/h1\u003e\n      \u003cp\u003eThanks for trying {product}. We’re thrilled to have you on board.\u003c/p\u003e\n    \u003c/div\u003e\n  );\n}\n```\n\nThen import the template component and pass it to the `react` property.\n\n```jsx\nimport EmailTemplate from '../components/EmailTemplate';\n\nconst { data } = await resend.emails.send({\n  from: 'you@example.com',\n  to: 'user@gmail.com',\n  replyTo: 'you@example.com',\n  subject: 'hello world',\n  react: \u003cEmailTemplate firstName=\"John\" product=\"MyApp\" /\u003e,\n});\n\nconsole.log(`Email ${data.id} with a React template has been sent`);\n```\n\n\u003e [!NOTE]\n\u003e If you're sending emails from a file that doesn't have JSX transpilation set up (e.g., in a `.js`/`.ts` file instead of JSX/TSX), use React's `jsx` runtime function instead of passing the component as JSX:\n\u003e\n\u003e```js\n\u003eimport { jsx } from 'react/jsx-runtime'\n\u003eimport EmailTemplate from '../components/EmailTemplate';\n\u003e\n\u003eawait resend.emails.send({\n\u003e  from: 'you@example.com',\n\u003e  to: 'user@gmail.com',\n\u003e  replyTo: 'you@example.com',\n\u003e  subject: 'hello world',\n\u003e  react: jsx(EmailTemplate, { firstName:\"John\", product:\"MyApp\" }),\n\u003e});\n\u003e```\n\n## License\n\nMIT License\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fresend%2Fresend-node","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fresend%2Fresend-node","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fresend%2Fresend-node/lists"}