← Back to blog

Javalin Transactional Email API (2026): Notify a Release Engineer That a Production Deployment Succeeded with POST /emails

After a Javalin handler or background executor already records that a production deployment succeeded, email the release engineer the release permalink they already have using Rovela POST /emails. No official SDK. Rovela does not deploy software.

Updated November 11, 2026
Javalin Transactional Email API (2026): Notify a Release Engineer That a Production Deployment Succeeded with POST /emails

A production-deployment-succeeded notice is not a ticket-assigned, report-ready, or content-release mail

When a Javalin handler or a background executor has already recorded that a production deployment succeeded — the release is in a successful, shipped state, a release permalink the engineer can open is already minted, the deployment event is finished — that process still has to tell the release engineer: “Your production deployment succeeded,” plus the release permalink they already have. That send is transactional email. It is not a status-page broadcast, not a changelog newsletter, and it is not a rewrite of the Helidon ticket-assigned, Play Framework report-ready, Quarkus report-ready, Micronaut report-ready, or Contentstack release-deployed guides. Those tutorials already exist, and they describe an agent being told a support ticket was assigned to them, a caller being told a data import or report is ready, or a CMS workflow being told that a content release was deployed to production. This article is one event in your own Javalin workflow: a software production deployment already succeeded, and a release permalink already exists. Rovela does not deploy software, cut releases, or talk to Javalin — this is your platform’s own deployment-succeeded event, sent through POST /emails. The recipient is the release engineer (the address you already store on that release). The call to action is “open the release,” not “a ticket was assigned to you,” not “your report is ready,” and not “a content release was deployed.”

Point the permalink at a URL the release engineer can actually open now — the release record your deploy pipeline already minted when the production deployment succeeded. Do not attach a complete build log, a secrets dump, or a raw artifact bundle unless you have a deliberate reason and the file is small enough for your own product rules; the documented call to action is the release permalink they already have. Do not deep-link an internal deploy console the engineer cannot reach from the address you are mailing. If the useful destination is simply the public or authenticated release page you already issued, that URL is the right destination. There is no client library to install, and there is no official Rovela Javalin SDK, plugin, or starter. Use Java HttpClient plus curl in a shell when you want to prove the JSON. The JSON body and headers are the product. The handler or executor that already marked the deployment successful should send the notice; Rovela does not change deploy status and does not invent a Javalin product.

This is also not a rewrite of nearby operations guides. The Spring Boot RestClient tutorial is a generic Java HTTP poster, not a production-deployment mail. The backup completed and incident resolved tutorials tell an admin that a backup finished or a subscriber that an incident is over; they are not a release-engineer notice. The hapi compliance-package-ready tutorial is a different caller and a different event. A Javalin “your production deployment succeeded” notice stays on this one software-release story. Rovela’s Email API is a single HTTPS call. The base URL is https://api.rovela.dev. You authenticate with Authorization: Bearer re_… (Authentication) and queue a message with POST /emails. The response is {"object":"email","id":"..."}. HTTP 200 means the message was accepted and queued, not that it has already arrived (Quick Start).

If you are still choosing between HTTP and SMTP, read Email API vs SMTP. Rovela’s SMTP is mailbox SMTP for mail apps (mx.rovela.dev:465, a device credential, send-as-self, 30 messages a minute from one client address). Programmatic volume from a Javalin handler or background executor belongs on POST /emails, which is also the distinction drawn in Email API vs SMTP relay. Related reading on the HTTP shape includes the transactional email API, the simple transactional email API, and sending transactional email from an app.

A Javalin service records that a production deployment already succeeded, then a Java HttpClient posts JSON with the release permalink to the email API and receives a message id

What you need before the first deployment-succeeded notice

