---
title: "Create Stripe customer portal URL"
method: POST
path: "/workspaces/{workspace_id}/subscription/customer-portal"
tags: ["Stripe Subscriptions"]
---

# Create Stripe customer portal URL

`POST /workspaces/{workspace_id}/subscription/customer-portal`

## Request

- Base URL: `https://app.mammoth.io/api/v2`
- URL: `https://app.mammoth.io/api/v2/workspaces/{workspace_id}/subscription/customer-portal`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-API-KEY` and API key in header `X-API-SECRET` and API key in header `X-WORKSPACE-ID`

## Path parameters

- `workspace_id` integer, required: Workspace refers to a collection of projects. Workspace ID is unique identifier for workspace.

## Request body

- CreateCustomerPortalUrlRequestSchema
  - `return_url` string, nullable

## Response `201`

Document created, URL follows

- CreateCustomerPortalUrlResponseSchema
  - `portal_url` string, required

## Other responses

- `400`: Bad request syntax or unsupported method

---

[API](https://skmtc.dev/mammoth/apis/mammoth-analytics.md) · [All operations](https://skmtc.dev/mammoth/apis/mammoth-analytics/llms.txt) · [OpenAPI document](https://skmtc.dev/mammoth/apis/mammoth-analytics/revisions/9d8804f81a10?raw)
