← Back to blog

Kinde Transactional Email API (2026): Notify That an Organization Invitation Was Accepted with POST /emails

Send an “organization invitation accepted” notice from your server after a Kinde webhook with Rovela’s HTTP API: store the Bearer key in server env, fetch POST /emails, and set an Idempotency-Key. Not a verification-code, magic-link, password-reset, or welcome tutorial, and not an invented Rovela-Kinde plugin.

Updated November 10, 2026
Kinde Transactional Email API (2026): Notify That an Organization Invitation Was Accepted with POST /emails

An invitation-accepted notice is not a verification code, and it is not an Auth0 or Clerk tutorial

When someone accepts an organization invitation — a teammate you invited to a workspace, a partner you added to a tenant — the person who sent the invite needs a message that the seat is now filled: “Your organization invitation was accepted,” plus the name or email of the new member and a link to the org settings. That send is transactional email. It is not a signup verification code, not a magic link, not a password reset, and not a welcome email. Those tutorials already exist. It is also not a rewrite of the Auth0, Clerk, Stytch, WorkOS, Descope, Firebase Auth, Cognito, Supabase, Better Auth, Lucia, SuperTokens, or Auth.js guides.

This guide uses your server. Kinde can keep your user directory in sync with documented webhooks such as user.created and user.authenticated (payloads are signed JWTs; verify them with Kinde’s JWKS at https://<your_subdomain>.kinde.com/.well-known/jwks). After your application correlates that event — or your own invite-accept path — with a pending invitation in your database, you send the notice with Rovela. This article does not invent a Kinde event named “invitation accepted,” and it does not invent a Rovela-Kinde plugin or claim to replace Kinde’s built-in email templates.

Rovela’s Email API is a single HTTPS call for that work. There is no client library to install. 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 a message 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 webhook handler belongs on POST /emails, which is also the distinction drawn in Email API vs SMTP relay.

A server verifies a Kinde webhook, correlates a pending invitation, then posts JSON to the email API and receives a message id

What you need before the first invitation-accepted send

The first-email guide and the Quick Start are the same five steps, whether your caller is a webhook handler or curl:

  1. Create an account. You start on the free plan, which sends real mail. There is no separate sandbox or test key.
  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 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 handler. 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 "Teams <teams@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.

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 an admin first sees that the invitation was accepted (HTML email API).

Verify the Kinde webhook, then send from your server

Keep two secrets separate. Kinde’s webhook JWT is verified with Kinde’s JWKS; Rovela’s Bearer key is an environment variable on the same server, used only when you call POST /emails. Never put the Rovela key in a Kinde dashboard field that might be logged, in a browser, or in a public repository. A leaked sending_access key can send mail as your domain.

The sketch below assumes you have already verified the inbound JWT and decided, in your own data, that a pending invitation was accepted (for example you stored the invitee’s email when the admin sent the invite, and a documented user.created or user.authenticated webhook now matches that row). Use the event types Kinde actually lists in its dashboard or via GET /api/v1/event_types — do not invent names.

# environment (server only; never commit the live key)
ROVELA_API_KEY=re_your_sending_key
ROVELA_FROM=Teams <teams@mail.example.com>
ROVELA_REPLY=owners@mail.example.com
// emails.js — Node 18+ fetch, no official SDK
export class ApiError extends Error {
  constructor({ statusCode, name, message }) {
    super(message || `Rovela: HTTP ${statusCode}`);
    this.statusCode = statusCode;
    this.name = name || "ApiError";
  }
}

function requireEnv(name) {
  const value = process.env[name];
  if (!value) throw new Error(`Missing required environment variable: ${name}`);
  return value;
}

export async function sendEmail(opts) {
  const apiKey = requireEnv("ROVELA_API_KEY");
  const from = requireEnv("ROVELA_FROM");
  const headers = {
    Authorization: `Bearer ${apiKey}`,
    "Content-Type": "application/json",
  };
  if (opts.idempotencyKey) headers["Idempotency-Key"] = opts.idempotencyKey;

  const body = { from, to: opts.to, subject: opts.subject };
  if (opts.html) body.html = opts.html;
  if (opts.text) body.text = opts.text;
  if (opts.replyTo) body.reply_to = opts.replyTo;
  if (opts.tags) body.tags = opts.tags;

  const res = await fetch("https://api.rovela.dev/emails", {
    method: "POST",
    headers,
    body: JSON.stringify(body),
  });
  const payload = await res.json().catch(() => ({}));
  if (!res.ok) {
    throw new ApiError({
      statusCode: Number(payload.statusCode || res.status),
      name: payload.name,
      message: payload.message,
    });
  }
  return payload;
}

// After the Kinde JWT is verified and the pending invite is matched:
export async function notifyInviterInvitationAccepted(invite) {
  const orgUrl = `https://app.example.com/orgs/${invite.orgId}/members`;
  return sendEmail({
    to: invite.inviterEmail,
    subject: "Your organization invitation was accepted",
    html: `<p>${invite.inviteeEmail} accepted your invitation to ${invite.orgName}.</p><p><a href="${orgUrl}">View members</a></p>`,
    text: `${invite.inviteeEmail} accepted your invitation to ${invite.orgName}. View members: ${orgUrl}`,
    replyTo: process.env.ROVELA_REPLY,
    tags: { type: "org_invite_accepted", invite_id: String(invite.id) },
    idempotencyKey: `org-invite-accepted-${invite.id}`,
  });
}

The same JSON is a short curl for a runbook:

curl -X POST https://api.rovela.dev/emails \
  -H "Authorization: Bearer re_your_sending_key" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: org-invite-accepted-inv_01J8K2" \
  -d '{
    "from": "Teams <teams@mail.example.com>",
    "to": "owner@example.com",
    "subject": "Your organization invitation was accepted",
    "html": "<p>ada@example.com accepted your invitation to Acme.</p><p><a href=\"https://app.example.com/orgs/org_01/members\">View members</a></p>",
    "text": "ada@example.com accepted your invitation to Acme. View members: https://app.example.com/orgs/org_01/members",
    "reply_to": "owners@mail.example.com",
    "tags": {"type": "org_invite_accepted", "invite_id": "inv_01J8K2"}
  }'

