{"_id":"@humanlayer/pulumi-resend","_rev":"6-94691b8737545e4681ead369cabd24db","name":"@humanlayer/pulumi-resend","dist-tags":{"beta":"0.1.0-dev","latest":"0.3.3"},"versions":{"0.1.0-dev":{"name":"@humanlayer/pulumi-resend","version":"0.1.0-dev","keywords":["pulumi","resend","email","infrastructure-as-code"],"license":"MIT","_id":"@humanlayer/pulumi-resend@0.1.0-dev","maintainers":[{"name":"kylelayer","email":"kyle@humanlayer.dev"},{"name":"dexhorthy-humanlayer","email":"dexter@humanlayer.dev"}],"homepage":"https://github.com/humanlayer/pulumi-resend","bugs":{"url":"https://github.com/humanlayer/pulumi-resend/issues"},"dist":{"shasum":"b0bb2b059b8e6c3e5721a791aa0b9dc2e5dbd789","tarball":"https://registry.npmjs.org/@humanlayer/pulumi-resend/-/pulumi-resend-0.1.0-dev.tgz","fileCount":62,"integrity":"sha512-hJTqWZAQfpuy7OcbC56fQD62Nb1T3ihcmSB5MwwyZ9xymm41KYg8e+AigsWIGCvQnPgIlGOyse2cNzcsJxsMFQ==","signatures":[{"sig":"MEUCIAgn1E9toEKsElJko872+YRBi8PtrukBLDJsg1kIKBidAiEAsnDrmRq4cE69GFIobUo0y7sCQsz+ajOG+Ombz/XdVxg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":98660},"types":"./index.d.ts","pulumi":{"name":"resend","server":"github://api.github.com/humanlayer/pulumi-resend","resource":true},"gitHead":"f50ae457d51921f8d378c1edfefad5bb0c84f70d","scripts":{"build":"tsc"},"_npmUser":{"name":"kylelayer","email":"kyle@humanlayer.dev"},"repository":{"url":"git+https://github.com/humanlayer/pulumi-resend.git","type":"git"},"_npmVersion":"11.12.1","description":"A Pulumi provider for managing Resend email resources","directories":{},"_nodeVersion":"25.9.0","dependencies":{"@pulumi/pulumi":"^3.142.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^4.7.0","@types/node":"^20"},"_npmOperationalInternal":{"tmp":"tmp/pulumi-resend_0.1.0-dev_1779480946245_0.6724982044346963","host":"s3://npm-registry-packages-npm-production"}},"0.1.0":{"name":"@humanlayer/pulumi-resend","version":"0.1.0","keywords":["pulumi","resend","email","infrastructure-as-code"],"license":"MIT","_id":"@humanlayer/pulumi-resend@0.1.0","maintainers":[{"name":"kylelayer","email":"kyle@humanlayer.dev"},{"name":"dexhorthy-humanlayer","email":"dexter@humanlayer.dev"}],"homepage":"https://github.com/humanlayer/pulumi-resend","bugs":{"url":"https://github.com/humanlayer/pulumi-resend/issues"},"dist":{"shasum":"8684e355e17ac0955e49cf5f31fce256084ab3e8","tarball":"https://registry.npmjs.org/@humanlayer/pulumi-resend/-/pulumi-resend-0.1.0.tgz","fileCount":64,"integrity":"sha512-Me88OMonwxwCecK2GSp57Yvnkd+HmpxTYGOGPR+3XZUuompKokbAg3uiVeEqrPzvTtPzODwMHJSM+C3MSxQ23A==","signatures":[{"sig":"MEYCIQD6SEz8jZzoQ7xdVjdHL8EyOHsNIUtOeY/CPXHaPwcdxgIhAKyq7GqLtXbj7AFTb+zrdF3+hok7CecJDdYnzAO2uiHK","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@humanlayer%2fpulumi-resend@0.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":114468},"types":"./index.d.ts","pulumi":{"name":"resend","version":"0.1.0-dev","resource":true},"gitHead":"65bf78d0d0d90559c434b572e2adfc883f78632e","scripts":{"build":"tsc"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:01d4ff73-ef5b-48a1-aebd-54afffc8c8d0"}},"repository":{"url":"git+https://github.com/humanlayer/pulumi-resend.git","type":"git"},"_npmVersion":"11.15.0","description":"A Pulumi provider for managing Resend email resources","directories":{},"_nodeVersion":"22.22.3","dependencies":{"@pulumi/pulumi":"^3.142.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^4.7.0","@types/node":"^20"},"_npmOperationalInternal":{"tmp":"tmp/pulumi-resend_0.1.0_1779487105732_0.834942417155887","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@humanlayer/pulumi-resend","version":"0.2.0","keywords":["pulumi","resend","email","infrastructure-as-code"],"license":"MIT","_id":"@humanlayer/pulumi-resend@0.2.0","maintainers":[{"name":"kylelayer","email":"kyle@humanlayer.dev"},{"name":"dexhorthy-humanlayer","email":"dexter@humanlayer.dev"}],"homepage":"https://github.com/humanlayer/pulumi-resend","bugs":{"url":"https://github.com/humanlayer/pulumi-resend/issues"},"dist":{"shasum":"9deec6728953f916db139023e30c150e8db2ef05","tarball":"https://registry.npmjs.org/@humanlayer/pulumi-resend/-/pulumi-resend-0.2.0.tgz","fileCount":96,"integrity":"sha512-Z5lwyweLQ8MbPxDkC67it35TRjujEdbcJG0s+FzXYwQmfCVx374Rd7+m68/IpjfR4RTNGs4xTe1MH8kjTfBYqw==","signatures":[{"sig":"MEYCIQD5wsG68wSu2ukpasDJfNm0fYqwe3mpPaBQD0wXvZsUogIhAL41Mn7IRVWI3ZkAMPQsVT69EHISGrNYJMayyDk/aX5O","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@humanlayer%2fpulumi-resend@0.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":227604},"types":"./index.d.ts","pulumi":{"name":"resend","server":"github://api.github.com/humanlayer/pulumi-resend","version":"0.2.0","resource":true},"gitHead":"187995c703a70c16e3bed710daa792fa69ec78ae","scripts":{"build":"tsc"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:01d4ff73-ef5b-48a1-aebd-54afffc8c8d0"}},"repository":{"url":"git+https://github.com/humanlayer/pulumi-resend.git","type":"git"},"_npmVersion":"11.15.0","description":"A Pulumi provider for managing Resend email resources","directories":{},"_nodeVersion":"22.22.3","dependencies":{"@pulumi/pulumi":"^3.142.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^4.7.0","@types/node":"^20"},"_npmOperationalInternal":{"tmp":"tmp/pulumi-resend_0.2.0_1779579297906_0.8569282073710254","host":"s3://npm-registry-packages-npm-production"}},"0.3.1":{"name":"@humanlayer/pulumi-resend","version":"0.3.1","keywords":["pulumi","resend","email","infrastructure-as-code"],"license":"MIT","_id":"@humanlayer/pulumi-resend@0.3.1","maintainers":[{"name":"kylelayer","email":"kyle@humanlayer.dev"},{"name":"dexhorthy-humanlayer","email":"dexter@humanlayer.dev"}],"homepage":"https://github.com/humanlayer/pulumi-resend","bugs":{"url":"https://github.com/humanlayer/pulumi-resend/issues"},"dist":{"shasum":"2b31590d93308b6eafce7b56e2f1423b1c614529","tarball":"https://registry.npmjs.org/@humanlayer/pulumi-resend/-/pulumi-resend-0.3.1.tgz","fileCount":96,"integrity":"sha512-HMRKgEtPEBUy66cYMS57I1lIBtTIq03wcnV33VZxK22oRQE9bYqpV7gD8dXMQqfWHddY1fuMvkwJ5NgvRhanWg==","signatures":[{"sig":"MEQCIHepMUmFhbObn6juHpvYHoS273qmV2YroMdR6GLWjzI/AiByKjRFM6k0Plntdj8J4gDHUbpAccAi0G0uJ7SVtQTCUg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@humanlayer%2fpulumi-resend@0.3.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":228476},"types":"./index.d.ts","pulumi":{"name":"resend","server":"github://api.github.com/humanlayer/pulumi-resend","version":"0.2.0","resource":true},"gitHead":"87e01145cfc87e188d56f67fda09af4fadb13072","scripts":{"build":"tsc"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:01d4ff73-ef5b-48a1-aebd-54afffc8c8d0"}},"repository":{"url":"git+https://github.com/humanlayer/pulumi-resend.git","type":"git"},"_npmVersion":"11.16.0","description":"A Pulumi provider for managing Resend email resources","directories":{},"_nodeVersion":"22.22.3","dependencies":{"@pulumi/pulumi":"^3.142.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^4.7.0","@types/node":"^20"},"_npmOperationalInternal":{"tmp":"tmp/pulumi-resend_0.3.1_1780178045018_0.8880715769012446","host":"s3://npm-registry-packages-npm-production"}},"0.3.2":{"name":"@humanlayer/pulumi-resend","version":"0.3.2","keywords":["pulumi","resend","email","infrastructure-as-code"],"license":"MIT","_id":"@humanlayer/pulumi-resend@0.3.2","maintainers":[{"name":"kylelayer","email":"kyle@humanlayer.dev"},{"name":"dexhorthy-humanlayer","email":"dexter@humanlayer.dev"}],"homepage":"https://github.com/humanlayer/pulumi-resend","bugs":{"url":"https://github.com/humanlayer/pulumi-resend/issues"},"dist":{"shasum":"e74203ec9ce17b30472c5916f1adedc98bdd97c5","tarball":"https://registry.npmjs.org/@humanlayer/pulumi-resend/-/pulumi-resend-0.3.2.tgz","fileCount":96,"integrity":"sha512-yjDORHq+C8jTI6Ld7H9nVC+OviUBpZdkBQd6AobJGdMouvRpfq3Ss0QWCJmOmHCaAJSetwx2RUt7IympAn+QXA==","signatures":[{"sig":"MEYCIQCjlUvdaRksogelVGZEgBS07IZ/vNffW+51Jc7vtTey7QIhAIFE4lbS2wAaxLJZhO7gZg/y+lO8fZAuWN3khWdjH6K3","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@humanlayer%2fpulumi-resend@0.3.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":228600},"types":"./index.d.ts","pulumi":{"name":"resend","server":"github://api.github.com/humanlayer/pulumi-resend","version":"0.3.2","resource":true},"gitHead":"76dba888448fd3339b33aeec363e6f6245b10e35","scripts":{"build":"tsc"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:01d4ff73-ef5b-48a1-aebd-54afffc8c8d0"}},"repository":{"url":"git+https://github.com/humanlayer/pulumi-resend.git","type":"git"},"_npmVersion":"11.16.0","description":"A Pulumi provider for managing Resend email resources","directories":{},"_nodeVersion":"22.22.3","dependencies":{"@pulumi/pulumi":"^3.142.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^4.7.0","@types/node":"^20"},"_npmOperationalInternal":{"tmp":"tmp/pulumi-resend_0.3.2_1780373029985_0.976342456951282","host":"s3://npm-registry-packages-npm-production"}},"0.3.3":{"name":"@humanlayer/pulumi-resend","version":"0.3.3","scripts":{"build":"tsc"},"dependencies":{"@pulumi/pulumi":"^3.142.0"},"devDependencies":{"@types/node":"^20","typescript":"^4.7.0"},"pulumi":{"resource":true,"name":"resend","version":"0.3.3","server":"github://api.github.com/humanlayer/pulumi-resend"},"description":"A Pulumi provider for managing Resend email resources","keywords":["pulumi","resend","email","infrastructure-as-code"],"homepage":"https://github.com/humanlayer/pulumi-resend","repository":{"type":"git","url":"git+https://github.com/humanlayer/pulumi-resend.git"},"license":"MIT","publishConfig":{"access":"public"},"gitHead":"f0360f223b0645dbdc292d0c7acb6a0b4c610b54","types":"./index.d.ts","_id":"@humanlayer/pulumi-resend@0.3.3","bugs":{"url":"https://github.com/humanlayer/pulumi-resend/issues"},"_nodeVersion":"22.22.3","_npmVersion":"11.17.0","dist":{"integrity":"sha512-iCW85fE3VxzDlqEHA2LjuPefO+icNZDcY9E0hXdZe3VrEuY0wUcfqcvYJfKKvLcor054VJZmejsUlFr/+I5fmg==","shasum":"7946ae14793c617818ff8076d78a032f5b60bdee","tarball":"https://registry.npmjs.org/@humanlayer/pulumi-resend/-/pulumi-resend-0.3.3.tgz","fileCount":96,"unpackedSize":229596,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@humanlayer%2fpulumi-resend@0.3.3","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCICK/owmDu3GLVEoPtjgR5KRtjMBQR2SPnle5HudmdPAbAiAkn49q6LrMmhWcJ0WzGRPKbnouhYBCGxSjcD7yw49SNg=="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:01d4ff73-ef5b-48a1-aebd-54afffc8c8d0"}},"directories":{},"maintainers":[{"name":"kylelayer","email":"kyle@humanlayer.dev"},{"name":"dexhorthy-humanlayer","email":"dexter@humanlayer.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/pulumi-resend_0.3.3_1781656880590_0.5348140739882494"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-22T20:15:45.944Z","modified":"2026-06-17T00:41:21.051Z","0.1.0-dev":"2026-05-22T20:15:46.383Z","0.1.0":"2026-05-22T21:58:25.872Z","0.2.0":"2026-05-23T23:34:58.065Z","0.3.1":"2026-05-30T21:54:05.167Z","0.3.2":"2026-06-02T04:03:50.164Z","0.3.3":"2026-06-17T00:41:20.733Z"},"bugs":{"url":"https://github.com/humanlayer/pulumi-resend/issues"},"license":"MIT","homepage":"https://github.com/humanlayer/pulumi-resend","keywords":["pulumi","resend","email","infrastructure-as-code"],"repository":{"type":"git","url":"git+https://github.com/humanlayer/pulumi-resend.git"},"description":"A Pulumi provider for managing Resend email resources","maintainers":[{"name":"kylelayer","email":"kyle@humanlayer.dev"},{"name":"dexhorthy-humanlayer","email":"dexter@humanlayer.dev"}],"readme":"# Pulumi Resend Provider\n\nA native Pulumi provider for managing [Resend](https://resend.com) email infrastructure as code.\n\n## Installation\n\n### TypeScript/JavaScript\n\n```bash\nnpm install @humanlayer/pulumi-resend\n```\n\n### Provider Binary\n\nThe provider binary is automatically downloaded from GitHub releases when you run `pulumi up`.\n\n## Configuration\n\nSet your Resend API key via environment variable or Pulumi config:\n\n```bash\nexport RESEND_API_KEY=re_xxxxx\n# or\npulumi config set resend:apiKey re_xxxxx --secret\n```\n\n## Usage\n\n### Domain\n\nCreate and manage email sending domains:\n\n```typescript\nimport * as resend from \"@humanlayer/pulumi-resend\";\n\nconst domain = new resend.Domain(\"my-domain\", {\n    name: \"mail.example.com\",\n    region: \"us-east-1\",\n});\n\nexport const domainId = domain.id;\nexport const dnsRecords = domain.records;\n```\n\n### Domain Verification\n\nTrigger DNS verification for a domain:\n\n```typescript\nconst verification = new resend.DomainVerification(\"verify\", {\n    domainId: domain.id,\n});\n\nexport const verificationStatus = verification.status;\n```\n\n### API Key\n\nCreate API keys for sending emails:\n\n```typescript\nconst apiKey = new resend.ApiKey(\"sending-key\", {\n    name: \"production-sender\",\n    permission: \"sending_access\",\n});\n\nexport const keyId = apiKey.id;\nexport const token = apiKey.token; // marked as secret\n```\n\n### Template\n\nCreate reusable email templates:\n\n```typescript\nconst template = new resend.Template(\"welcome\", {\n    name: \"welcome-email\",\n    subject: \"Welcome to our service!\",\n    html: \"<h1>Welcome {{name}}!</h1><p>Thanks for signing up.</p>\",\n});\n\nexport const templateId = template.id;\n```\n\n### Webhook\n\nSet up webhooks for email events:\n\n```typescript\nconst webhook = new resend.Webhook(\"events\", {\n    endpoint: \"https://api.example.com/webhooks/resend\",\n    events: [\"email.sent\", \"email.delivered\", \"email.bounced\"],\n});\n\nexport const webhookId = webhook.id;\n```\n\n### Send Email (Function)\n\nSend emails directly via Pulumi:\n\n```typescript\nconst result = resend.sendEmail({\n    from: \"hello@mail.example.com\",\n    to: [\"user@example.com\"],\n    subject: \"Hello from Pulumi!\",\n    html: \"<p>This email was sent via infrastructure as code.</p>\",\n});\n\nexport const emailId = result.then(r => r.emailId);\n```\n\n> **Note**: `sendEmail` is a function (invoke), not a resource. It executes on every `pulumi up` and doesn't maintain state.\n\n### Topic\n\nManage subscription topics that control contact email preferences:\n\n```typescript\nimport * as resend from \"@humanlayer/pulumi-resend\";\n\nconst newsletter = new resend.Topic(\"newsletter\", {\n    name: \"Newsletter\",\n    defaultSubscription: \"opt_in\",\n    description: \"Weekly product updates\",\n    visibility: \"public\",\n});\n\nexport const topicId = newsletter.id;\n```\n\n**Notes:**\n- `defaultSubscription` is immutable after creation; changes require replacement\n- `name`, `description`, and `visibility` can be updated in place\n\n### Event\n\nDefine custom event types that trigger automations:\n\n```typescript\nimport * as resend from \"@humanlayer/pulumi-resend\";\n\nconst userCreated = new resend.Event(\"userCreated\", {\n    name: \"user.created\",\n    schema: {\n        user_id: \"string\",\n        plan: \"string\",\n        trial_days: \"number\",\n    },\n});\n\nexport const eventId = userCreated.id;\n```\n\n**Notes:**\n- Event `name` is immutable; changes require replacement\n- `schema` can be updated in place\n- Names must not start with `resend:` (reserved prefix)\n\n### ContactProperty\n\nDefine custom fields on contacts:\n\n```typescript\nimport * as resend from \"@humanlayer/pulumi-resend\";\n\nconst companyName = new resend.ContactProperty(\"companyName\", {\n    key: \"company_name\",\n    type: \"string\",\n    fallbackValue: \"Unknown\",\n});\n\nexport const propertyId = companyName.id;\n```\n\n**Notes:**\n- `key` and `type` are immutable; changes require replacement\n- Only `fallbackValue` can be updated in place\n- Key must be alphanumeric with underscores, max 50 characters\n\n### Segment\n\nCreate contact segments for targeted broadcasts:\n\n```typescript\nimport * as resend from \"@humanlayer/pulumi-resend\";\n\nconst activeUsers = new resend.Segment(\"activeUsers\", {\n    name: \"Active Users\",\n});\n\nexport const segmentId = activeUsers.id;\n```\n\n**Notes:**\n- Segments are immutable after creation (no update API)\n- Any change to inputs requires delete and recreate\n\n### Automation\n\nCreate multi-step email automation workflows:\n\n```typescript\nimport * as resend from \"@humanlayer/pulumi-resend\";\n\nconst template = new resend.Template(\"welcome\", {\n    name: \"Welcome Email\",\n    html: \"<h1>Welcome!</h1><p>Thanks for signing up.</p>\",\n});\n\nconst automation = new resend.Automation(\"welcomeSequence\", {\n    name: \"Welcome Sequence\",\n    status: \"disabled\",\n    steps: [\n        {\n            key: \"trigger\",\n            type: \"trigger\",\n            config: { event_name: \"user.created\" },\n        },\n        {\n            key: \"send_welcome\",\n            type: \"send_email\",\n            config: {\n                template: { id: template.id },\n                subject: \"Welcome aboard!\",\n            },\n        },\n        {\n            key: \"wait_3_days\",\n            type: \"delay\",\n            config: { duration: \"3 days\" },\n        },\n    ],\n    connections: [\n        { from: \"trigger\", to: \"send_welcome\" },\n        { from: \"send_welcome\", to: \"wait_3_days\" },\n    ],\n});\n\nexport const automationId = automation.id;\n```\n\n**Step types:** `trigger`, `send_email`, `delay`, `wait_for_event`, `condition`, `contact_update`, `contact_delete`, `add_to_segment`\n\n**Connection types:** `default`, `condition_met`, `condition_not_met`, `timeout`, `event_received`\n\n### Send Batch Email (Function)\n\nSend up to 100 emails in a single API call:\n\n```typescript\nimport * as resend from \"@humanlayer/pulumi-resend\";\n\nconst result = await resend.sendBatchEmail({\n    emails: [\n        {\n            from: \"hello@mail.example.com\",\n            to: [\"user1@example.com\"],\n            subject: \"Hello User 1\",\n            html: \"<p>Hello!</p>\",\n        },\n        {\n            from: \"hello@mail.example.com\",\n            to: [\"user2@example.com\"],\n            subject: \"Hello User 2\",\n            html: \"<p>Hello!</p>\",\n        },\n    ],\n});\n```\n\n### Send Event (Function)\n\nTrigger custom events for automations:\n\n```typescript\nimport * as resend from \"@humanlayer/pulumi-resend\";\n\nconst result = await resend.sendEvent({\n    event: \"user.created\",\n    email: \"newuser@example.com\",\n    payload: {\n        plan: \"pro\",\n        trial_days: 14,\n    },\n});\n```\n\n**Notes:**\n- Exactly one of `contactId` or `email` must be provided\n\n### Send Broadcast (Function)\n\nCreate and send a one-time email campaign to a segment:\n\n```typescript\nimport * as resend from \"@humanlayer/pulumi-resend\";\n\nconst customers = new resend.Segment(\"customers\", {\n    name: \"All Customers\",\n});\n\nconst result = await resend.sendBroadcast({\n    from: \"updates@mail.example.com\",\n    subject: \"Important Announcement\",\n    segmentId: customers.id,\n    html: \"<p>Hello!</p>\",\n    previewText: \"We have exciting news...\",\n});\n```\n\n**Notes:**\n- Creates and sends the broadcast atomically\n- Supports scheduled sending via `scheduledAt` (ISO 8601 timestamp)\n\n## Examples\n\n### Complete Email Platform Setup\n\nSet up a full email platform with domain verification, templates, topics, and automation:\n\n```typescript\nimport * as resend from \"@humanlayer/pulumi-resend\";\n\n// 1. Domain with tracking enabled\nconst domain = new resend.Domain(\"mail\", {\n    name: \"mail.example.com\",\n    region: \"us-east-1\",\n    openTracking: true,\n    clickTracking: true,\n});\n\n// 2. Verify the domain (polls until DNS records are confirmed)\nconst verification = new resend.DomainVerification(\"verify\", {\n    domainId: domain.id,\n});\n\n// 3. Scoped API key for sending only\nconst sendingKey = new resend.ApiKey(\"sender\", {\n    name: \"production-sender\",\n    permission: \"sending_access\",\n    domainId: domain.id,\n});\n\n// 4. Subscription topics\nconst newsletter = new resend.Topic(\"newsletter\", {\n    name: \"Newsletter\",\n    defaultSubscription: \"opt_in\",\n    description: \"Weekly product updates and tips\",\n    visibility: \"public\",\n});\n\nconst marketing = new resend.Topic(\"marketing\", {\n    name: \"Marketing\",\n    defaultSubscription: \"opt_out\",\n    description: \"Promotional offers and announcements\",\n    visibility: \"public\",\n});\n\n// 5. Contact properties for personalization\nconst companyName = new resend.ContactProperty(\"company\", {\n    key: \"company_name\",\n    type: \"string\",\n    fallbackValue: \"there\",\n});\n\nconst plan = new resend.ContactProperty(\"plan\", {\n    key: \"plan\",\n    type: \"string\",\n    fallbackValue: \"free\",\n});\n\n// 6. Webhook for delivery tracking\nconst webhook = new resend.Webhook(\"delivery-events\", {\n    endpoint: \"https://api.example.com/webhooks/resend\",\n    events: [\n        \"email.sent\",\n        \"email.delivered\",\n        \"email.bounced\",\n        \"email.complained\",\n        \"email.opened\",\n        \"email.clicked\",\n    ],\n});\n\nexport const domainId = domain.id;\nexport const dnsRecords = domain.records;\nexport const apiKeyToken = sendingKey.token;\n```\n\n### Welcome Email Automation\n\nBuild a multi-step onboarding sequence triggered when users sign up:\n\n```typescript\nimport * as resend from \"@humanlayer/pulumi-resend\";\n\n// Define the trigger event\nconst signupEvent = new resend.Event(\"signup\", {\n    name: \"user.signup\",\n    schema: {\n        first_name: \"string\",\n        plan: \"string\",\n        trial_days: \"number\",\n    },\n});\n\n// Create email templates\nconst welcomeTemplate = new resend.Template(\"welcome\", {\n    name: \"Welcome Email\",\n    subject: \"Welcome to Example, {{first_name}}!\",\n    from: \"hello@mail.example.com\",\n    html: `\n        <h1>Welcome, {{first_name}}!</h1>\n        <p>Thanks for joining us on the {{plan}} plan.</p>\n        <p>You have {{trial_days}} days to explore everything.</p>\n    `,\n});\n\nconst tipsTemplate = new resend.Template(\"tips\", {\n    name: \"Getting Started Tips\",\n    subject: \"3 tips to get the most out of Example\",\n    from: \"hello@mail.example.com\",\n    html: \"<h1>Pro tips for you</h1><p>Here's how to get started...</p>\",\n});\n\nconst checkInTemplate = new resend.Template(\"checkin\", {\n    name: \"Check-in Email\",\n    subject: \"How's it going, {{first_name}}?\",\n    from: \"hello@mail.example.com\",\n    html: \"<h1>Hey {{first_name}}</h1><p>Just checking in...</p>\",\n});\n\n// Build the automation workflow\nconst onboarding = new resend.Automation(\"onboarding\", {\n    name: \"New User Onboarding\",\n    status: \"enabled\",\n    steps: [\n        {\n            key: \"trigger\",\n            type: \"trigger\",\n            config: { event_name: \"user.signup\" },\n        },\n        {\n            key: \"welcome\",\n            type: \"send_email\",\n            config: {\n                template: { id: welcomeTemplate.id },\n            },\n        },\n        {\n            key: \"wait_2_days\",\n            type: \"delay\",\n            config: { duration: \"2 days\" },\n        },\n        {\n            key: \"tips\",\n            type: \"send_email\",\n            config: {\n                template: { id: tipsTemplate.id },\n            },\n        },\n        {\n            key: \"wait_5_days\",\n            type: \"delay\",\n            config: { duration: \"5 days\" },\n        },\n        {\n            key: \"checkin\",\n            type: \"send_email\",\n            config: {\n                template: { id: checkInTemplate.id },\n            },\n        },\n    ],\n    connections: [\n        { from: \"trigger\", to: \"welcome\" },\n        { from: \"welcome\", to: \"wait_2_days\" },\n        { from: \"wait_2_days\", to: \"tips\" },\n        { from: \"tips\", to: \"wait_5_days\" },\n        { from: \"wait_5_days\", to: \"checkin\" },\n    ],\n});\n\n// Trigger the automation for a new user (invoke)\nconst triggerSignup = resend.sendEvent({\n    event: \"user.signup\",\n    email: \"newuser@example.com\",\n    payload: {\n        first_name: \"Alice\",\n        plan: \"pro\",\n        trial_days: 14,\n    },\n});\n```\n\n### Domain Setup with AWS Route53\n\nUse domain DNS records to configure Route53 automatically:\n\n```typescript\nimport * as resend from \"@humanlayer/pulumi-resend\";\nimport * as aws from \"@pulumi/aws\";\n\nconst domain = new resend.Domain(\"mail\", {\n    name: \"mail.example.com\",\n    region: \"us-east-1\",\n});\n\nconst zone = aws.route53.getZone({ name: \"example.com\" });\n\n// Create DNS records from the domain's output\ndomain.records.apply(records => {\n    records.forEach((rec, i) => {\n        new aws.route53.Record(`dns-${i}`, {\n            zoneId: zone.then(z => z.zoneId),\n            name: rec.name,\n            type: rec.type,\n            records: [rec.value],\n            ttl: parseInt(rec.ttl) || 300,\n        });\n    });\n});\n\n// Verify after DNS records are created\nconst verification = new resend.DomainVerification(\"verify\", {\n    domainId: domain.id,\n});\n```\n\n### Conditional Automation with Branching\n\nCreate an automation with conditional logic based on user properties:\n\n```typescript\nimport * as resend from \"@humanlayer/pulumi-resend\";\n\nconst automation = new resend.Automation(\"trial-followup\", {\n    name: \"Trial Expiry Follow-up\",\n    status: \"enabled\",\n    steps: [\n        {\n            key: \"trigger\",\n            type: \"trigger\",\n            config: { event_name: \"trial.expiring\" },\n        },\n        {\n            key: \"check_plan\",\n            type: \"condition\",\n            config: {\n                type: \"rule\",\n                field: \"plan\",\n                operator: \"equals\",\n                value: \"enterprise\",\n            },\n        },\n        {\n            key: \"enterprise_email\",\n            type: \"send_email\",\n            config: {\n                template: { id: \"tmpl_enterprise_upsell\" },\n                subject: \"Your enterprise trial is ending soon\",\n            },\n        },\n        {\n            key: \"standard_email\",\n            type: \"send_email\",\n            config: {\n                template: { id: \"tmpl_standard_upsell\" },\n                subject: \"Upgrade before your trial ends\",\n            },\n        },\n    ],\n    connections: [\n        { from: \"trigger\", to: \"check_plan\" },\n        { from: \"check_plan\", to: \"enterprise_email\", type: \"condition_met\" },\n        { from: \"check_plan\", to: \"standard_email\", type: \"condition_not_met\" },\n    ],\n});\n```\n\n### Importing Existing Resources\n\nImport existing Resend resources into Pulumi state:\n\n```bash\n# Import an existing domain\npulumi import resend:index:Domain myDomain d_abc123\n\n# Import an existing API key\npulumi import resend:index:ApiKey myKey ak_xyz789\n\n# Import an existing webhook\npulumi import resend:index:Webhook myWebhook wh_def456\n\n# Import an existing template\npulumi import resend:index:Template myTemplate tmpl_ghi789\n```\n\n### YAML Example\n\n```yaml\nname: resend-email-infra\nruntime: yaml\n\nresources:\n  domain:\n    type: resend:index:Domain\n    properties:\n      name: mail.example.com\n      region: us-east-1\n      openTracking: true\n\n  apiKey:\n    type: resend:index:ApiKey\n    properties:\n      name: my-sending-key\n      permission: sending_access\n\n  newsletter:\n    type: resend:index:Topic\n    properties:\n      name: Newsletter\n      defaultSubscription: opt_in\n      visibility: public\n\n  welcomeTemplate:\n    type: resend:index:Template\n    properties:\n      name: Welcome\n      subject: Welcome!\n      html: \"<h1>Welcome!</h1>\"\n\n  webhook:\n    type: resend:index:Webhook\n    properties:\n      endpoint: https://api.example.com/webhooks/resend\n      events:\n        - email.delivered\n        - email.bounced\n\noutputs:\n  domainId: ${domain.id}\n  dnsRecords: ${domain.records}\n  apiKeyToken: ${apiKey.token}\n```\n\n## Resources\n\n| Resource | Description | Update | Notes |\n|----------|-------------|--------|-------|\n| `Domain` | Email sending domain with DNS records | In-place | `name`/`region` immutable |\n| `DomainVerification` | Triggers DNS verification for a domain | No-op | Idempotent, delete is no-op |\n| `ApiKey` | API key for authentication | Replace | All fields immutable, token is secret |\n| `Template` | Reusable email template | In-place | Full CRUD |\n| `Webhook` | Webhook endpoint for email events | In-place | Full CRUD |\n| `Topic` | Subscription topic for contact preferences | In-place | `defaultSubscription` immutable |\n| `Event` | Custom event type for automation triggers | In-place | `name` immutable, `schema` updatable |\n| `ContactProperty` | Custom field definition on contacts | In-place | `key`/`type` immutable |\n| `Segment` | Contact segment for targeted broadcasts | Replace | No update API |\n| `Automation` | Multi-step email automation workflow | In-place | Steps/connections replaced together |\n\n## Functions\n\n| Function | Description | Notes |\n|----------|-------------|-------|\n| `sendEmail` | Send a single email | Runs on every `pulumi up` |\n| `sendBatchEmail` | Send up to 100 emails in one call | Max 50 recipients per email |\n| `sendEvent` | Trigger a custom event for automations | Requires `contactId` or `email` |\n| `sendBroadcast` | Create and send a broadcast to a segment | Atomic create+send |\n\n## Development\n\n```bash\n# Build the provider\nmake provider\n\n# Generate schema\nmake schema\n\n# Generate TypeScript SDK\nmake codegen\n\n# Run tests\ngo test ./...\n\n# Build and test everything\nmake provider && make schema && make codegen && cd sdk/nodejs && npm install && npm run build\n```\n\n## License\n\nMIT\n","readmeFilename":"README.md"}