Releases: resend/resend-java
v4.11.0
What's Changed
- feat: Add segments and topics to sub services by @kewynakshlley in #77
- feat: Update contact properties attributes by @kewynakshlley in #79
- chore: Bump to v4.11.0 by @kewynakshlley in #80
Full Changelog: v4.10.0...v4.11.0
v4.10.0
What's Changed
- chore: Bump to v4.9.0 by @kewynakshlley in #74
- feat: add global contacts methods by @kewynakshlley in #75
- chore: Bump to v4.10.0 by @kewynakshlley in #76
Full Changelog: v4.9.0...v4.10.0
v4.9.0
What's New in v4.9.0
New Features
- Segments API: Introduce the /segment API endpoints (#72)
- Contact Properties Module: Add contact properties module (#70)
- Contact Topics: Add update and list methods for contact topics (#66)
- Template Support: Update send and batch email methods to support templates (#71)
- Webhooks Module (beta): Implement Webhooks module (#62)
- Inbound Emails (beta): Add inbound emails support (#65)
- Topics Module (beta): Implement topics module (#64)
- Templates Module (beta): Implement templates module (#63)
Improvements
- Stable release of features from alpha versions
Full Changelog: v4.8.0...v4.9.0
This is a major stable release with lots of new features! 🎉
v4.9.0-alpha.2
What's Changed
Features
- feat: introduce the /segment API endpoints (#72)
- feat: add contact properties module (#70)
- feat: Add update and list methods for contact topics (#66)
- feat: update send and batch email method to also support templates (#71)
Chores
- chore: Bump to v4.9.0-alpha.2 (#73)
Full Changelog: v4.9.0-alpha.1...v4.9.0-alpha.2
v4.9.0-alpha.1 - Beta Modules (Alpha Release)
v4.9.0-alpha.1 - Beta Modules (Alpha Release)
What's New
This alpha release includes four new beta modules for early testing and feedback.
✨ Templates Module (Beta)
Manage email templates programmatically:
Resend resend = new Resend("re_...");
// Create template
CreateTemplateOptions options = CreateTemplateOptions.builder()
.name("Welcome Email")
.html("<h1>Welcome {{name}}!</h1>")
.build();
resend.templates().create(options);
// Get template
resend.templates().get("template_id");
// List templates
resend.templates().list();
// Update template
resend.templates().update("template_id", updateOptions);
// Delete template
resend.templates().remove("template_id");✨ Topics Module (Beta)
Manage subscription topics:
Resend resend = new Resend("re_...");
// Create topic
CreateTopicOptions options = CreateTopicOptions.builder()
.name("Product Updates")
.description("Latest product news")
.build();
resend.topics().create(options);
// Get topic
resend.topics().get("topic_id");
// List topics
resend.topics().list();
// Update topic
resend.topics().update("topic_id", updateOptions);
// Remove topic
resend.topics().remove("topic_id");✨ Inbound Emails (Beta)
Receive and process inbound emails:
Resend resend = new Resend("re_...");
// List received emails
ListReceivedEmailsResponse emails = resend.receiving().list();
// Get received email
ReceivedEmail email = resend.receiving().get("email_id");
// Get attachment
Attachment attachment = resend.receiving().getAttachment("email_id", "attachment_id");
// List attachments
List<Attachment> attachments = resend.receiving().listAttachments("email_id");✨ Webhooks Module (Beta)
Manage and verify webhooks (also available in stable v4.8.0):
Resend resend = new Resend("re_...");
// Create webhook
CreateWebhookOptions options = CreateWebhookOptions.builder()
.url("https://example.com/webhook")
.events(WebhookEvent.EMAIL_SENT, WebhookEvent.EMAIL_DELIVERED)
.build();
resend.webhooks().create(options);
// Verify webhook signature
VerifyWebhookOptions verifyOptions = VerifyWebhookOptions.builder()
.payload(requestBody)
.signature(signatureHeader)
.secret(webhookSecret)
.build();
resend.webhooks().verify(verifyOptions);
// List, get, update, remove webhooks
resend.webhooks().list();
resend.webhooks().get("webhook_id");
resend.webhooks().update("webhook_id", updateOptions);
resend.webhooks().remove("webhook_id");Installation
Add this dependency to your project:
Maven:
<dependency>
<groupId>com.resend</groupId>
<artifactId>resend-java</artifactId>
<version>4.9.0-alpha.1</version>
</dependency>Gradle:
implementation 'com.resend:resend-java:4.9.0-alpha.1'Important Notes
⚠️ Alpha Release: These APIs are in active development and may have breaking changes- 🔒 Not for Production: Use stable v4.8.0 for production environments
- 📝 Feedback Welcome: Please report any issues or suggestions
Commits
- 0d912e8 feat: Implement templates module (beta) (#63)
- 1ea3155 feat: Implement topics module (beta) (#64)
- 464efd7 feat: Inbound emails (beta) (#65)
- e2289d1 feat: Implement Webhooks module (beta) (#62)
Full Changelog
v4.8.0
v4.8.0 - Webhooks Module
What's New
Webhooks Module
Manage and verify webhooks to receive real-time notifications about email events, contacts, and domains.
Create a Webhook
Resend resend = new Resend("re_...");
CreateWebhookOptions options = CreateWebhookOptions.builder()
.url("https://example.com/webhook")
.events(WebhookEvent.EMAIL_SENT, WebhookEvent.EMAIL_DELIVERED)
.build();
CreateWebhookResponseSuccess webhook = resend.webhooks().create(options);List Webhooks
// List all webhooks
ListWebhooksResponseSuccess webhooks = resend.webhooks().list();
// List with pagination
ListParams params = ListParams.builder()
.limit(10)
.build();
ListWebhooksResponseSuccess webhooks = resend.webhooks().list(params);Get a Webhook
GetWebhookResponseSuccess webhook = resend.webhooks().get("webhook_id");Update a Webhook
UpdateWebhookOptions updateOptions = UpdateWebhookOptions.builder()
.events(WebhookEvent.EMAIL_BOUNCED, WebhookEvent.EMAIL_FAILED)
.build();
UpdateWebhookResponseSuccess updated = resend.webhooks().update("webhook_id", updateOptions);Remove a Webhook
RemoveWebhookResponseSuccess removed = resend.webhooks().remove("webhook_id");Verify Webhook Signature
VerifyWebhookOptions verifyOptions = VerifyWebhookOptions.builder()
.payload(requestBody)
.signature(signatureHeader)
.secret(webhookSecret)
.build();
resend.webhooks().verify(verifyOptions);Supported Webhook Events
The Webhooks module supports the following events:
Email Events:
EMAIL_SENT- Email was sentEMAIL_DELIVERED- Email was deliveredEMAIL_DELIVERY_DELAYED- Email delivery was delayedEMAIL_COMPLAINED- Recipient marked email as spamEMAIL_BOUNCED- Email bouncedEMAIL_OPENED- Email was openedEMAIL_CLICKED- Link in email was clickedEMAIL_RECEIVED- Inbound email was receivedEMAIL_FAILED- Email failed to send
Contact Events:
CONTACT_CREATED- Contact was createdCONTACT_UPDATED- Contact was updatedCONTACT_DELETED- Contact was deleted
Domain Events:
DOMAIN_CREATED- Domain was createdDOMAIN_UPDATED- Domain was updatedDOMAIN_DELETED- Domain was deleted
Note: The Webhooks API is currently in beta.
Breaking Changes
None
Commits
Full Changelog
v4.7.0
What's Changed
- feat: Add html/text columns for broadcasts by @kewynakshlley in #60
- fix: Inconsistent exception handling and lack of structured status code by @kewynakshlley in #59
- feat: Batch validation by @kewynakshlley in #57
- chore: Bump to v4.7.0 by @kewynakshlley in #61
Full Changelog: v4.5.0...v4.7.0