A successful body is {"object": "email", "id": "9f1c2e40-..."}. Store that id next to the invitation row if you want a support trail; do not treat it as proof of delivery.

tags are documented as arbitrary labels and come back with the message (email API tags). reply_to is optional; use it when replies should reach an owners mailbox (email API reply-to).

Do not confuse Rovela’s delivery-webhook signature (x-resend-signature) with Kinde’s inbound JWT. They are different systems: you verify Kinde to decide whether to send, and you verify Rovela webhooks later to learn whether the notice was delivered (webhook security).

Idempotency, recipients, and what a 200 actually means

Webhook deliveries can be retried. Send an Idempotency-Key header (up to 256 characters) keyed to your invitation id. A retry of the same request within 24 hours returns the original response instead of sending again (idempotency). If you also have Kinde’s event_id, you can include it in the key, but the invitation id is the business event you care about.

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. This notice usually goes to the inviter; if you also notify a billing owner, they count.

If you ever need to notify many independent inviters in one go, 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. You do not need a batch for a single invitation.

template is documented as { id, variables } and is mutually exclusive with html and text. This tutorial sends both html and text so the member link is visible in the notification preview. If you later switch to a stored template, use POST /emails (not batch) and follow the Templates API and the templates guide.

Errors you should handle in the webhook handler

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 or invalid credential, or a sending_access key used to read, reschedule, or cancel a message. Check the server environment, not a client bundle.
  • 429 — rate limit exceeded. Each message in a batch counts individually. Back off and retry with the same Idempotency-Key (email API retries, rate limits).

Return a non-2xx to Kinde only when you want the webhook retried, and only after you understand the error — a permanent 400 should be fixed, not replayed blindly. Broader patterns are in Email API error handling. Domain management endpoints such as GET /domains return 403 for a sending_access key — that is expected (Domains API, sending domains API).

Delivery is asynchronous — do not poll from the webhook 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 block the Kinde webhook on a polling loop. Subscribe to a webhook instead, and verify 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.

POST /emails/:id/cancel can cancel a message that has not been sent yet, which is relevant if you used scheduled_at (an ISO 8601 timestamp in the future). Reading, rescheduling, and cancelling need full_access or a dashboard session. A request body for rescheduling is not documented here, so this guide does not invent one. Everyday invitation notices should send immediately.

A verification-code or magic-link tutorial is a different article; a server handler posts an invitation-accepted notice with POST /emails

What not to do in a Kinde integration

  • Do not invent a Rovela-Kinde marketplace plugin, and do not claim this replaces Kinde’s own email templates as an official integration.
  • Do not invent webhook event names. Use the types Kinde documents or returns from GET /api/v1/event_types, then decide in your own database whether an invitation was accepted.
  • Do not send a verification code, magic link, or password reset from this handler — those are different tutorials, and they have different security rules.
  • Do not put the Rovela key in a browser or in a Kinde Action-like field this guide has not documented (email API authentication).
  • Do not send from mailbox SMTP for this. SMTP is for mail apps and mailboxes. A webhook handler should use the HTTP API.
  • Do not skip domain verification. An unverified from is refused. If you send on behalf of several tenants, a key restricted to a single domain limits the blast radius of a leak (Email API for multi-tenant SaaS). Related invite-link patterns, when you are sending the invite itself rather than this acceptance notice, are covered in team invite email links.

A compact Kinde checklist

  1. Verify the sending domain and create a sending_access key (Quick Start).
  2. Put ROVELA_API_KEY and ROVELA_FROM in the server environment. Verify inbound Kinde webhooks with Kinde’s JWKS, not with Rovela’s signature header.
  3. After your app correlates a documented Kinde event (or your own accept path) with a pending invitation, POST https://api.rovela.dev/emails to the inviter.
  4. Send both html and text, include the members URL, and set Idempotency-Key to org-invite-accepted-<id>.
  5. Optionally set reply_to and tags such as type=org_invite_accepted.
  6. Handle 400, 401, and 429 from the error envelope. Confirm delivery with a Rovela webhook, not by polling inside the Kinde handler.
  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.

That is the whole integration: a decision your server already made, one HTTPS POST, and a notice the inviter can act on.