ThoughtBox Admin API

The admin API from ThoughtBox — 6 operation(s) for admin.

GitHub OpenAPI

Operations 9

POST /api/admin/extractions/cleanup Delete extraction cache rows not accessed within a retention window #
GET /api/admin/users List all users #
DELETE /api/admin/users/{user_id} Hard-delete a user #
DELETE /api/admin/users/external/{external_id} Cascade-delete a user's thoughtbox data by external identity #
GET /api/admin/mpc-tenants List Tenants #
POST /api/admin/mpc-tenants Create Tenant #
GET /api/admin/mpc-tenants/{tenant_id} Get Tenant #
PATCH /api/admin/mpc-tenants/{tenant_id} Update Tenant #
DELETE /api/admin/mpc-tenants/{tenant_id} Delete Tenant #

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/thoughtbox-ai:thoughtbox-ai-admin-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

thoughtbox-ai-admin-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: ThoughtBox Admin API
  description: Document proxy and AI chat platform with MCP support
  version: 0.1.0
tags:
- name: Admin
paths:
  /api/admin/extractions/cleanup:
    post:
      tags:
      - Admin
      summary: Delete extraction cache rows not accessed within a retention window
      operationId: cleanup_stale_extractions_api_admin_extractions_cleanup_post
      security:
      - HTTPBearer: []
      parameters:
      - name: days
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          description: Delete rows whose last_accessed_at is older than this many days
          default: 30
          title: Days
        description: Delete rows whose last_accessed_at is older than this many days
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/admin/users:
    get:
      tags:
      - Admin
      summary: List all users
      operationId: list_users_api_admin_users_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
      security:
      - HTTPBearer: []
  /api/admin/users/{user_id}:
    delete:
      tags:
      - Admin
      summary: Hard-delete a user
      description: Remove a user from Cognito and cascade-delete all their data from the DB.
      operationId: delete_user_api_admin_users__user_id__delete
      security:
      - HTTPBearer: []
      parameters:
      - name: user_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: User Id
      responses:
        '204':
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/admin/users/external/{external_id}:
    delete:
      tags:
      - Admin
      summary: Cascade-delete a user's thoughtbox data by external identity
      description: 'For a caller (e.g. mpcentral) that owns its own identity provider and has already

        removed the account there -- deletes only this user''s thoughtbox-owned data, never

        touches Cognito. `external_id` is that provider''s stable subject identifier (today

        always a Cognito sub, stored in the same `cognito_sub` column `get_or_create_user`

        populates from a JWT''s "sub" claim -- named generically here since thoughtbox itself

        shouldn''t need to know or care which identity provider issued it).


        Always 204, matched row or not: most external identities never have thoughtbox data

        (see get_or_create_user) -- that''s the normal case, not an error the caller needs to

        special-case.'
      operationId: delete_user_by_external_id_api_admin_users_external__external_id__delete
      security:
      - HTTPBearer: []
      parameters:
      - name: external_id
        in: path
        required: true
        schema:
          type: string
          title: External Id
      responses:
        '204':
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/admin/mpc-tenants:
    get:
      tags:
      - Admin
      summary: List Tenants
      operationId: list_tenants_api_admin_mpc_tenants_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/TenantRecord'
                type: array
                title: Response List Tenants Api Admin Mpc Tenants Get
      security:
      - HTTPBearer: []
    post:
      tags:
      - Admin
      summary: Create Tenant
      operationId: create_tenant_api_admin_mpc_tenants_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TenantCreate'
        required: true
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TenantRecord'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - HTTPBearer: []
  /api/admin/mpc-tenants/{tenant_id}:
    get:
      tags:
      - Admin
      summary: Get Tenant
      operationId: get_tenant_api_admin_mpc_tenants__tenant_id__get
      security:
      - HTTPBearer: []
      parameters:
      - name: tenant_id
        in: path
        required: true
        schema:
          type: string
          title: Tenant Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TenantRecord'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    patch:
      tags:
      - Admin
      summary: Update Tenant
      operationId: update_tenant_api_admin_mpc_tenants__tenant_id__patch
      security:
      - HTTPBearer: []
      parameters:
      - name: tenant_id
        in: path
        required: true
        schema:
          type: string
          title: Tenant Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TenantUpdate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TenantRecord'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    delete:
      tags:
      - Admin
      summary: Delete Tenant
      operationId: delete_tenant_api_admin_mpc_tenants__tenant_id__delete
      security:
      - HTTPBearer: []
      parameters:
      - name: tenant_id
        in: path
        required: true
        schema:
          type: string
          title: Tenant Id
      responses:
        '204':
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    TenantUpdate:
      properties:
        cognito_iss:
          anyOf:
          - type: string
          - type: 'null'
          title: Cognito Iss
        cognito_aud:
          anyOf:
          - type: string
          - type: 'null'
          title: Cognito Aud
        cognito_region:
          anyOf:
          - type: string
          - type: 'null'
          title: Cognito Region
        domains:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Domains
        name:
          anyOf:
          - type: string
          - type: 'null'
          title: Name
        app_url:
          anyOf:
          - type: string
          - type: 'null'
          title: App Url
        status:
          anyOf:
          - type: string
            enum:
            - ACTIVE
            - SUSPENDED
          - type: 'null'
          title: Status
      type: object
      title: TenantUpdate
      description: Payload for PATCH /api/admin/mpc-tenants/{id}. Any subset of fields.
    TenantRecord:
      properties:
        tenant_id:
          type: string
          title: Tenant Id
        status:
          type: string
          enum:
          - ACTIVE
          - SUSPENDED
          title: Status
          default: ACTIVE
        domains:
          items:
            type: string
          type: array
          title: Domains
        cognito_iss:
          type: string
          title: Cognito Iss
        cognito_aud:
          type: string
          title: Cognito Aud
        cognito_region:
          type: string
          title: Cognito Region
          default: us-east-1
        name:
          anyOf:
          - type: string
          - type: 'null'
          title: Name
        app_url:
          anyOf:
          - type: string
          - type: 'null'
          title: App Url
        created_at:
          anyOf:
          - type: string
          - type: 'null'
          title: Created At
        updated_at:
          anyOf:
          - type: string
          - type: 'null'
          title: Updated At
      type: object
      required:
      - tenant_id
      - cognito_iss
      - cognito_aud
      title: TenantRecord
      description: One row in the registry — represents one trusted MPC Cognito pool.
    TenantCreate:
      properties:
        tenant_id:
          type: string
          maxLength: 120
          minLength: 1
          pattern: ^[a-z0-9][a-z0-9-]*$
          title: Tenant Id
        cognito_iss:
          type: string
          title: Cognito Iss
        cognito_aud:
          type: string
          title: Cognito Aud
        cognito_region:
          type: string
          title: Cognito Region
          default: us-east-1
        domains:
          items:
            type: string
          type: array
          title: Domains
        name:
          anyOf:
          - type: string
          - type: 'null'
          title: Name
        app_url:
          anyOf:
          - type: string
          - type: 'null'
          title: App Url
        status:
          type: string
          enum:
          - ACTIVE
          - SUSPENDED
          title: Status
          default: ACTIVE
      type: object
      required:
      - tenant_id
      - cognito_iss
      - cognito_aud
      title: TenantCreate
      description: Payload for POST /api/admin/mpc-tenants.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
      - loc
      - msg
      - type
      title: ValidationError
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer