---
title: "Create Portal Session"
method: POST
path: "/api/billing/portal/session"
tags: ["billing"]
---

# Create Portal Session

`POST /api/billing/portal/session`

## Request

- Base URL: `https://api.civilquants.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.civilquants.com/api/billing/portal/session`
- Auth: none declared

Create a Stripe Customer Portal session for the authenticated user.

Surfaced from the /welcome page footer ("Manage subscription").
Auth: Clerk JWT only — API tokens / pass_holders are not the
customer-self-service surface. The customer's `stripe_customer_id`
is read off any Subscription row owned by the user (Stripe creates
one Customer per email; multiple subscriptions share it).

Stripe SDK errors collapse to 502 — internal exception shape never
leaks to the client.

## Headers

- `authorization` string, nullable

## Response `200`

Successful Response

- PortalSessionResponse
  - `portal_url` string, required

## Other responses

- `422`: Validation Error

---

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