The first-email guide and the Quick Start are the same five steps, whether the caller is curl or a Java HttpClient helper inside a Javalin service:

  1. Create an account. You start on the free plan, which sends real mail. There is no separate sandbox, and no test key that behaves differently from production.
  2. Add and verify a sending domain (a subdomain such as mail.example.com is a common choice). You cannot send from a domain you have not verified; an unverified or foreign from is refused with a 400 that names the domain. The dashboard asks for four DNS records — SPF, DKIM, DMARC, and return-path. See the domain setup guide, the Domains API, and what domain email is.
  3. Create an API key. A sending_access key can send and nothing else — the right default for a production deployment-succeeded notifier. A full_access key can also read messages and events, and manage domains, templates, and webhooks. The full key is shown once.
  4. Send with POST /emails.
  5. Confirm delivery in the dashboard, with GET /emails/:id or GET /emails/:id/events (those reads need full_access or a dashboard session), or with a webhook.

from is a string in the documented form "Releases <releases@yourdomain.com>". The address must sit on a verified sending domain. That is the same rule that makes domain email trustworthy: you prove you control the domain before you speak as it. How the display name and the address work is covered in the From name guide and the sending domains API overview. Related reading on records and subdomains includes how email authentication works, how to set up domain email, and sending subdomain setup.

At least one of html, text, or template is required. template is a documented { id, variables } object and is mutually exclusive with html and text. Send both html and text where you can — many clients preview the text part, which is often where the engineer first sees the release permalink (HTML email API). If you later store reusable copy in a template, follow the templates guide; this article keeps the copy inline so the handler stays easy to read.

A Javalin handler or executor that sends after the deployment already succeeded

Keep the Rovela key out of the browser, out of a public repository, and out of a container image. A leaked sending_access key can send mail as your domain. The Javalin handler or background executor that already marked the production deployment successful should read ROVELA_API_KEY from its process environment and call Rovela only on the server (email API authentication). If your pipeline records a successful deploy in its own store, write that succeeded record first (status successful, release permalink already minted and reachable by the engineer), then enqueue the notice. Do not call the Email API from a browser dashboard widget, and do not invent a Rovela Javalin SDK that starts deploys — Rovela only sends the mail.

Store the event first: the release id you already have, a short release name or version you already show on the release page, the engineer’s address, and the release permalink they already have. The send is just the notice. The recipient is consistently the release engineer responsible for that production deployment — not every on-call engineer, not a marketing segment, and not a shared status-page inbox unless you add that address deliberately. Key the Idempotency-Key to that deployment-succeeded event so a retried executor does not mail the same “your production deployment succeeded” notice twice. A later successful deploy for a different release is a different event and should be a different key. If a later job records a failed deploy or a rollback, those are different events, not this one.

// DeploymentMailer.java
// Javalin handler / background executor helper. Plain Java HttpClient.
// No official Rovela SDK. Send only after a production deployment already succeeded.

import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.nio.charset.StandardCharsets;
import java.time.Duration;

public final class DeploymentMailer {
    private static final URI API = URI.create("https://api.rovela.dev/emails");
    private static final HttpClient CLIENT = HttpClient.newBuilder()
            .connectTimeout(Duration.ofSeconds(20))
            .build();

    private DeploymentMailer() {}

    public static String sendEmail(
            String to,
            String subject,
            String html,
            String text,
            String idempotencyKey,
            String fromAddress,
            String tagsJson
    ) throws Exception {
        String payload = "{"
                + "\"from\":\"Releases <" + fromAddress + "\","
                + "\"to\":\"" + to + "\","
                + "\"subject\":\"" + subject + "\","
                + "\"html\":" + jsonString(html) + ","
                + "\"text\":" + jsonString(text) + ","
                + "\"reply_to\":\"" + fromAddress + "\","
                + "\"tags\":" + tagsJson
                + "}";
        HttpRequest req = HttpRequest.newBuilder(API)
                .timeout(Duration.ofSeconds(30))
                .header("Authorization", "Bearer " + System.getenv("ROVELA_API_KEY"))
                .header("Content-Type", "application/json")
                .header("Idempotency-Key", idempotencyKey)
                .POST(HttpRequest.BodyPublishers.ofString(payload, StandardCharsets.UTF_8))
                .build();
        HttpResponse<String> resp = CLIENT.send(req, HttpResponse.BodyHandlers.ofString());
        if (resp.statusCode() < 200 || resp.statusCode() > 299) {
            throw new IllegalStateException("Rovela send failed: HTTP " + resp.statusCode());
        }
        int idAt = resp.body().indexOf("\"id\":\"");
        if (idAt < 0) {
            return "";
        }
        int start = idAt + 6;
        int end = resp.body().indexOf('"', start);
        return end > start ? resp.body().substring(start, end) : "";
    }

