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

# Create Upgrade Intent

> Start a plan purchase and return the URL to send the customer to.

This is the whole of the platform's involvement in commerce. It attests who
is asking and for which workspace, hands that to the License Service over an
outbound call, and returns the Stripe URL that comes back. It creates no
Stripe session itself, holds no Stripe key, and grants nothing. See
``services.upgrade_intent`` and ``docs/LICENSING_ARCHITECTURE_PLAN.md``.

Deliberately reachable with an expired or absent license: ``/api/license``
is exempt from the lockout gate, because a workspace whose license lapsed
is exactly the one that needs to buy.



## OpenAPI

````yaml /api-reference/openapi.json post /api/license/upgrade-intent
openapi: 3.1.0
info:
  title: Blindsight API
  version: 0.1.0
  description: >-
    The full Blindsight REST surface, generated from the running application.
    Replace the server host with your own deployment.


    For the Runtime Security integration surface (scan, proxy, tool calls) see
    the Runtime Security spec, which is hand written and carries worked
    examples.
servers:
  - url: https://api.your-blindsight.com
    description: Your Blindsight deployment
security: []
paths:
  /api/license/upgrade-intent:
    post:
      tags:
        - license
      summary: Create Upgrade Intent
      description: >-
        Start a plan purchase and return the URL to send the customer to.


        This is the whole of the platform's involvement in commerce. It attests
        who

        is asking and for which workspace, hands that to the License Service
        over an

        outbound call, and returns the Stripe URL that comes back. It creates no

        Stripe session itself, holds no Stripe key, and grants nothing. See

        ``services.upgrade_intent`` and ``docs/LICENSING_ARCHITECTURE_PLAN.md``.


        Deliberately reachable with an expired or absent license:
        ``/api/license``

        is exempt from the lockout gate, because a workspace whose license
        lapsed

        is exactly the one that needs to buy.
      operationId: create_upgrade_intent_api_license_upgrade_intent_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpgradeIntentRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpgradeIntentResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    UpgradeIntentRequest:
      properties:
        plan_slug:
          type: string
          maxLength: 64
          minLength: 1
          title: Plan Slug
      type: object
      required:
        - plan_slug
      title: UpgradeIntentRequest
      description: |-
        Which plan the caller wants. The workspace is NOT a field: it comes from
        the authenticated session, never from the client.
    UpgradeIntentResponse:
      properties:
        url:
          type: string
          title: Url
      type: object
      required:
        - url
      title: UpgradeIntentResponse
      description: |-
        Just somewhere to send the browser. The signed intent is never returned
        to a client: it is exchanged server-side.
    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

````