> ## Documentation Index
> Fetch the complete documentation index at: https://docs.crosmos.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Polar customer portal session



## OpenAPI

````yaml https://api.crosmos.dev/openapi.json post /api/v1/billing/portal
openapi: 3.1.0
info:
  title: Crosmos API
  version: 0.1.0
servers:
  - url: /
security: []
paths:
  /api/v1/billing/portal:
    post:
      tags:
        - billing
      summary: Create Polar customer portal session
      responses:
        '200':
          description: Customer portal URL
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PortalResponse'
        '400':
          description: Rejected portal request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BillingError'
        '429':
          description: Rate limited
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BillingError'
        '502':
          description: Provider error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BillingError'
      security:
        - bearerAuth: []
components:
  schemas:
    PortalResponse:
      type: object
      properties:
        portal_url:
          type: string
          format: uri
      required:
        - portal_url
    BillingError:
      type: object
      properties:
        detail:
          type: string
      required:
        - detail
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: JWT access token or API key (csk_...)

````