Casama AI Selfhost API

The selfhost API from Casama AI, for selfhost.

GitHub OpenAPI
Pull this API's OpenAPI, operations, scores and pricing into your own code or AI agent with a free APIs.io key — sign in with GitHub, Google or LinkedIn. No form to fill in; signing in shares your email address with us (Privacy).

Operations 13

POST /v1/selfhost/licenses/personal Get the free personal license for a self-hosted server (signed in) #
POST /v1/selfhost/licenses/renew Renew a self-hosted server's license key (no sign-in) #
POST /v1/selfhost/licenses/trial Email a 30-day business trial key (no sign-in, rate limited) #
POST /v1/selfhost/licenses/admit Let an email address past the sign-up waitlist to get a personal license #
POST /v1/selfhost/cloud/connect-codes A one-time code that connects a self-hosted server to Casama Cloud models… #
GET /v1/selfhost/status This server's license state (no sign-in) #
PUT /v1/selfhost/license Set this server's license key #
GET /v1/selfhost/cloud-models Casama Cloud models on this server: state, who pays, limits and your own use #
PATCH /v1/selfhost/cloud-models Change who may use Casama Cloud, the daily limit per person and the fallbacks… #
POST /v1/selfhost/cloud-models/connect Connect this server to Casama Cloud with a one-time code (server admin) #
GET /v1/selfhost/cloud-models/preview What turning Casama Cloud models on would change, bot by bot (server admin) #
POST /v1/selfhost/cloud-models/apply Move the chosen bots onto Casama Cloud models and save the settings (server… #
POST /v1/selfhost/cloud-models/off Turn Casama Cloud models off; each bot goes back to its previous key (server… #

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/casama-ai:casama-ai-selfhost-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

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. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

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

OpenAPI Specification

casama-ai-selfhost-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Casama Selfhost API
  version: 0.1.0
  license:
    name: Apache-2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
servers:
- url: http://api.casama.ai
tags:
- name: selfhost
paths:
  /v1/selfhost/licenses/personal:
    post:
      operationId: issuePersonalLicense
      tags:
      - selfhost
      summary: Get the free personal license for a self-hosted server (signed in)
      description: 'One active personal license per account: a new instance id moves it, and the old server''s renewals answer 409 license_moved. Errors: 404 licensing_off.'
      security:
      - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PersonalLicenseRequest'
      responses:
        '200':
          description: The key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LicenseIssued'
        '400':
          description: Validation failed
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '401':
          description: Not authenticated
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '403':
          description: Forbidden
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '404':
          description: Not found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
  /v1/selfhost/licenses/renew:
    post:
      operationId: renewLicense
      tags:
      - selfhost
      summary: Renew a self-hosted server's license key (no sign-in)
      description: 'Accepts keys up to the end of their 14-day grace. The first renewal of a trial or business key binds it to the server. Errors: 400 invalid_license, 403 license_revoked, 403 license_expired, 404 licensing_off, 409 license_moved, 429 too_many_attempts.'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RenewLicenseRequest'
      responses:
        '200':
          description: A new key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LicenseIssued'
        '400':
          description: Validation failed
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '403':
          description: Forbidden
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '404':
          description: Not found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '409':
          description: Conflict
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '429':
          description: Rate limited
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
  /v1/selfhost/licenses/trial:
    post:
      operationId: requestTrialLicense
      tags:
      - selfhost
      summary: Email a 30-day business trial key (no sign-in, rate limited)
      description: 'Answers the same whether or not the address already had a trial. Errors: 400 bad_email, 404 licensing_off, 429 too_many_attempts, 503 email_unavailable.'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TrialLicenseRequest'
      responses:
        '202':
          description: On its way
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TrialLicenseAccepted'
        '400':
          description: Validation failed
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '404':
          description: Not found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '429':
          description: Rate limited
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '503':
          description: Email is not set up on this server
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
  /v1/selfhost/licenses/admit:
    post:
      operationId: admitForSelfhost
      tags:
      - selfhost
      summary: Let an email address past the sign-up waitlist to get a personal license
      description: 'Called by the desktop app and the CLI before the Casama sign-in that gets a free personal license, so a new person isn''t stopped by the invite-only gate. Marks the address as let in (admitted_via ''selfhost''); answers the same whether or not it was on the list. Errors: 400 bad_email, 400 disposable_email, 404 licensing_off, 429 too_many_attempts.'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TrialLicenseRequest'
      responses:
        '202':
          description: Let in, or already could sign up
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TrialLicenseAccepted'
        '400':
          description: Validation failed
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '404':
          description: Not found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '429':
          description: Rate limited
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
  /v1/selfhost/cloud/connect-codes:
    post:
      operationId: createCloudConnectCode
      tags:
      - selfhost
      summary: A one-time code that connects a self-hosted server to Casama Cloud models…
      description: 'Casama Cloud only. The caller is an owner or admin of org_id, the workspace that will pay. The app hands the code to its own server, which redeems it at Casama Cloud within 10 minutes (POST /link/v1/cloud-models/redeem). Errors: 403 forbidden, 404 not_found where Casama Cloud models aren''t offered.'
      security:
      - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CloudConnectCodeRequest'
      responses:
        '200':
          description: The code
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudConnectCode'
        '400':
          description: Validation failed
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '401':
          description: Not authenticated
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '403':
          description: Forbidden
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '404':
          description: Not found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
  /v1/selfhost/status:
    get:
      operationId: getSelfhostStatus
      tags:
      - selfhost
      summary: This server's license state (no sign-in)
      description: 'On Casama Cloud, and wherever licensing is off, the answer is `{ "licensing": false }`.'
      responses:
        '200':
          description: State
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SelfhostStatus'
  /v1/selfhost/license:
    put:
      operationId: setSelfhostLicense
      tags:
      - selfhost
      summary: Set this server's license key
      description: 'Accepted when the key verifies and is for this server (or not yet bound to one, or offline). Before the server has a key anyone may set it (setup); after that only the instance owner. Errors: 400 invalid_license, 401 unauthorized, 403 not_instance_owner, 404 licensing_off, 409 license_other_instance.'
      security:
      - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SetSelfhostLicenseRequest'
      responses:
        '200':
          description: The new state
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SelfhostStatus'
        '400':
          description: Validation failed
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '401':
          description: Not authenticated
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '403':
          description: Forbidden
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '404':
          description: Not found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '409':
          description: Conflict
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
  /v1/selfhost/cloud-models:
    get:
      operationId: getSelfhostCloudModels
      tags:
      - selfhost
      summary: 'Casama Cloud models on this server: state, who pays, limits and your own use'
      security:
      - bearerAuth: []
      responses:
        '200':
          description: State
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudModelsState'
        '401':
          description: Not authenticated
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
    patch:
      operationId: updateSelfhostCloudModels
      tags:
      - selfhost
      summary: Change who may use Casama Cloud, the daily limit per person and the fallbacks…
      description: 'Only the fields sent change. Bots stay where they are. Errors: 403 not_instance_owner, 404 not_available, 409 not_connected.'
      security:
      - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateCloudModelsRequest'
      responses:
        '200':
          description: State
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudModelsState'
        '400':
          description: Validation failed
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '401':
          description: Not authenticated
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '403':
          description: Forbidden
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '404':
          description: Not found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '409':
          description: Conflict
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
  /v1/selfhost/cloud-models/connect:
    post:
      operationId: connectSelfhostCloudModels
      tags:
      - selfhost
      summary: Connect this server to Casama Cloud with a one-time code (server admin)
      description: 'The code comes from Casama Cloud (`POST /v1/selfhost/cloud/connect-codes`, signed in there). The server redeems it, keeps the link key in Vault and needs no restart. Errors: the refusal codes of Casama Cloud, 403 not_instance_owner, 404 not_available.'
      security:
      - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ConnectCloudModelsRequest'
      responses:
        '200':
          description: State
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudModelsState'
        '400':
          description: Validation failed
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '401':
          description: Not authenticated
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '402':
          description: Casama Cloud refused (plan, credits, seats)
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '403':
          description: Forbidden
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '404':
          description: Not found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '409':
          description: Conflict
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
  /v1/selfhost/cloud-models/preview:
    get:
      operationId: previewSelfhostCloudModels
      tags:
      - selfhost
      summary: What turning Casama Cloud models on would change, bot by bot (server admin)
      security:
      - bearerAuth: []
      responses:
        '200':
          description: Preview
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudModelsPreview'
        '401':
          description: Not authenticated
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '403':
          description: Forbidden
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '404':
          description: Not found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
  /v1/selfhost/cloud-models/apply:
    post:
      operationId: applySelfhostCloudModels
      tags:
      - selfhost
      summary: Move the chosen bots onto Casama Cloud models and save the settings (server…
      description: Each chosen bot points at the Casama Cloud credential with its previous choice kept, so turning off puts it back.
      security:
      - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApplyCloudModelsRequest'
      responses:
        '200':
          description: State
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudModelsState'
        '400':
          description: Validation failed
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '401':
          description: Not authenticated
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '403':
          description: Forbidden
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '404':
          description: Not found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '409':
          description: Conflict
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
  /v1/selfhost/cloud-models/off:
    post:
      operationId: turnOffSelfhostCloudModels
      tags:
      - selfhost
      summary: Turn Casama Cloud models off; each bot goes back to its previous key (server…
      security:
      - bearerAuth: []
      responses:
        '200':
          description: Where each bot went
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CloudModelsOff'
        '401':
          description: Not authenticated
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '403':
          description: Forbidden
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '404':
          description: Not found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
components:
  schemas:
    LicenseIssued:
      type: object
      properties:
        license:
          type: string
        expires_at:
          type: string
          format: date-time
      required:
      - license
      - expires_at
    CloudConnectCode:
      type: object
      properties:
        code:
          type: string
        expires_at:
          type: string
          format: date-time
      required:
      - code
      - expires_at
    CloudModelsPreview:
      type: object
      properties:
        bots:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                format: uuid
              name:
                type: string
              from:
                type: object
                properties:
                  credential_id:
                    type:
                    - string
                    - 'null'
                  provider:
                    type:
                    - string
                    - 'null'
                  model:
                    type:
                    - string
                    - 'null'
                  label:
                    type:
                    - string
                    - 'null'
                  working:
                    type: boolean
                required:
                - credential_id
                - provider
                - model
                - label
                - working
              suggested:
                type: boolean
              step_down:
                type: boolean
            required:
            - id
            - name
            - from
            - suggested
            - step_down
        jobs:
          type: object
          properties:
            embedding:
              type: object
              properties:
                has_own:
                  type: boolean
              required:
              - has_own
            image:
              type: object
              properties:
                has_own:
                  type: boolean
              required:
              - has_own
            tts:
              type: object
              properties:
                has_own:
                  type: boolean
              required:
              - has_own
            stt:
              type: object
              properties:
                has_own:
                  type: boolean
              required:
              - has_own
          required:
          - embedding
          - image
          - tts
          - stt
      required:
      - bots
      - jobs
    CloudModelsFallback:
      type: object
      properties:
        to_own:
          type: boolean
          description: 'Casama Cloud refused or can''t be reached: use an own key'
        from_own:
          type: boolean
          description: 'An own key failed: use Casama Cloud'
      required:
      - to_own
      - from_own
    RenewLicenseRequest:
      type: object
      properties:
        license:
          type: string
          minLength: 20
          maxLength: 8000
        instance_id:
          type: string
          format: uuid
        engine_version:
          type: string
          minLength: 1
          maxLength: 64
        members:
          type: integer
          minimum: 0
          maximum: 10000000
        bots:
          type: integer
          minimum: 0
          maximum: 10000000
      required:
      - license
      - instance_id
      - engine_version
    SelfhostStatus:
      type: object
      properties:
        licensing:
          type: boolean
        state:
          type: string
          enum:
          - setup
          - active
          - grace
          - expired
        edition:
          type:
          - string
          - 'null'
          enum:
          - personal
          - trial
          - business
          - null
        instance_id:
          type: string
        expires_at:
          type:
          - string
          - 'null'
          format: date-time
        grace_until:
          type:
          - string
          - 'null'
          format: date-time
        members:
          type: integer
        seats:
          type:
          - integer
          - 'null'
        engine_version:
          type: string
      required:
      - licensing
    CloudLinkStatus:
      type:
      - object
      - 'null'
      properties:
        scopes:
          type: array
          items:
            type: string
        payer:
          type:
          - object
          - 'null'
          properties:
            org_id:
              type: string
            name:
              type: string
          required:
          - org_id
          - name
        plan:
          type:
          - object
          - 'null'
          properties:
            code:
              type: string
            name:
              type: string
            paid:
              type: boolean
            ended:
              type: boolean
              description: The payer had a paid plan and it ended (not just never paid)
          required:
          - code
          - name
          - paid
        models_allowed:
          type: boolean
        credits_usd:
          type: number
        included:
          type:
          - object
          - 'null'
          properties:
            used_usd:
              type: number
            limit_usd:
              type: number
          required:
          - used_usd
          - limit_usd
        today:
          type: object
          properties:
            spend_usd:
              type: number
            cap_usd:
              type:
              - number
              - 'null'
            resets_at:
              type:
              - string
              - 'null'
          required:
          - spend_usd
          - cap_usd
          - resets_at
        seats:
          type:
          - object
          - 'null'
          properties:
            plan:
              type: number
            used:
              type: number
          required:
          - plan
          - used
        trial:
          type:
          - object
          - 'null'
          properties:
            remaining_usd:
              type: number
          required:
          - remaining_usd
        jobs:
          type: object
          properties:
            chat:
              type:
              - string
              - 'null'
            background:
              type:
              - string
              - 'null'
            embedding:
              type:
              - string
              - 'null'
            image:
              type:
              - string
              - 'null'
            tts:
              type:
              - string
              - 'null'
            stt:
              type:
              - string
              - 'null'
    TrialLicenseRequest:
      type: object
      properties:
        email:
          type: string
          minLength: 3
          maxLength: 254
      required:
      - email
    PersonalLicenseRequest:
      type: object
      properties:
        instance_id:
          type: string
          format: uuid
        engine_version:
          type: string
          minLength: 1
          maxLength: 64
      required:
      - instance_id
      - engine_version
    CloudModelsState:
      type: object
      properties:
        available:
          type: boolean
          description: False on Casama Cloud itself and on a server without a license in force
        connected:
          type: boolean
        can_manage:
          type: boolean
        payer:
          type:
          - object
          - 'null'
          properties:
            org_id:
              type: string
            name:
              type: string
          required:
          - org_id
          - name
        status:
          $ref: '#/components/schemas/CloudLinkStatus'
        policy:
          $ref: '#/components/schemas/CloudModelsPolicy'
        fallback:
          $ref: '#/components/schemas/CloudModelsFallback'
        embedding:
          type: boolean
        me:
          type: object
          properties:
            allowed:
              type: boolean
            today_usd:
              type: number
            limit_usd:
              type:
              - number
              - 'null'
          required:
          - allowed
          - today_usd
          - limit_usd
        memory_reindex:
          type:
          - object
          - 'null'
          properties:
            done:
              type: integer
            total:
              type: integer
          required:
          - done
          - total
        status_error:
          type:
          - object
          - 'null'
          properties:
            code:
              type: string
            message:
              type: string
          required:
          - code
          - message
          description: 'Why Casama Cloud isn''t answering: the last refusal from Cloud''s status call, or a run''s when Cloud itself couldn''t be reached. Null when fine'
        has_own_key:
          type: boolean
          description: A working own chat key exists on this server
      required:
      - available
      - connected
      - can_manage
      - payer
      - status
      - policy
      - fallback
      - embedding
      - me
      - memory_reindex
      - status_error
      - has_own_key
    Problem:
      type: object
      properties:
        type:
          type: string
          example: https://casama.ai/problems/not_found
        title:
          type: string
        status:
          type: integer
        code:
          type: string
          description: Stable error code
          example: not_found
        detail:
          type: string
        instance:
          type: string
        errors:
          type: array
          items:
            type: object
            properties:
              path:
                type: string
              message:
                type: string
            required:
            - path
            - message
          description: Field errors for validation_failed
      required:
      - type
      - title
      - status
      - code
    ApplyCloudModelsRequest:
      type: object
      properties:
        bots:
          type: array
          items:
            type: string
            format: uuid
          maxItems: 10000
        workspace_default:
          type: boolean
        embedding:
          type: boolean
        fallback:
          $ref: '#/components/schemas/CloudModelsFallback'
        policy:
          $ref: '#/components/schemas/CloudModelsPolicy'
      required:
      - bots
    CloudModelsPolicy:
      type: object
      properties:
        allowed:
          anyOf:
          - type: string
            enum:
            - all
          - type: array
            items:
              type: string
              format: uuid
            maxItems: 10000
          description: '"all", or the user ids who may use Casama Cloud'
        daily_usd_per_member:
          type:
          - number
          - 'null'
          minimum: 0
          maximum: 100000
      required:
      - allowed
      - daily_usd_per_member
    UpdateCloudModelsRequest:
      type: object
      properties:
        policy:
          $ref: '#/components/schemas/CloudModelsPolicy'
        fallback:
          $ref: '#/components/schemas/CloudModelsFallback'
    ConnectCloudModelsRequest:
      type: object
      properties:
        code:
          type: string
          minLength: 4
          maxLength: 200
      required:
      - code
    CloudModelsOff:
      type: object
      properties:
        bots:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                format: uuid
              name:
                type: string
              to:
                type:
                - object
                - 'null'
                properties:
                  label:
                    type: string
                required:
                - label
            required:
            - id
            - name
            - to
      required:
      - bots
    CloudConnectCodeRequest:
      type: object
      properties:
        org_id:
          type: string
          format: uuid
        instance_id:
          type: string
          pattern: ^[A-Za-z0-9-]{8,64}$
        instance_name:
          type: string
          minLength: 1
          maxLength: 80
      required:
      - org_id
      - instance_id
    TrialLicenseAccepted:
      type: object
      properties:
        ok:
          type: boolean
          enum:
          - true
      required:
      - ok
    SetSelfhostLicenseRequest:
      type: object
      properties:
        license:
          type: string
          minLength: 20
          maxLength: 8000
      required:
      - license
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Supabase access token