AskUI billing API

The billing API from AskUI — 4 operation(s) for billing.

Operations 4

POST /api/v1/workspaces/{workspace_id}/billing/customer-portal-session Create Customer Portal Session #
GET /api/v1/workspaces/{workspace_id}/billing/subscription Get workspace subscription details #
GET /api/v1/workspaces/{workspace_id}/billing/prices List available subscription prices #
POST /api/v1/workspaces/{workspace_id}/billing/checkout Create a Stripe Checkout Session #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/askui-billing-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

askui-billing-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: AskUI Workspaces access-tokens Billing API
  version: 0.2.15
servers:
- url: https://workspaces.askui.com
  description: Base URL declared by the provider in apis.yml (roadmap#122).
tags:
- name: billing
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
      security:
      - Bearer: []
      - Basic: []
      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'
  /api/v1/workspaces/{workspace_id}/billing/subscription:
    get:
      tags:
      - billing
      summary: Get workspace subscription details
      description: Retrieves the subscription details for the workspace, including Stripe product information.
      operationId: get_workspace_subscription_api_v1_workspaces__workspace_id__billing_subscription_get
      security:
      - Bearer: []
      - Basic: []
      parameters:
      - name: workspace_id
        in: path
        required: true
        schema:
          type: string
          format: uuid4
          title: Workspace Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetSubscriptionResponseDto'
        '404':
          description: Subscription not found
          content:
            application/json:
              example:
                detail:
                - msg: Subscription not found
        '500':
          description: Internal server error when retrieving subscription data
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/workspaces/{workspace_id}/billing/prices:
    get:
      tags:
      - billing
      summary: List available subscription prices
      description: Returns the list of prices configured for checkout, fetched from Stripe.
      operationId: list_prices_api_v1_workspaces__workspace_id__billing_prices_get
      security:
      - Bearer: []
      - Basic: []
      parameters:
      - name: workspace_id
        in: path
        required: true
        schema:
          type: string
          format: uuid4
          title: Workspace Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListPricesResponseDto'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/workspaces/{workspace_id}/billing/checkout:
    post:
      tags:
      - billing
      summary: Create a Stripe Checkout Session
      description: Creates a Checkout Session for a trial-only workspace to purchase a subscription plan. The workspace must not already have an active Stripe subscription.
      operationId: create_checkout_session_api_v1_workspaces__workspace_id__billing_checkout_post
      security:
      - Bearer: []
      - Basic: []
      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/CreateCheckoutSessionCommand'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateCheckoutSessionResponseDto'
        '404':
          description: Billing details not found
          content:
            application/json:
              example:
                detail:
                - msg: Billing details not found
        '409':
          description: Workspace already has an active Stripe subscription
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    CreateCheckoutSessionCommand:
      properties:
        priceId:
          type: string
          title: Priceid
        returnUrl:
          type: string
          maxLength: 2083
          minLength: 1
          format: uri
          title: Returnurl
      type: object
      required:
      - priceId
      - returnUrl
      title: CreateCheckoutSessionCommand
    SubscriptionItemDto:
      properties:
        productAllowedUsage:
          type: integer
          title: Productallowedusage
      type: object
      required:
      - productAllowedUsage
      title: SubscriptionItemDto
      description: Subscription item with only the requested fields
    CreateCustomerPortalSessionRequestDto:
      properties:
        returnUrl:
          type: string
          maxLength: 2083
          minLength: 1
          format: uri
          title: Returnurl
      type: object
      required:
      - returnUrl
      title: CreateCustomerPortalSessionRequestDto
    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
    PriceItemDto:
      properties:
        id:
          type: string
          title: Id
        productName:
          type: string
          title: Productname
        unitAmount:
          type: integer
          title: Unitamount
        currency:
          type: string
          title: Currency
        recurringInterval:
          type: string
          title: Recurringinterval
        recurringIntervalCount:
          type: integer
          title: Recurringintervalcount
        productAllowedUsage:
          type: integer
          title: Productallowedusage
      type: object
      required:
      - id
      - productName
      - unitAmount
      - currency
      - recurringInterval
      - recurringIntervalCount
      - productAllowedUsage
      title: PriceItemDto
      description: Single price entry returned to the frontend.
    CreateCustomerPortalSessionResponseDto:
      properties:
        sessionUrl:
          type: string
          maxLength: 2083
          minLength: 1
          format: uri
          title: Sessionurl
      type: object
      required:
      - sessionUrl
      title: CreateCustomerPortalSessionResponseDto
    GetSubscriptionResponseDto:
      properties:
        currentPeriodStart:
          type: string
          format: date-time
          title: Currentperiodstart
        currentPeriodEnd:
          type: string
          format: date-time
          title: Currentperiodend
        items:
          items:
            $ref: '#/components/schemas/SubscriptionItemDto'
          type: array
          title: Items
          default: []
        isTrial:
          type: boolean
          title: Istrial
          default: false
      type: object
      required:
      - currentPeriodStart
      - currentPeriodEnd
      title: GetSubscriptionResponseDto
      description: Simplified response DTO with only the requested fields
    ListPricesResponseDto:
      properties:
        prices:
          items:
            $ref: '#/components/schemas/PriceItemDto'
          type: array
          title: Prices
      type: object
      required:
      - prices
      title: ListPricesResponseDto
      description: Response containing all available prices.
    CreateCheckoutSessionResponseDto:
      properties:
        sessionUrl:
          type: string
          maxLength: 2083
          minLength: 1
          format: uri
          title: Sessionurl
      type: object
      required:
      - sessionUrl
      title: CreateCheckoutSessionResponseDto
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
  securitySchemes:
    Bearer:
      type: http
      scheme: bearer
    Basic:
      type: apiKey
      in: header
      name: Authorization