---
title: "Open the billing portal"
method: POST
path: "/v1/billing/portal"
tags: ["billing"]
---

# Open the billing portal

`POST /v1/billing/portal`

## Request

- Base URL: `https://botmail.pro`
- URL: `https://botmail.pro/v1/billing/portal`
- Auth: API key in cookie `bm_session`

Signed-in human only. Body optional.

## Request body

- object
  - `return_path` string: Same-origin path. Default `/settings/billing`.

## Response `200`

Open `url` in the browser.

- object
  - `url` string, uri, required

## Other responses

- `400`: Invalid request (`bad_request` or a more specific code).
- `401`: Missing or invalid credentials (`unauthorized`, `invalid_token`).
- `403`: The credential can't do this (`forbidden`, `csrf`, `account_inactive`, …). Missing scopes are listed in `details.required_scope`; pending keys get a hint to wait for the claim.

---

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