← Back to blog

Bolt.new Transactional Email API (2026): Invite a Teammate to a Workspace in Your Bolt-Generated App with POST /emails

After your Bolt.new-generated app already creates a workspace invite and mints an accept URL, send that invite with Rovela POST /emails. No official Bolt plugin. Rovela does not add workspace members.

Updated November 12, 2026
Bolt.new Transactional Email API (2026): Invite a Teammate to a Workspace in Your Bolt-Generated App with POST /emails

A Bolt workspace invite is not a generic team-invite primer, a collaboration-edit invite, or a signup confirmation

When Bolt.new has already generated a full-stack app — a workspace model, an “Invite teammate” form, and an accept URL you minted after writing the invite row — that server path still has to tell the invited person: “Join this workspace,” plus the accept URL you already have. That send is transactional email. It is not a weekly digest, and it is not a rewrite of the generic team invite email links primer, the invite accepted notice, or a signup confirmation. Those tutorials already exist. This article is one event in a Bolt-generated product: a workspace already exists, an authorized member asked to add a teammate, and a single-use accept URL already exists. Rovela does not run Bolt, attach seats, or talk to StackBlitz — this is your app’s own workspace-invite event, sent through POST /emails. The recipient is the invited teammate. The call to action is “accept the invite,” not “confirm your email,” not “someone mentioned you,” and not “you have been invited to edit a document.”

This guide does not invent an official Bolt.new plugin or a Rovela Bolt SDK. There is no client library to install. Keep the API key in the generated server or edge function, not in browser code Bolt may have scaffolded, and not in the Bolt prompt history. Send from a domain you verified, with DKIM and an Idempotency-Key.

A workspace teammate invite grants membership in your product’s workspace (roles, seats, billing later). It is not an “edit this project” collaboration invite, which is a different event with a different URL. After the person accepts, a separate invite accepted message can tell the inviter — that is a second, separately idempotent send.

A generated-app server route records a workspace invite and accept URL, then posts JSON with that URL to the email API and receives a message id

What you need before the first workspace teammate invite

The first-email guide and the Quick Start are the same five steps, whether you call curl or a server-side fetch from the server route in your Bolt.new-generated app:

  1. Create an account. The free plan sends real mail. There is no separate sandbox, and no test key that behaves differently from production.
  2. Add and verify a sending domain (often a subdomain such as mail.example.com). 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 an email domain is.
  3. Create an API key. A sending_access key can send and nothing else — the right default for a production workspace teammate invite sender. A full_access key can also read messages and events, and manage domains, templates, and webhooks. The full key is shown once. Keys look like re_… and go out as a bearer token (authentication, email API authentication).
  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 "Acme <invites@mail.example.com>". The address must sit on a verified sending domain. You prove you control the domain — that is what makes domain email trustworthy — before you speak as it. See the From name guide, the sending domains API, 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 (HTML email API). Reusable copy can move to a template later; follow the templates guide. Examples here keep the copy inline.

Programmatic volume belongs on the HTTP email API, not on mailbox SMTP. Rovela SMTP is mailbox mail for Outlook, Apple Mail, or a phone: host mx.rovela.dev, port 465 with SSL/TLS, the mailbox’s full address, and a device credential (the same one that device uses for IMAP). A mailbox can send only as itself. For this workspace teammate invite, start with email API vs SMTP.

A Bolt server route that sends only after the workspace invite and accept URL already exist

Bolt.new often scaffolds a front end plus a server route or a hosted backend the app already uses for writes. The invite email belongs on that server path. The “Invite teammate” button can collect an address and a role; it must never hold a Rovela key.

Do the product work first, then the send. Authorize the caller as a workspace admin, insert an invite row (workspace id, email, role, hashed token, expiry), and build an accept URL on your domain, for example https://app.example.com/invites/accept?token=…. Only when that write has succeeded should the same route call the Send Email API. If the insert fails, do not send. If you need to remind someone later, use a new key version or a documented scheduled_at follow-up — do not silently insert a second invite for the same person.

There is no official Bolt SDK for Rovela. A server-side fetch is enough:

// Server route in the Bolt-generated app — never the browser.
const acceptUrl = `https://app.example.com/invites/accept?token=${plainToken}`;

