---
title: "POST /api/rep/dashboard/billing/portal"
method: POST
path: "/api/rep/dashboard/billing/portal"
tags: ["Rep Dashboard"]
---

# POST /api/rep/dashboard/billing/portal

`POST /api/rep/dashboard/billing/portal`

## Request

- Base URL: `https://idkrx.com`
- URL: `https://idkrx.com/api/rep/dashboard/billing/portal`
- Auth: API key in cookie `authjs.session-token`

Mint a Stripe Customer Portal session and return its hosted URL. Optional flow deep-links payment-method update or cancellation.

## Request body

- object
  - `flow` string

## Response `200`

Portal session created

- object
  - `url` string, uri, required

## Other responses

- `401`: Unauthorized
- `403`: Owner or admin only
- `404`: No Stripe customer for this workspace

---

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