`POST /api/v1/billing/portal` — open a Stripe Billing-Portal session for the caller's workspace, returning the hosted-portal session id/url.
POST
/api/v1/billing/portal
const url = 'https://example.com/api/v1/billing/portal';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"return_url":"example","workspace_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/v1/billing/portal \ --header 'Content-Type: application/json' \ --data '{ "return_url": "example", "workspace_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" }'Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
return_url
required
string
workspace_id
required
string format: uuid
Examplegenerated
{ "return_url": "example", "workspace_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}Responses
Section titled “Responses”Media typeapplication/json
object
id
required
string
url
required
string
Examplegenerated
{ "id": "example", "url": "example"}