const res = await fetch("https://api.rovela.dev/emails", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.ROVELA_API_KEY}`,
    "Content-Type": "application/json",
    "Idempotency-Key": `bolt-workspace-invite-${workspaceId}-${inviteId}-v1`,
  },
  body: JSON.stringify({
    from: "Acme <invites@mail.example.com>",
    to: invite.email,
    subject: "Join the Acme workspace",
    html:
      `<p>${inviterName} invited you to join the <b>${workspaceName}</b> workspace as ${role}.</p>` +
      `<p><a href="${acceptUrl}">Accept invite</a></p>` +
      `<p>This invite expires in 7 days.</p>`,
    text:
      `${inviterName} invited you to join the ${workspaceName} workspace as ${role}.\n` +
      `Accept invite: ${acceptUrl}\nThis invite expires in 7 days.`,
    tags: { type: "workspace-invite", source: "bolt-app" },
  }),
});

if (!res.ok) {
  const err = await res.json().catch(() => ({}));
  throw new Error(`rovela ${res.status}: ${err.message || res.statusText}`);
}

const { id } = await res.json();

Use a sending_access key. Your /invites/accept route verifies the token, attaches the member, and invalidates the invite. Rovela does not change membership. Name the inviter and the workspace in both html and text so the message is recognizable on a lock screen.

Idempotency, recipients, and what a 200 actually means

Retries are normal. A server action, edge function, workflow, or queued job can time out after Rovela has already accepted the message. Send the documented Idempotency-Key header so a retry does not create a second workspace teammate invite. A stable key such as bolt-workspace-invite-ws_9-user_04-v1 is unique to this event, this recipient, and this token or invite version, and it stays the same when the HTTP call is repeated.

to accepts a string or an array. cc and bcc count toward billing and toward the documented cap of 50 recipients on one message. For a workspace teammate invite, use a single to: the invited teammate whose address you already collected. If you need an owner copy, send a second, separately idempotent message instead of BCC-ing a shared inbox.

A 200 from POST /emails means accepted for delivery, not arrived. The body looks like {"object": "email", "id": "9f1c2e40-..."}. Delivery is asynchronous. Read state with GET /emails/:id or GET /emails/:id/events (those need full_access or a dashboard session). In production, subscribe to a webhook for email.sent, email.delivered, email.bounced, and related events instead of polling from the request that minted the workspace teammate invite.

If the address is on the suppression list, the send can still return an id, but the message is not delivered and its status becomes suppressed. Check Suppressions in the dashboard before assuming the API failed. Rate limits are per key; a 429 means retry with backoff. Each message in a POST /emails/batch request counts individually.

Optional documented fields include reply_to, scheduled_at (an ISO 8601 timestamp in the future), tags, headers, and attachments as { filename, content (base64), content_type }. This workspace teammate invite does not need an attachment. To queue a later follow-up, use scheduled_at — not a sleep in the request path. A batch is appropriate only when you truly have many different messages, up to 100 per request.

Errors you should handle in the Bolt-generated server route

Documented errors share one shape: statusCode, name, and message. Handle them once in the Bolt-generated server route.

  • 400 — a missing required field, a from domain that is not in your organization or is still unverified, a template that does not exist, a base64 attachment that does not decode, or more than 50 recipients on one message. Read message; it often names the domain or the missing field. Do not retry a 400 in a tight loop.
  • 401 — missing or invalid credential, or a missing Bearer prefix. A revoked key looks the same from the client’s point of view.
  • 403 — a valid sending_access key used on a management or read endpoint such as GET /emails/:id or GET /domains. The message says which permission is required. Keep the send path on sending_access; use full_access or the dashboard for status reads.
  • 429 — the per-key rate limit. Retry with backoff. Do not fan out a burst of workspace teammate invite sends from an unqueued loop.

A leaked sending_access key can send mail as your domain. Keep ROVELA_API_KEY in the server or edge-function environment, never in the browser, a mobile client, a public page, or a chat transcript (email API authentication). There is no official client SDK to install; a standard HTTPS call is enough.

Delivery is asynchronous — do not poll from the Bolt-generated server route

After workspace teammate invite is accepted, delivery continues in the background. The Bolt-generated server route should store the returned message id next to your own event record and return to the user. Watching the message from that same request with a tight GET /emails/:id loop will slow the sign-up, invite, or form path and still needs full_access.

For production, configure a webhook and follow the webhook overview. Typical events include email.sent, email.delivered, email.opened, email.clicked, and email.bounced (event reference). Use bounces to keep your own list clean; do not invent a /logs API — the documented reads are GET /emails/:id, GET /emails/:id/events, the dashboard Emails view, and webhooks.

If a workspace teammate invite landed in spam, start with DNS rather than the HTTP call: confirm the DKIM record is published at the selector the dashboard gave you, that you have exactly one SPF record, and that DMARC is not p=reject on a brand-new domain with no sending history. Reputation takes weeks, not minutes (how email authentication works).

An invited teammate at a workshop desk opens a single transactional email titled Join the Acme workspace with one large Accept invite button

What not to do in this Bolt workspace invite

Do not put the Rovela key in Bolt’s front-end bundle or in the prompt you used to generate the app. Do not send workspace invites over mailbox SMTP at mx.rovela.dev — that path is send-as-self for a person or a small client. Programmatic invites belong on the HTTP API.

Do not collapse this event into a generic team invite primer or a welcome email. Do not BCC the inviter on the same message. Do not invent a sandbox or a dedicated IP. Do not poll GET /emails/:id in the invite request.

Rovela will not accept the invite or assign a role. Your accept route does that after a successful click.

A compact Bolt workspace-invite checklist

  • Verify a sending domain and create a sending_access key (Quick Start).
  • Authorize the inviter, write the invite, and mint the accept URL first.
  • Call POST /emails from the Bolt-generated server path with Idempotency-Key, html, and text.
  • Keep the key out of the browser and out of the Bolt prompt.
  • Use webhooks for bounces; a 200 only means accepted.
  • After accept, optionally notify the inviter as a second idempotent event.