---
title: "Set Portal Customer"
method: POST
path: "/api/workspaces/{slug}/billing/portal/customer"
tags: ["Workspace Billing"]
---

# Set Portal Customer

`POST /api/workspaces/{slug}/billing/portal/customer`

## Request

- Base URL: `https://api.kolens.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.kolens.ai/api/workspaces/{slug}/billing/portal/customer`
- Auth: none declared

## Path parameters

- `slug` string, required

## Headers

- `X-Admin-Secret` string, nullable

## Request body

- SetPortalCustomerRequest: Admin-secret-gated callback. Stamps ``workspaces.stripe_customer_id`` after Vercel creates a customer via the first checkout. Idempotent — re-setting to the same id is a no-op; changing to a different id overwrites + audits the change.
  - `stripe_customer_id` string, required

## Response `200`

Successful Response

- object

## Other responses

- `422`: Validation Error

---

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