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

# Create Portal Session

`POST /api/billing/portal`

## Request

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

Create a Stripe Customer Portal session for managing subscription.

The frontend sends the return URL as the `X-Return-Url` header; the query
param stays for direct API callers.

## Query parameters

- `return_url` string, nullable

## Headers

- `x-return-url` string, nullable

## Response `200`

Successful Response

- PortalResponse
  - `url` string, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/dialogbrain/apis/dialogbrain-v2-api-gateway.md) · [All operations](https://skmtc.dev/dialogbrain/apis/dialogbrain-v2-api-gateway/llms.txt) · [OpenAPI document](https://skmtc.dev/dialogbrain/apis/dialogbrain-v2-api-gateway/revisions/d84e7dc9977d?raw)
