Access is invite-only during beta. Once invited, create a key to personalize these examples. Production sending requires a separate review.

Send emails with Java

Install the Java SDK from GitHub and call emails.send.

emails.send posts to POST /api/v1/emails. Pass teamId on Options. GET /users/me does not return one.

send.java
1 PostShiba client = new PostShiba("YOUR_API_KEY", new PostShiba.Options().teamId("KjkAJW"));
2
3 client.emails.send(Map.of(
4 "from", "hello@mail.example.com",
5 "to", List.of("you@example.com"),
6 "subject", "PostShiba test",
7 "text", "hello from PostShiba",
8 "html", "<p>hello from PostShiba</p>"
9 ));

Installation

Not on Maven Central yet. Clone postshiba/postshiba-java and ./mvnw install. Requires Java 17. Open pull requests on postshiba/sdks.

Cluster send can add Idempotency-Key and "sandbox": true.

cluster.java
1 client.emails.sendOnCluster(
2 "NmQpXr",
3 body,
4 new PostShiba.SendOnClusterOptions().idempotencyKey("idem-1").sandbox(true)
5 );

Errors and throttling

Failed responses throw ApiError with error, field, and message.

A 429 with error throttled means the cluster hit its hourly throttle or its 24-hour cap. Do not retry that send immediately. Immediate retries hit the same cap.

The client does not delay for you. In a queued worker, catch ApiError and check e.error.equals("throttled") before sending again.

See Errors.

About

PostShiba is the email platform that powers Bento behind the scenes. You can build your own products, like Bento, on top of it.

© 2026 PostShiba by Backpack Internet Pty. Ltd. All rights reserved.

The same policies that govern Bento are applied to PostShiba Privacy | Terms | Security