    public static String notifyDeploymentSucceeded(
            String engineerEmail,
            String releaseName,
            String releasePermalink,
            String releaseId
    ) throws Exception {
        String safeName = releaseName.replace("&", "&amp;").replace("<", "&lt;").replace(">", "&gt;");
        return sendEmail(
                engineerEmail,
                "Your production deployment succeeded",
                "<p>Production deployment of “" + safeName + "” succeeded.</p>"
                        + "<p><a href=\"" + releasePermalink + "\">Open the release</a></p>",
                "Production deployment of \"" + releaseName + "\" succeeded.\n\nOpen the release: "
                        + releasePermalink,
                "deploy-succeeded-" + releaseId,
                "releases@yourdomain.com",
                "{\"type\":\"deployment_succeeded\"}"
        );
    }

    private static String jsonString(String value) {
        return "\"" + value.replace("\\", "\\\\").replace("\"", "\\\"").replace("\n", "\\n") + "\"";
    }
}

Call DeploymentMailer.notifyDeploymentSucceeded from the Javalin handler or background executor that already wrote succeeded_at (or your own “production deploy succeeded” flag) — after the release permalink exists and remains reachable, not before. A typical pattern is a Javalin endpoint or a queued executor that runs after your pipeline persists the successful release record. Keep the HTTP call out of the request path that merely starts a deployment; the engineer should be mailed when the production deployment has actually succeeded, not when someone clicks deploy. The email is a status notice, not a place to dump a complete log, a list of every environment variable, or a rollback runbook the engineer can already read once they open the release. If a later decision rolls the release back, that is a different event and should use a different idempotency key — do not reuse the succeeded key, and do not treat this mail as an incident resolved notice.

If several releases succeed in a short window and you genuinely need one HTTP call per batch of notices, POST /emails/batch accepts up to 100 messages and rejects template and topic_id. Most deploy pipelines are better served by one idempotent POST /emails per release. topic_id is only a documented field on the single-send endpoint; this guide does not walk through a topics product.

Idempotency, recipients, and what a 200 actually means

Javalin executors retry, and a “the production deployment succeeded, notify the engineer” path can run more than once for the same record. Send an Idempotency-Key header (up to 256 characters). A retry of the same request within 24 hours returns the original response instead of sending again (idempotency). Key it to the release id (or to a specific succeeded event id you already store), not to the clock and not to the engineer’s email alone. If the same address later ships a different release that also succeeds, that is a second notice and a second key.

A message may address at most 50 recipients across to, cc, and bcc combined. That is the transport’s limit, not a plan limit, and it is checked before the request is accepted. Quota is charged per recipient, not per message — cc and bcc count the same as to (cc and bcc). A deployment-succeeded notice addresses the release engineer for that production deploy. If a second contact also has to be told, add that address deliberately and accept that it counts as a second recipient. Do not cc every on-call engineer by default.

HTTP 200 from POST /emails means the message was accepted and queued. It is not a delivery receipt. The JSON is {"object":"email","id":"..."}. Persist that id next to the release record if you want to look the message up later from a dashboard session. Do not block the Javalin handler or executor until a mailbox provider confirms delivery.

