Helidon Transactional Email API (2026): Notify an Agent That a Support Ticket Was Assigned to Them with POST /emails
After a Helidon service already assigns a support ticket to an agent, email the agent the ticket permalink they already have using Rovela POST /emails. No official SDK. Rovela does not assign tickets.
A ticket-assigned notice is not a ticket-reply, incident-resolved, or report-ready mail
When a Helidon service, a messaging consumer, or a scheduled job has already assigned a support ticket to an agent — the assignment is stored, a ticket permalink the agent already has is reachable, the assignment event is finished — that process still has to tell the agent: “A support ticket was assigned to you,” plus the ticket permalink they already have. That send is transactional email. It is not a help-center newsletter, not a daily queue digest, and it is not a rewrite of the ticket reply, incident resolved, Spring Boot, or Play Framework guides. Those tutorials already exist, and they describe a customer being told a new reply was added to their ticket, a subscriber being told an incident is resolved, a generic Spring Boot RestClient poster, or a Play app telling someone a data import finished and a report is ready. This article is one event in your own Helidon workflow: a ticket was already assigned to a specific agent, and a ticket permalink already exists. Rovela does not assign tickets, change ticket state, or ship an official Helidon SDK — this is your service’s own ticket-assigned event, sent through POST /emails. The recipient is the assigned agent (the address you already store on that agent). The call to action is “open the ticket,” not “a reply was added,” not “an incident is resolved,” and not “your report is ready.”
Point the permalink at the ticket URL the agent can already open with their own support-console session. Do not attach a complete case archive, a customer identity pack, or a raw email thread dump unless you have a deliberate reason and the file is small enough for your own product rules; the documented call to action is the ticket permalink the agent already has. Do not deep-link an admin-only configuration page the agent cannot open. If the useful destination is simply the ticket detail page they already use in the console, that URL is the right destination. There is no client library to install, and there is no official Rovela Helidon SDK, Maven artifact, or starter. Use Java’s built-in HttpClient plus curl in a shell when you want to prove the JSON. The JSON body and headers are the product. The Helidon service that already wrote the assignment should send the notice; Rovela does not change assignments and does not invent a ticketing product.
This is also not a rewrite of nearby Java guides. The Quarkus and Micronaut tutorials already describe a report-ready notice from a JAX-RS or service layer, and the Ktor guide is a generic HttpClient poster. A Helidon “a ticket was assigned to you” notice is a different caller and a different event. Nearby account or status notices such as account locked or account suspended are also different stories. 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 Helidon service 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.
What you need before the first ticket-assigned 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 Helidon service:
- 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.
- Add and verify a sending domain (a subdomain such as
mail.example.comis a common choice). You cannot send from a domain you have not verified; an unverified or foreignfromis 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. - Create an API key. A
sending_accesskey can send and nothing else — the right default for a production ticket-assigned notifier. Afull_accesskey can also read messages and events, and manage domains, templates, and webhooks. The full key is shown once. - Send with
POST /emails. - Confirm delivery in the dashboard, with
GET /emails/:idorGET /emails/:id/events(those reads needfull_accessor a dashboard session), or with a webhook.
from is a string in the documented form "Support <support@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. Send both html and text where you can — many clients preview the text part, which is often where the agent first sees the ticket permalink (HTML email API).
A Helidon service that sends after the ticket is already assigned
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 Helidon service, messaging consumer, or scheduled job that already wrote the assignment should read ROVELA_API_KEY from its process environment and call Rovela only on the server (email API authentication). If a supervisor or a routing rule assigns the ticket in your own console, write your own assigned-at record first (agent id stored, ticket permalink already minted and reachable by that agent), then enqueue the notice. Do not call the Email API from a browser widget, and do not invent a Rovela Helidon starter that changes ticket state — Rovela only sends the mail.
Store the event first: the ticket id you already have, a short subject or reference you already show on the ticket page, the agent’s address, and the ticket permalink they already have. The send is just the notice. The recipient is consistently the agent who was just assigned — not every agent in the pool, not the customer (unless you deliberately send a different “your ticket was assigned” event with a different key), and not a shared triage inbox unless you add that address deliberately. Key the Idempotency-Key to that ticket plus the assignment event so a retried consumer does not mail the same “a ticket was assigned to you” notice twice. A later assignment of a different ticket is a different event and should be a different key. If a later job adds a reply for the customer or marks an incident resolved, those are different guides, not this one.
// src/main/java/com/example/support/RovelaTicketMailer.java
// Helidon service helper. Plain java.net.http.HttpClient. No official Rovela SDK.
// Send only after your service has already assigned the ticket to an agent.
package com.example.support;
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 RovelaTicketMailer {
private static final HttpClient HTTP = HttpClient.newBuilder()
.connectTimeout(Duration.ofSeconds(20))
.build();
private RovelaTicketMailer() {}
public static String sendEmail(
String to, String subject, String html, String text,
String idempotencyKey, String fromAddress, String tagsJsonObject
) throws Exception {
String payload = "{"
+ "\"from\":\"Support <" + fromAddress + "\","
+ "\"to\":\"" + to + "\","
+ "\"subject\":\"" + subject + "\","
+ "\"html\":" + jsonString(html) + ","
+ "\"text\":" + jsonString(text) + ","
+ "\"reply_to\":\"" + fromAddress + "\","
+ "\"tags\":" + tagsJsonObject
+ "}";
HttpRequest req = HttpRequest.newBuilder()
.uri(URI.create("https://api.rovela.dev/emails"))
.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 = HTTP.send(req, HttpResponse.BodyHandlers.ofString());
if (resp.statusCode() < 200 || resp.statusCode() >= 300) {
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 notifyTicketAssigned(
String agentEmail, String ticketSubject, String ticketPermalink, String ticketId
) throws Exception {
String safeSubject = ticketSubject.replace("\"", "'");
return sendEmail(
agentEmail,
"A support ticket was assigned to you",
"<p>Ticket “" + escape(safeSubject) + "” was assigned to you. Open the ticket page you already have.</p>"
+ "<p><a href=\"" + escape(ticketPermalink) + "\">Open the ticket</a></p>",
"Ticket \"" + ticketSubject + "\" was assigned to you. Open the ticket page you already have.\n\n"
+ "Open the ticket: " + ticketPermalink,
"ticket-assigned-" + ticketId,
"support@yourdomain.com",
"{\"type\":\"ticket_assigned\"}"
);
}
private static String escape(String value) {
return value.replace("&", "&").replace("<", "<").replace(">", ">");
}
private static String jsonString(String value) {
return "\"" + value.replace("\\", "\\\\").replace("\"", "\\\"").replace("\n", "\\n") + "\"";
}
}
Call RovelaTicketMailer.notifyTicketAssigned from the Helidon service or messaging consumer that already wrote assignedAt (or your own “assigned to this agent” field) — after the ticket permalink exists and remains reachable by that agent, not before. A typical pattern is a Helidon SE or MP service that publishes an ticket_assigned event after the assignment row is persisted, then a messaging consumer or an in-process observer sends the notice. Keep the HTTP call out of the request path that merely opens the routing form; the agent should be mailed when the ticket has actually been assigned, not when a supervisor starts looking at the unassigned queue. The email is a status notice, not a place to dump the customer’s payment card, a full private note thread, or a complete attachment history the agent can already read on the ticket page. If a later decision reassigns the ticket to a different agent, that is a different event and should use a different idempotency key — do not reuse the first assignment key, and do not treat this mail as a ticket reply to the customer.
The same JSON can be sent with curl, which is useful in a staging shell while you confirm the verified from and the permalink:
curl -X POST https://api.rovela.dev/emails \
-H "Authorization: Bearer $ROVELA_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: ticket-assigned-tkt_01H7Q3" \
-d '{
"from": "Support <support@yourdomain.com>",
"to": "agent@example.com",
"subject": "A support ticket was assigned to you",
"html": "<p>Ticket “Cannot export coastal maps” was assigned to you. Open the ticket page you already have.</p><p><a href=\"https://support.example.com/tickets/tkt_01H7Q3\">Open the ticket</a></p>",
"text": "Ticket \"Cannot export coastal maps\" was assigned to you. Open the ticket page you already have.\\n\\nOpen the ticket: https://support.example.com/tickets/tkt_01H7Q3",
"reply_to": "support@yourdomain.com",
"tags": {"type": "ticket_assigned"}
}'
reply_to is documented and optional; use it when replies should reach a support operations inbox rather than the sending address (reply-to). tags may be an object or an array of arbitrary labels — they are yours to choose, and they help you filter later in the dashboard or in webhooks (email API tags). headers and topic_id are also documented fields; this tutorial does not treat topic_id as a product tour. Attachments, if you ever add a short assignment card, use { filename, content (base64), content_type }. Do not attach customer identity documents, payment card data, or a full internal note transcript. The permalink is the call to action (email attachments).
If you ever need to notify many independently assigned tickets in one go (a queue catch-up after a consumer comes back online, not the usual single-ticket path), POST /emails/batch accepts up to 100 messages, each with the same schema. Two fields are rejected rather than ignored: template and topic_id. Send those through POST /emails. See the batch example and the batch transactional email guide. Each item should still carry its own business key if you send them as individual POST /emails calls; if you use the batch endpoint, keep the rest of the payload identical to a single send, without template or topic_id.
template is documented as { id, variables } and is mutually exclusive with html and text. This tutorial sends both html and text so the agent can open the ticket permalink even in a text-only client. If you later switch a stable notice to a stored template, drop html and text and follow the Templates API, the templates guide, and the email templates API guide.
Idempotency, recipients, and what a 200 actually means
Helidon consumers and scheduled jobs retry, and a “the ticket was assigned, notify the agent” 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 ticket id (or to a specific assignment event id you already store), not to the clock and not to the agent’s email alone. If the same ticket is later reassigned, 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 ticket-assigned notice addresses the agent who was just assigned. If a second watcher also has to be told, add that address deliberately and accept that it counts as a second recipient. Do not cc every agent in the pool 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 assignment record if you want to look the message up later from a dashboard session. Do not block the Helidon service 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 ticket that is already assigned, send immediately after the assigned record is written. If you did schedule a message and the agent 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.
Errors you should handle in the Helidon service
Documented send errors use an envelope of { statusCode, name, message }:
- 400 — a missing required field, a
fromdomain that does not belong to your organization, atemplatethat 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 ticket row.
- 429 — you are being rate limited. Back off and retry with the same
Idempotency-Keyso a later attempt cannot send a second notice for the same assignment (rate limits, retries).
Treat unknown 5xx responses as retryable with the same key. Log name and message next to the ticket 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 service
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 Helidon service. 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.
What not to do in this ticket-assigned notice
- Do not put the Rovela key in a browser client, a public repository, or a container image.
- Do not invent a Rovela Helidon SDK that assigns tickets. Your service already recorded the assignment; Rovela delivers the mail. There is no official client library. Rovela is not changing ticket state.
- Do not send this as a “a reply was added to your ticket,” “an incident is resolved,” or “your report is ready” template borrowed from another tutorial. The permalink is a ticket page the assigned agent already has, and the recipient is that agent.
- Do not include customer identity documents, payment card data, or a dump of private internal notes in the email body. The notice carries a short ticket subject and the permalink.
- Do not send from mailbox SMTP for this. SMTP is for mail apps and mailboxes. A Helidon service 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 ticket-assigned 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/:idwith asending_accesskey, and do not invent a reschedule body if you later cancel an unsent message.
A compact ticket-assigned checklist
- Verify the sending domain and create a
sending_accesskey (Quick Start). - Put
ROVELA_API_KEYandROVELA_FROMin the Helidon service’s process environment, not in a front-end widget. - Record the assignment first: the agent’s address, a short ticket subject, and the ticket permalink the agent already has.
- Call
POST /emailswith JavaHttpClient(or curl), bothhtmlandtext, areply_toif you want replies in a support inbox, and anIdempotency-Keyscoped to that ticket assignment. - Treat HTTP 200 as accepted, not delivered. Persist the returned message id if you need it later.
- Confirm delivery with a signed webhook or from the dashboard.
- 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.