com.sendflit:sendflit artifact. It uses the JDK’s built-in HttpClient and has no third-party dependencies. It requires Java 17 or later.
Looking for another language? See the SDK overview.
Install
Maven:Create a client
Use the builder. Read your key from the environment.Send an email
Build anEmail with its builder, then pass it to send. send returns a SendResult.
Attachments
Useattach. It takes the file’s bytes and base64-encodes them for you.
- Up to 10 attachments per message.
- Up to 10 MB per attachment. Larger files are rejected with
422.
Send a batch
batch sends up to 100 emails in one request and returns a List<SendResult> in the same order as your input.
IllegalArgumentException before any request is made. See Batch sending.
Manage emails
The Java SDK can list emails. It doesn’t have methods to get or cancel a single email yet. UseGET /v1/emails/{id} or DELETE /v1/emails/{id} directly if you need them.
Domains
Suppressions
Usage
GET /health directly if you need one.
Verify webhooks
SendFlit signs each webhook. TheX-Sendflit-Signature header carries sha256=<hex>, an HMAC-SHA256 of the raw request body. Pass the raw bytes to the static method.
Errors and retries
Failed calls throwSendFlit.SendFlitException, a checked exception. It has two public fields:
429 or 5xx are retried up to maxRetries times. The SDK honors the Retry-After header when it’s present. Other 4xx responses are not retried. See Errors, retries and limits.
Method reference
Next steps
- Quickstart: send your first email from the command line.
- Batch sending: limits and per-item results.
- Webhooks: events and payloads.