---
title: "Grant Plan To Email"
method: POST
path: "/api/admin/grants/by-email"
tags: ["admin"]
---

# Grant Plan To Email

`POST /api/admin/grants/by-email`

## Request

- Base URL: `https://api.advisorppc.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.advisorppc.com/api/admin/grants/by-email`
- Auth: HTTP bearer

Grant a plan to an e-mail address, creating the site account if needed.

Why this exists: this Stripe account also bills the connector runtime
(mcp.advisorppc.com). Its customers check out on the runtime's storefront,
and the site webhook drops their events as a foreign product on purpose,
so a paying runtime customer who opens advisorppc.com lands on Free. This
route pre-provisions the site half — a password-less user that Sign in
with Google links to by e-mail, the personal tenant, and an audited manual
entitlement — so they arrive on the plan they pay for.

Same refusal as the tenant route: a row Stripe owns is never overwritten.
Idempotent: repeating an identical grant reports ``changed=false`` and
writes no second audit row.

## Headers

- `X-Tenant-Id` integer, nullable

## Request body

- EmailGrantIn: A plan grant addressed to an e-mail rather than a tenant id. The address may have no site account yet: the route creates a password-less user (Sign in with Google links by e-mail; forgot-password sets a password), their personal tenant, and the manual entitlement in one audited step. ``name`` is used only when the user is created.
  - `tier` 'free' | 'pro' | 'google' | 'gm' | 'gmt' | 'max' | 'agency' | 'team' | 'enterprise', required
  - `status` 'active' | 'inactive' | 'canceled'
  - `reason` string, required
  - `email` string, required
  - `name` string, nullable
  - `welcome` boolean

## Response `200`

Successful Response

- EmailGrantOut: The granted tenant's plan row plus what the call had to create.
  - `tenantId` string, required
  - `name` string, required
  - `tier` string, required
  - `status` string, required
  - `billingSource` string, required
  - `members` integer, required
  - `updatedAt` string, nullable
  - `editable` boolean, required
  - `email` string, required
  - `userId` string, required
  - `userCreated` boolean, required
  - `tenantCreated` boolean, required
  - `changed` boolean, required
  - `welcomed` boolean

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/advisorppc/apis/advisorppc-api.md) · [All operations](https://skmtc.dev/advisorppc/apis/advisorppc-api/llms.txt) · [OpenAPI document](https://skmtc.dev/advisorppc/apis/advisorppc-api/revisions/3441bd729e0c?raw)
