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

# Create Customer Portal Session



## OpenAPI

````yaml post /api/v1/workspaces/{workspace_id}/billing/customer-portal-session
openapi: 3.1.0
info:
  title: AskUI Workspaces API
  version: 0.2.15
servers: []
security: []
paths:
  /api/v1/workspaces/{workspace_id}/billing/customer-portal-session:
    post:
      tags:
        - billing
      summary: Create Customer Portal Session
      operationId: >-
        create_customer_portal_session_api_v1_workspaces__workspace_id__billing_customer_portal_session_post
      parameters:
        - name: workspace_id
          in: path
          required: true
          schema:
            type: string
            format: uuid4
            title: Workspace Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateCustomerPortalSessionRequestDto'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateCustomerPortalSessionResponseDto'
        '404':
          description: Billing details not found
          content:
            application/json:
              example:
                detail:
                  - msg: Billing details not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - Bearer: []
        - Basic: []
components:
  schemas:
    CreateCustomerPortalSessionRequestDto:
      properties:
        returnUrl:
          type: string
          maxLength: 2083
          minLength: 1
          format: uri
          title: Returnurl
      type: object
      required:
        - returnUrl
      title: CreateCustomerPortalSessionRequestDto
    CreateCustomerPortalSessionResponseDto:
      properties:
        sessionUrl:
          type: string
          maxLength: 2083
          minLength: 1
          format: uri
          title: Sessionurl
      type: object
      required:
        - sessionUrl
      title: CreateCustomerPortalSessionResponseDto
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    Bearer:
      type: http
      scheme: bearer
    Basic:
      type: apiKey
      in: header
      name: Authorization

````