Vercel

Send email from a Vercel project without copying an API key by hand: link the project and ScopedPost sets the SCOPEDPOST_API_KEY env var on it automatically.

The integration is OAuth: you authorize ScopedPost in Vercel, pick a project, and ScopedPost creates a dedicated send-only API key named for that project and writes it as the env var (Production, Preview and Development). There is no Marketplace listing yet — the listing is a partner application, not code — so the integration is installed from your Vercel account directly, as below.

1. Connect Vercel

In ScopedPost, open Settings → Connect Vercel and click Connect Vercel. You are taken to Vercel to authorize the integration for your account or team. Vercel sends you back to ScopedPost, which stores the installation token encrypted — it is never shown, and the token is long-lived: Vercel issues no refresh token, so it stays valid until the integration is uninstalled or its scopes change.

If Vercel returns an authentication error later (the integration was uninstalled, or its scopes changed), the Settings page shows a reconnect button instead of failing silently.

2. Link a project

After connecting, click Pick a project and choose one. Linking creates the dedicated send-only API key (Vercel — <project>, visible on the API keys page) and writes its value as SCOPEDPOST_API_KEY on the project — type encrypted, targets Production, Preview and Development. The key itself is never shown in the dashboard: it is sent to Vercel once, at link time.

One project per team at a time. Linking a different project first unlinks the old one — revokes its key and deletes its env var — so exactly one live Vercel key exists per team. A team can hold at most two live API keys, so a Vercel key plus one human key is the practical limit; at the cap, link with a rotate-or-revoke message and a link to the Keys page.

3. Redeploy, then send

Env vars only reach a deployment at build time, so redeploy the project after linking. Then send from your code with the key from the environment:

const res = await fetch("https://scopedpost.com/api/emails", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    Authorization: `Bearer ${process.env.SCOPEDPOST_API_KEY}`,
  },
  body: JSON.stringify({
    from: "you@your-domain.com",
    to: "customer@example.com",
    subject: "Welcome",
    text: "Hello from ScopedPost.",
  }),
});

The from address must be a domain verified in ScopedPost (Domains page). Sends appear in Logs like any other send.

4. Unlink or disconnect

Unlink project deletes the SCOPEDPOST_API_KEY env var from Vercel (only the var this integration created — tracked by id, never another var with the same key) and revokes the dedicated API key. Disconnect Vercel does that and also deletes ScopedPost's stored copy of the Vercel token.

Disconnecting does not uninstall the integration in Vercel — only uninstalling there revokes the token. If you disconnect here and want the token gone, open your Vercel integrations dashboard and uninstall ScopedPost.

What the integration can and cannot do

It can: list your Vercel projects, and create, update (upsert) and delete the SCOPEDPOST_API_KEY env var on the linked project. It cannot: read other env vars, change your deployments, or send email by itself — sending still goes through the ScopedPost API with the dedicated key, which is send-only and revocable from the Keys page like any key.

Back to Integrations

Vercel — ScopedPost