scheduled_at is a documented ISO 8601 future timestamp if you ever need to hold a notice (scheduled email). For a deployment that has already succeeded, send immediately after the succeeded record is written. If you did schedule a message and the engineer should not receive it, POST /emails/:id/cancel cancels an unsent message. Reading, cancelling, and any rescheduling need full_access or a dashboard session. This article does not invent a reschedule request body. Attachments, when you have a genuine reason to include one, use { filename, content, content_type } with content as base64; a deployment-succeeded notice rarely needs a file.

Errors you should handle in the Javalin service

Documented send errors use an envelope of { statusCode, name, message }:

  • 400 — a missing required field, a from domain that does not belong to your organization, a template that does not exist, or more than 50 recipients on one message. Fix the payload; retrying the same body will fail the same way.
  • 401 — a missing, malformed, or revoked Bearer key. Check the process environment, not the release row.
  • 429 — you are being rate limited. Back off and retry with the same Idempotency-Key so a later attempt cannot send a second notice for the same successful deploy (rate limits, retries).

Treat unknown 5xx responses as retryable with the same key. Log name and message next to the release id; do not log the Bearer key. A practical walk-through is the email API error handling guide. Related operational reading includes email API logs and email API integration.

Delivery is asynchronous — do not poll from the handler

A 200 from POST /emails means accepted for delivery, not delivered. Reading GET /emails/:id or GET /emails/:id/events needs a full_access key or a dashboard session; a sending_access key cannot do it, and you should not add a polling loop inside the Javalin handler or executor. Subscribe to a webhook instead, and verify the signature header x-resend-signature as documented in webhook security and signature verification. Event names include accepted, delivered, opened, clicked, bounced, or failed. For a single message you can also use the email delivery status API or the dashboard from a support session. Related reading includes the email webhooks API and transactional email webhooks.

A generic ticket-assigned or CMS content-release notice is a different tutorial; a Javalin service posts a deployment-succeeded notice with the release permalink using POST /emails

What not to do in this deployment-succeeded notice

  • Do not put the Rovela key in a browser client, a public repository, a front-end widget, or a container image.
  • Do not invent a Rovela Javalin SDK that deploys software or cuts releases. Your handler already recorded the successful deploy; Rovela delivers the mail. There is no official client library. Rovela is not changing deploy status.
  • Do not send this as a “ticket assigned,” “report is ready,” “backup completed,” “incident resolved,” or “content release deployed” template borrowed from another tutorial. The permalink is a software release page the engineer can now open, and the recipient is that release engineer.
  • Do not include secrets, deploy credentials, private keys, or a dump of production logs in the email body. The notice carries a short release name and the permalink.
  • Do not send from mailbox SMTP for this. SMTP is for mail apps and mailboxes. A Javalin handler or executor should use the HTTP API. Inbound mail into a hosted mailbox is a different path, described in the webmail manual; this guide is an outbound deployment-succeeded notice. If you are migrating an older mailer, see migrate SMTP to the Email API and SMTP ports 25, 465, and 587.
  • Do not poll GET /emails/:id with a sending_access key, and do not invent a reschedule body if you later cancel an unsent message.

A compact deployment-succeeded checklist

  1. Verify the sending domain and create a sending_access key (Quick Start).
  2. Put ROVELA_API_KEY and ROVELA_FROM in the Javalin service’s process environment, not in a front-end script.
  3. Record the successful production deployment first: the engineer’s address, a short release name, and the release permalink they already have.
  4. Call POST /emails with Java HttpClient (or curl), both html and text, a reply_to if you want replies in a releases inbox, and an Idempotency-Key scoped to that release id.
  5. Treat HTTP 200 as accepted, not delivered. Persist the returned message id if you need it later.
  6. Confirm delivery with a signed webhook or from the dashboard.
  7. If you are comparing providers, the existing pages are Rovela vs Mailgun, vs Amazon SES, vs Postmark, vs SendGrid, vs Resend, and vs Brevo. For the HTTP shape itself, see the transactional email API, the curl sending guide, and the HTTP email API overview. For other notification patterns, see the email notification API guide.